I am having some trouble with some questions I am solving. I am aware they are simple; as I used to solve them without proof back in high school. Now since I am studying Mathematics I need to prove their work.
Question is: Use the definition of a derivative to calculate the derivative of $f(x)=x^2\cos x$ at $x=0$.
I know the answer is $f'(x)=2x\cos x-x^2\sin x$. I just can't prove it.
I know I have to use $f'(x)=lim x-> 0$ $(f(x)-f(0))/(x-0)$ since that is the definition. I get $f'(x)=\frac{x^2\cos x-0}x$ by doing that.
How do I go on with this question?
You are on the right track. You just missed the limit part.
When you are calculating the derivative of a function $f(x)$, you don't just calculate $f'(x)|_{x=x_0}=\frac{f(x_0+h)-f(x_0)}{(x_0+h)-(x_0)}$. Rather, you have to compute the following limit:
$$f'(x)|_{x=x_0}=\color{red}{\lim_\limits{h\to 0}}\frac{f(x_0+h)-f(x_0)}{(x_0+h)-(x_0)}$$
In this case, $f(x)=x^2 \cos x$
Hence, the derivative will be $$f'(x)|_{x=0}=\lim_\limits{h\to 0}\frac{f(0+h)-f(0)}{(0+h)-0}$$ $$=\lim_\limits{h\to 0}\frac{h^2 \cos h - 0}{h}$$ $$=\lim_\limits{h\to 0}(h \cos h)$$ $$=\left(\lim_\limits{h\to 0}h\right) \cdot \left(\lim_\limits{h\to 0}\cos h \right)$$ $$=0 \times 1 = 0$$
This is totally as per the definition of a derivative.
Hope this helps you.