Question:
If the tangent to the curve $y=x^{3}+a x+b$ at $(1,-6)$ is parallel to the line $x-y+5=0$, find $a$ and $b$.
Solution:
Given:
$x-y+5=0$
$\Rightarrow y=x+5$
$\Rightarrow \frac{d y}{d x}=1$\
Now,
$y=x^{3}+a x+b \quad \ldots(1)$
$\Rightarrow \frac{d y}{d x}=3 x^{2}+a$
Slope of the tangent at $(1,-6)=$ Slope of the given line
$\Rightarrow\left(\frac{d y}{d x}\right)_{(1,-6)}=1$
$\Rightarrow 3+a=1$
$\Rightarrow a=-2$
On substituting $a=-2, x=1$ and $y=-6$ in eq. (1), we get
$-6=1-2+b$
$\Rightarrow b=-5$
$\therefore a=-2$ and $b=-5$