Find the equation of the tangent line to the graph of $f(x)=(x^3+2x-1)(x-3)$ at $x=1$ 
Find the equation of the tangent line to the graph of $f(x)=(x^3+2x-1)(x-3)$ at the point where $x=1$.

I have simplified the problem and found the derivative, which is $4x^3-9x^2+4x-7$, which is correct. I just do not know how to find the equation of the tangent line at the point where $x=1$.
If you could please use step by step solving, that would be greatly appreciated. Thank you!
 A: At $x=1$:


*

*$f(x)$ evaluates to $-4$, and together with $x$ this gives a point the tangent line passes through

*The derivative of $f(x)$, which gives the slope of the tangent line, evaluates to $-8$


Now all you need to do is substitute these values into the equation of a line to obtain the $y$-intercept:
$$-4=-8\cdot1+c\implies c=4$$
Hence the equation of the tangent is
$$y=-8x+4$$
A: I'm really glad you asked this question because it will enable me to share this nice trick I discovered to solve for the tangent line of any function differentiable at $x=a$.
First I'll give you the result:

Law 1.1
If $f$ is differentiable at $x=a$, then the tangent line of $f$ at $a$, denoted by $f^t_a(x)$ is
$$f^t_a(x)=f'(a)x-f'(a)a+f(a)\tag{1}$$
Derivation:
The slope of the tangent line is $f'(a)$. Because $f^t_a(x)$ is linear, it has the form $${f^t_a(x)=mx+b}\tag{2}$$ where $m=f'(a)$.
Now all we need to do is solve for $b$. We can do this by plugging in the point $(a,f(a))$ into $(2)$. $$f(a)=f'(a)a+b\implies {b=f(a)-f'(a)a}\tag{3}$$.
Plugging $(3)$ into $(2)$ we obtain $(1)$.

In your case, $$f'(x)=4x^3−9x^2+4x−7$$ $$f(x)=(x^2+2x-1)(x-3)$$ where $a=1$.
Thus
$$\bbox[yellow]{f^t_a(x)=f'(1)x-f'(1)+f(1)\\=(-8)x+8-4\\=(-8)x+4}$$
