[Math] Finding the tangent line to a curve at a given point? Stumped by simple problem.

calculusordinary differential equations

Obtaining an equation for the tangent of a curve is a problem I've done many times in the past and should be fairly straightforward for simple problems like these. However, I've been graphing my answers to check if they are correct and things are just not adding up.

Given I've got the equation:

y = 3x2-x3

and am asked to find the tangent line at (1,2)

I'm going to differentiate it to obtain the tangent line's slope at any given point.

y` = 6x – 3x2

Now I'm going to substitute in the given points to obtain the B in the slope line:

y = mx+b

2 = 6(1)-3(1)2+b

2 = 3+b

b = -1

Therefore, the equation of the tangent at point(1,2) is:

y=6x-3x2-1

But this just doesn't add up when graphed.

Cropped screenshot from mobile

Wouldn't the tangent line be almost completely horizontal? Such as y = 2, I don't understand what I'm doing wrong.

Best Answer

If we set $f(x)=3x^2-x^3$, the slope is $f'(1)=6\cdot 1-3\cdot 1^2=3$.

Hence, the tangent line is $$y-2=3(x-1)\iff y=3x-1.$$