x=0 and x=pie/4 are separate problems
Well, if you're finding tangent lines, there's a good chance you're dealing with derivatives. The derivative of is . So you have to evaluate at both values of x to determine the slope m of the tangent line, and then it would probably be easiest to write the equation of the line in point-slope form using the point on the tangent graph where the line is actually tangent to the curve: