1

I'm trying to solve $\frac{d}{dx} \left(c + x^2 + \frac{1}{2} \cos(2x) \right)$ but I'm stuck at the part that uses the chain rule to find the derivative of $\cos(2x)$.

My solution considers that $\frac{d}{dx} (\cos(2x))$ is $-2 \cdot \cos(2x)$, but Wolfram Alpha's solution is diferent. Why?

(http://s21.postimage.org/snx1vcrs7/Wolfram_Alpha_derivative_of_x2_12cos2x_c_2013.png)

Thanks

haunted85
  • 1,418
juliano.net
  • 321
  • 3
  • 14

2 Answers2

2

The chain rule says that $(f(g(x)))'=f'(g(x))g'(x)$. For $\cos(2x)$, your $f(x)=\cos(x), g(x)=2x$. But $(cos(x))'=-\sin(x)$ so it should be $-2\sin(2x)$ in agreement with Alpha

robjohn
  • 345,667
Ross Millikan
  • 374,822
  • @JulianoNunesSilvaOliveira: this is the $g'(x)$ from the chain rule. Intuitively, $2x$ changes twice as fast as $x$, so the change in $\cos(2x)$ is twice as fast as the change in $\cos(x)$ – Ross Millikan Mar 11 '13 at 17:30
  • Why Alpha transformed \frac{1}{2}(\frac{d}{dx} (cos (2x))) into -\frac{1}{2}(sin (2x))(\frac{d}{dx}(2x)) instead of -\frac{1}{2}(-2sin(2x))? I mean, after solving \frac{d}{dx} (cos (2x)) why it still had another derivative to solve? [EDITED TO INCLUDE LaTeX CODE] – juliano.net Mar 11 '13 at 17:35
  • @JulianoNunesSilvaOliveira: You need to put the $\LaTeX$ between dollar signs to make it render. – Ross Millikan Mar 11 '13 at 17:46
  • Sorry, I didn't know that.
    Why Alpha transformed $\frac{1}{2}(\frac{d}{dx} (cos (2x)))$ into $-\frac{1}{2}(sin (2x))(\frac{d}{dx}(2x))$ instead of -$\frac{1}{2}(-2sin(2x))$? I mean, after solving $\frac{d}{dx} (cos (2x))$ why it still had another derivative to solve? [RE-REPOSTED TO INCLUDE LaTeX CODE]
    – juliano.net Mar 11 '13 at 18:27
  • @JulianoNunesSilvaOliveira: see my first comment on this answer. It is the $g'(x)$ term – Ross Millikan Mar 11 '13 at 19:16
  • I'm solving it this way: $\frac{d}{dx}(x^2) + \frac{1}{2}(\frac{d}{dx} cos(2x)) + \frac{d}{dx}(C)$, using the chain rule to find the derivative of $\frac{1}{2}(\frac{d}{dx} cos(2x))$: $u = 2x$, $\frac{du}{dx}=2x$, $y = cos(u)$, $\frac{dy}{du} = cos(u) = -sin(u)$, $\frac{dy}{dx} = \frac{dy}{du} * \frac{du}{dx}$, then $\frac{dy}{dx} = -2*sin(2x)$. (Next steps ommited) Is this right? I'm not getting the same final solution as Wolfram Alpha. – juliano.net Mar 12 '13 at 17:55
  • @JulianoNunesSilvaOliveira: You now have the same solution as Alpha. Some of the time you had cos instead of sin, and some of the time you were missing the $2$ in front, but this is correct. – Ross Millikan Mar 12 '13 at 20:29
1

You forgot to differentiate the $\cos$.

If $h(x) = f(g(x))$, the chain rule is $\frac{d}{dx} h(x) = \frac{d}{dx} f(g(x)) \frac{d}{dx} g(x)$.

In your case, $g(x) = 2x, f(x) = \cos (2x)$. The formula gives $-\sin(2x) (2)$.

copper.hat
  • 172,524