how to find derivative of $x^2\sin(x)$ using only the limit definition of a derivative I'm trying to find the derivative of $x^2\sin x$ using only the limit definition of a derivative.  I've tried two approaches, one using the difference quotient and another with the regular $x-a$ formula. 
I'm stumped on both approaches and not sure where to go. Maybe I'm on the wrong track completely. The difference quotient gets messy quickly and I can't figure out how to factor out $h$ to get it into a definable form. So then I tried: $$\frac{x^2\sin(x) - a^2\sin(a)}{x-a}$$ 
Is it possible to apply the trig sum-to-product form to the numerator?  I'm really just guessing playing around with identities trying to figure this out.  Any tips would be appreciated! 
 A: \begin{align*}
&\dfrac{(x+h)^{2}\sin(x+h)-x^{2}\sin x}{h}\\
&=\dfrac{(x+h)^{2}\sin(x+h)-x^{2}\sin(x+h)+x^{2}\sin(x+h)-x^{2}\sin x}{h}\\
&=\dfrac{((x+h)^{2}-x^{2})\sin(x+h)}{h}+\dfrac{x^{2}(\sin(x+h)-\sin x)}{h}\\
&=\dfrac{(2hx+h^{2})\sin(x+h)}{h}+\dfrac{x^{2}(\sin x\cos h+\cos x\sin h-\sin x)}{h}\\
&=(2x+h)\sin(x+h)+x^{2}\cdot\dfrac{\cos h-1}{h}+x^{2}\cos x\cdot\dfrac{\sin h}{h}\\
&\rightarrow 2x\sin x+x^{2}\cos x.
\end{align*}
A: For limits of products, you always need to add a and subtract. In this case, $a^2\sin x$. Then 
\begin{align} 
\frac{x^2\sin x - a^2\sin a}{x-a}&=
\frac{x^2\sin x - a^2\sin x}{x-a} 
+
\frac{a^2\sin x- a^2\sin a}{x-a}\\ 
&=
\frac{x^2 - a^2}{x-a}\, \sin x
+
a^2\,\frac{\sin x - \sin a}{x-a}. 
\end{align} 
A: \begin{equation}
\begin{split}
\frac{d}{dx}(x^2\sin )\mid_{x=a}&=\lim_{x\rightarrow a} \frac{x^2\sin x-a^2\sin a}{x-a}\\
&=\lim_{x\rightarrow a} \frac{x^2\sin x-a^2\sin x}{x-a}+\frac{a^2\sin x-a^2\sin a}{x-a} \\
&=\lim_{x\rightarrow a} \sin (x)\cdot (x+a)+a^2\frac{\sin ((x-a)+a)-\sin a}{x-a}\\
&=2a\sin a+a^2\cdot \lim_{x\rightarrow a}\frac{\sin (x-a)\cos a+\cos(x-a)\sin a-\sin a}{x-a}\\
&=2a\sin a+a^2\cdot \lim_{x\rightarrow a}\cos a\cdot \frac{\sin(x-a)}{x-a}+\cos a\cdot\frac{\cos(x-a)-1}{x-a}\\
&=2a\sin a+a^2(\cos a\cdot 1+\cos a\cdot0)\\
&=2a\sin a+a^2\cos a\\
\end{split}
\end{equation}
