2

I want to know how to derive this function. Can someone explain the steps? I know most derivative rules but I'm clearly not seeing how this works:

$$\frac{d}{dx}(\ x^2cos(x)) = x(2\cos(x) - x\sin(x))$$

If you could help me to understand which rules are used (even very basic ones).

2 Answers2

6

They used the product rule $\dfrac{d}{dx}\left(f(x)\cdot g(x)\right) = f'(x)\cdot g(x) + f(x)\cdot g'(x)$. One reason why you might not recognize the answer given is because it has been factored after doing the derivative. If you do the math, then you should get

$$\begin{align} \dfrac{d}{dx}(x^2\cos x) &= \dfrac{d}{dx}(x^2)\cdot \cos x + x^2 \cdot \dfrac{d}{dx}(\cos x) \\ &= 2x\cos x - x^2\sin x \\ &= x(2\cos x - x\sin x) \end{align}$$

They also used the power rule $\dfrac{d}{dx}(x^n) = nx^{n-1}$ and the fact that $\dfrac{d}{dx}(\cos x) = -\sin x$.

John Habert
  • 4,001
1

$$\frac{d}{dx}\left(x^2\cos(x)\right)=2x\cos(x)-x^2\sin(x)\tag{By product rule}$$

$$2x\cos(x)-x^2\sin(x)=x(2\cos(x)-x\sin(x))$$

I have a hunch that you got the first answer, but didn't factor it.

And here is a proof for the product rule

$$\lim_{h\to0}\frac{f(x+h)g(x+h)-f(x)g(x)}{h}$$

$$=\lim_{h\to0}\frac{f(x+h)g(x+h)+\color{red}{f(x+h)g(x)-f(x+h)g(x)}-f(x)g(x)}{h}$$

$$=\lim_{h\to0}\frac{f(x+h)(g(x+h)-g(x))}{h}+\frac{g(x)(f(x+h)-f(x))}{h}$$

$$=f(x)g'(x)+f'(x)g(x)$$

Guy
  • 8,857
  • 1
  • 28
  • 57
  • Not sure whether you can split the limits without justification like that. That sort of concern makes me prefer real infinitesimals. Also, I think there's a typo in there: in the last limit, shouldn't it be $f(x)$ instead of $f(x+h)$? +1 though, this is the kind of thing it seems the OP was looking for. – JMCF125 Mar 20 '14 at 22:32
  • @JMCF125 as long as $f(x)$ is continuous $f(x+h)=f(x)$ also you can split the limit as long as both $f'(x)$ and $g'(x)$ exist. – Guy Mar 21 '14 at 03:49
  • How is $f(x)=f(x+h)$? Then $f(x+h)-f(x)=0,\ \forall\ \text{continuous}\ f$, and the definition of derivative would be meaningless. – JMCF125 Mar 21 '14 at 11:58
  • 1
    @JMCF125 I meant to say $f(x+h)-f(x)\to 0$ for continuous $f$ which does hold. For rigorous interpretation the last line should be $$f(x+h)g'(x)+f'(x)g(x)\=f(x)g'(x)+g(x)f'(x)+g(x)f'(x)h$$ The last term can be ignored of course. – Guy Mar 21 '14 at 12:08
  • We get that by writing $f(x+h)=f(x)+f'(x)h$ – Guy Mar 21 '14 at 12:08
  • 1
    Indeed you are right. Still $f(x+h)\to f(x)$, not $=$. Thanks for replying. – JMCF125 Mar 21 '14 at 12:16
  • 1
    @JMCF125 I was using equality loosely. Pressing one key is easier than $\to$ which is 5 key presses. Oh how the lazy are cursed. – Guy Mar 21 '14 at 12:20