Answer
The equation of the curve is $$y=x^4+x^3-6x^2+2x+1$$
Work Step by Step
$$y=f(x)=x^4+ax^3+bx^2+cx+d$$
- Derivative of $f(x)$: $$f'(x)=4x^3+3ax^2+2bx+c$$
1) $f'(x)$ is the slope of the tangent line to the curve at point $A(x,y)$.
Therefore, since the tangent line at $x=0$ has the equation: $y=2x+1$, we can see that $f'(0)=2$. Or, $$4\times0^3+3a\times0^2+2b\times0+c=2$$ $$c=2\hspace{1cm}(1)$$
Apply (1) to $f'(x)$ and $f(x)$: $$f'(x)=4x^3+3ax^2+2bx+2$$ $$f(x)=x^4+ax^3+bx^2+2x+d$$
Now similarly, since the tangent line at $x=1$ has the equation $y=2-3x$, we can see that $f'(1)=-3$. Or $$4\times1^3+3a\times1^2+2b\times1+2=-3$$ $$4+3a+2b+2=-3$$ $$3a+2b=-9\hspace{1cm}(2)$$
2) Now we should note that the y-coordinates of the tangent and of the curve are equal at the point they touch. Therefore,
- When $x=0$, then according to the equation of the tangent line, $$y=2\times0+1=1$$
That means point $(0,1)$ lies in the curve. Therefore, apply the point to the equation of the curve, $$0^4+a\times0^3+b\times0^2+2\times0+d=1$$ $$d=1\hspace{1cm} (3)$$
- When $x=1$, then according to the equation of the tangent line, $$y=2-3\times1=-1$$
That means point $(1,-1)$ lies in the curve. Therefore, apply the point to the equation of the curve, $$1^4+a\times1^3+b\times1^2+2\times1+d=-1$$ $$1+a+b+2+d=-1$$ $$a+b+d=-4$$
Since $d=1$, $$a+b=-5$$ $$2a+2b=-10\hspace{1cm}(4)$$
Subtract (4) from (2), we have $a=1$
So, $b=-5-a=-5-1=-6$
Apply $a=1, b=-6, c=2, d=1$ to the equation of the curve, we have the final solution: $$y=x^4+x^3-6x^2+2x+1$$