<s>[INST] What's the problem with differentiating $y = \sin(x^2)$ by applying the limit definition of a derivative directly? I was taking the derivative of $y = \sin(x^2)$. I know that we can solve it by applying chain rule, but i tried without any rules, just like a normal method. This is what i did:
$$\frac{\sin((x + h)^2) - \sin((x)^2)}{h}$$
Is this method correct? If not, then why? Because wherever I search for the derivative of $y = \sin(x^2)$, none did like this. And also I am not able to come to the proper answer which is $2x\cos(x^2)$ through that method.
Can somebody help me!
 [/INST] This is OK,
but the chain rule is easier.
Continue like this,
using $\sin(x) = x+O(x^3),
\cos(x) = 1-x^2/2+O(x^2)$
for small $x$:
$\begin{array}\\
\Delta_h(\sin(x^2))
&=\dfrac{\sin((x + h)^2) - \sin((x)^2)}{h}\\
&=\dfrac{\sin(x^2+2hx+h^2) - \sin(x^2)}{h}\\
&=\dfrac{\sin(x^2)\cos(2hx+h^2)+\cos(x^2)\sin(2hx+h^2) - \sin(x^2)}{h}\\
&=\dfrac{\sin(x^2)(\cos(2hx+h^2)-1)+\cos(x^2)\sin(2hx+h^2)}{h}\\
&=\dfrac{\sin(x^2)(\cos(2hx+h^2)-1)}{h}+\dfrac{\cos(x^2)\sin(2hx+h^2)}{h}\\
&\approx\dfrac{\sin(x^2)((1-(2hx+h^2)^2/2-1)}{h}+\dfrac{\cos(x^2)(2hx+O(h^2)}{h}\\
&=\dfrac{-\sin(x^2)((2hx+h^2)^2/2}{h}+\dfrac{\cos(x^2)(2hx+O(h^2)}{h}\\
&=-\sin(x^2)(h(2x+h)^2/2+2x\cos(x^2)+O(h)\\
&\to 2x\cos(x^2)\\
\end{array}
$
</s>