0

When I integrate $\sin(2x)$ first using the trig substitution of $\sin(2x) = 2 \sin x\cos x$ and then using u-substitution I get $\sin^2(x) +C$. Integrating the same expression using u-substitution directly, I get $-\cos(2x)/2+C$.

These answers do not seem to be equivilent. When I let $x=0$ in the first example's answer I get $=0$ but when I let $x=0$ in the seccond answer I get $-1/2$.

Clearly I must be doing something wrong. If I had made these integrations definite integrals over $0$ to $\pi/2$ seems like I would have gotten different answsers.

Can you assist?

Gary
  • 31,845
user163862
  • 2,043
  • They are indeed equivalent. The constants don't need to be equal. Remember that $\cos(2x)=1-2\sin^2(x)$. – 1__ Feb 28 '21 at 19:00
  • $$
    • \frac{{\cos (2x)}}{2} + C = \frac{{1 - \cos (2x)}}{2} - \frac{1}{2} + C = \sin ^2 x - \frac{1}{2} + C = \sin ^2 x + C' .

    $$

    – Gary Feb 28 '21 at 19:01
  • I'm not sure why you say that the value of the definite integral from $0$ to $\pi/2$ differs between the two expressions: $$\sin^2\frac{\pi}{2}-\sin^20=1-0=1,$$ while $$-\frac{1}{2}\cos\left(2\frac{\pi}{2}\right)-\left(-\frac{1}{2}\cos(2\cdot0)\right)=-\frac{1}{2}(-1)-\left(-\frac{1}{2}\right)=1.$$ – Will Orrick Feb 28 '21 at 19:14

1 Answers1

0

See this related post. This is a commmon mistake while doing integration.

For example, if $f(x)=g(x)$, then would you say $\displaystyle \int f(x) \mathrm dx=\int g(x) \mathrm dx$?

Ray
  • 77