3
$\begingroup$

I want to solve the following integral. $$\int 4\sin(x)\cos(x)dx$$ Hence I continued this way: $$\int 4\sin(x)\cos(x)dx = -\int -2\sin(2x)dx =-\cos(2x)+c$$

However if I use Mathematica to solve it I obtain $$\int 4\sin(x)\cos(x)dx =-2\cos^2(x)+c$$ and if I ask Mathematica to solve $$\int 4\sin(x)\cos(x)dx = -\frac{1}{2}\cos(2x)+c$$

How can that $2$ change the result? What did I do wrong?

  • 2
    They are the same result, just with different constants of integration. See any trig identities for $\cos(2x)$ recently?2017-02-06
  • 0
    I don't see them so often anymore, should revise them better!2017-02-06

1 Answers 1

3

The two answers are both correct (except that the second should be $-\cos(2x)+C$), and are related by the identity $$ \cos^2x=\frac{1+\cos(2x)}{2}$$

The "missing" $\frac{1}{2}$ in this identity is absorbed into the constant $C$.

  • 0
    oh right, that was so stupid, thank you!!2017-02-06
  • 0
    No problem. By the way, the identity in my answer is a good one to remember, as it is useful in evaluating $\int \cos^2x\;dx$.2017-02-06