Derivative is to be found out by using the first principle. What I did was that after applying the first principle, I applied the trigonometric identity $$ \cos A-\cos B = -2\sin(( A+B)/2) \sin((A-B)/2), $$ then divided and multiplied the whole by $(A+B)/2$ and $(A-B)/2$. Since $\sin x/x$ is $1$, I got the answer as $x^3 + x$. But the correct answer was $-2x\sin(x^2 + 1)$. So please tell what mistake I made.

This is what I didThat -2 in the <span class=$2nd$ picture's first step is not being cut in that step ">

  • $\begingroup$ Please edit in your calculations in more detail so we can spot your mistake. $\endgroup$ – J.G. Jan 29 at 10:36
  • 3
    $\begingroup$ The correct answer is found by means of the chain-rule. Are you familiar with it? I cannot really follow your attempt. $\endgroup$ – drhab Jan 29 at 10:37
  • $\begingroup$ $\sin{x}/x=1$? Oh boy, you're in for trouble ... $\endgroup$ – Matti P. Jan 29 at 10:38
  • $\begingroup$ @MattiP. Maybe the OP means the limit of it if $x\to0$. $\endgroup$ – drhab Jan 29 at 10:39
  • 1
    $\begingroup$ @drhab The OP wants a solution from first principles, presumably because an educator requested it. $\endgroup$ – J.G. Jan 29 at 10:42

Since $\cos A-\cos B=-2\sin\frac{A-B}{2}\sin\frac{A+B}{2}$, your strategy should give$$\begin{align}\frac{d}{dx}\cos(x^2+1)&=\lim_{h\to0}\frac{\cos((x+h)^2+1)-\cos(x^2+1)}{h}\\&=\lim_{h\to0}\frac{-2\sin(hx+h^2/2)\sin(x^2+1+hx+h^2/2)}{h}\\&=-2\sin(x^2+1)\lim_{h\to0}\frac{\sin(hx+h^2/2)}{hx+h^2/2}\frac{hx+h^2/2}{h}\\&=-2\sin(x^2+1)\underbrace{\lim_{h\to0}\frac{\sin(hx+h^2/2)}{hx+h^2/2}}_{1}\cdot\underbrace{\lim_{h\to0}\frac{hx+h^2/2}{h}}_x,\end{align}$$which gets the right answer. In particular, the first underbraced limit is $1$ because, as $h\to0$, $hx+h^2/2\to0$.

  • $\begingroup$ +1 Pfff... Fortunately no requesting educators for me anymore :-). $\endgroup$ – drhab Jan 29 at 10:46
  • 1
    $\begingroup$ @drhab Quite. Whenever I see a "solve this but not the easy way" problem, half of me thinks, "why not just teach them the easy way before setting this problem?", but the other half thinks, "well, better to test their ingenuity than handle-turning". Besides, it can be instructive to see how little theory some problems really take, if one has a trick. $\endgroup$ – J.G. Jan 29 at 10:48

Not the answer you're looking for? Browse other questions tagged or ask your own question.