The graph of the function is $g(x)=x^3-2x^2+x+1$ and the tangent to the curve is at $x=2$? a) Find the equation of the tangent to the curve at $x=2$ 
HELP 
and then 
b) Determine the angle that this tangent makes with the positive direction of the $x$-axis 
Please help I really need to know how to do this 
Please include working 
Thanks.
For part a) I found the gradient by doing $g'(x)$ and subbing in $2$ for $x$ and I got $5$ so, so far I have $y=5x+c$, dunno how to find $c$ though

(a)
Ok so we have the equation $$f(x) = x^3 - 2x^2 + x + 1$$
Taking the derivative we get $$f'(x) = 3x^2 - 4x + 1$$ At $x = 2$, $f'(2) = 3*4 - 4*2 + 1 = 5$, meaning that our equation of the tangent line is $$y = 5x + c$$
$f(2) = 8 - 2*4 + 2 + 1 = 3$, so the graph passes through the point $(2, 3)$. Our tangent line equation is now $$y = 5x -7$$
(b) so since the graph passes through the point (0, -7) and (7/5, 0), we have a triangle with a height of 7 and a base of 7/5. You can find theta with that information.
