This morning I encountered the integral $\int \sin(2x)$. My initial approach to solving it went something like this:

$\int \sin(2x)\ dx=\int 2\sin(x)\cos(x)\ dx$ (by the $\sin(2x)=2\sin(x)\cos(x)$ identity)

Let $u=\sin(x)$ and it's derivative $\frac{du}{dx}=\cos(x)$

Rewrite the integral with respect to $u$ and take out the constant:$\int 2u\ du = 2 \int u\ du$

Solve using the power rule: $2\int u\ du = 2 \cdot \frac{u^2}{2}+C = u^2 + C$

Resubstitute in terms of $x$: $\sin^2(x)+C$

I then tried to verify my results using various integral calculators (namely Wolfram Alpha), but they gave me the result $\frac 12\cos(2x)+C$, which does make sense if you instead of using the trigonometric identity just pick your subsitution to be $u=2x$. Graphing the results however shows this: enter image description here It's quite clear that these results aren't equal to each other, no matter how you adjust the constants.

My question is, what is going on here? How come integrating the same functions using two different approaches yields results that are not the same function?

  • 1
    $\begingroup$ $\sin^2x=\frac12-\frac12\cos2x$. You lost a $-1$ somewhere. $\endgroup$ Nov 19 '17 at 11:17
  • $\begingroup$ Jesus, I need a pair of glasses.. You're right, I just didn't read the Wolfram Alpha result correctly. Thank you very much! $\endgroup$
    – Alvin L-B
    Nov 19 '17 at 11:22
  • $\begingroup$ So doing simple integrations is now down to reading Wolfie A accurately $\ddot\frown$. $\endgroup$ Nov 19 '17 at 11:26
  • $\begingroup$ Well, I did my first integration correctly. It just went wrong when I tried to verify it using Wolfram Alpha! $\endgroup$
    – Alvin L-B
    Nov 19 '17 at 11:29
  • $\begingroup$ The first move in checking an integration is to differentiate it & see what you get. $\endgroup$ Nov 19 '17 at 12:43

Lord Shark the Unknown spotted my mistake in the comments. The problem was that I had missed a minus sign when reading from Wolfram Alpha. The actual answer was $$\int \sin(2x)\ dx = -\frac{1}{2} \cos(2x)+C=\sin^2(x)+C$$ This makes the two solutions equal.


Just a nice point for a beginner- $$\int \cos (mx) dx=\frac{\sin(mx)}{m}+C$$


$$\int \sin (mx) dx=-\frac{\cos(mx)}{m}+C$$

So,while doing a standard integration of $f(x)$ in the form of $f(mx)$ where $m$ is a constant, you simply get $\frac{F(mx)}{m}+C$ where $F(x)$ is the antiderivative of $f(x)$.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.