Is this Integration of sin^2(x) Correct?

  • Thread starter Thread starter planck42
  • Start date Start date
  • Tags Tags
    Integration
planck42
Messages
82
Reaction score
0
Could somebody please check my work on the integration of sin^{2}x dx? Thank you for your time.

First step: Complexify the function in order to make straight integration possible

\sin x=\frac{e^{ix}-e^{-ix}}{2i}

\sin^{2}x=-\frac{1}{2}-\frac{e^{2ix}+e^{-2ix}}{4}Second step: Integrate the complex function

-\frac{1}{4}\int{2+e^{2ix}+e^{-2ix} dx} = -\frac{1}{4}(2x+\frac{e^{2ix}}{2i}-\frac{e^{-2ix}}{2i}+C)

\mbox{However,} \frac{e^{2ix}-e^{-2ix}}{2i} = \sin(2x), \mbox{so}
-\frac{1}{4}(2x+\frac{e^{2ix}}{2i}-\frac{e^{-2ix}}{2i}+C) = -\frac{\frac{1}{2}\sin(2x)+x}{2}+C, \mbox{which appears to be the answer. Can it survive the derivative test?}Third step: Take the derivative of -\frac{\frac{1}{2}\sin(2x)+x}{2}+C and see if it equals \sin^{2}x

\frac{d}{dx}(-\frac{\frac{1}{2}\sin(2x)+x}{2}+C)=-\frac{1}{2}-\frac{1}{2}\cos(2x)=-\frac{1}{2}(1+\cos(2x))=-\cos^{2}x \mbox{, which is the answer less one.}

Where is the error in the above process?
 
Physics news on Phys.org
I don't think it's that complicated. I would just use the identity \sin^2x = \frac{1}{2}(1 - \cos2x). that's probably what I would use if I had to reduce (& integrate) any even power of sin or cos, since \cos^2x = \frac{1}{2}(1 + \cos2x). look at all the other trig identities on wiki:
http://en.wikipedia.org/wiki/Trig_identities
 
Last edited:
planck42 said:
Could somebody please check my work on the integration of sin^{2}x dx? Thank you for your time.

First step: Complexify the function in order to make straight integration possible

\sin x=\frac{e^{ix}-e^{-ix}}{2i}

\sin^{2}x=-\frac{1}{2}-\frac{e^{2ix}+e^{-2ix}}{4}
Check this step again. Does this agree with the identity

\sin^2 x = \frac {1-\cos 2x}2
 
planck42 said:
Could somebody please check my work on the integration of sin^{2}x dx? Thank you for your time.

First step: Complexify the function in order to make straight integration possible

\sin x=\frac{e^{ix}-e^{-ix}}{2i}

\sin^{2}x=-\frac{1}{2}-\frac{e^{2ix}+e^{-2ix}}{4}
You have a sign error.
\left(\frac{e^{ix}- e^{-ix}}{2i}\right)^2= -\frac{1}{4}\left({e^{2ix}- 2+ e^{-2ix}\right)
= \frac{1}{2}- \frac{e^{2ix}+ e^{-2ix}}{4}


Second step: Integrate the complex function

-\frac{1}{4}\int{2+e^{2ix}+e^{-2ix} dx} = -\frac{1}{4}(2x+\frac{e^{2ix}}{2i}-\frac{e^{-2ix}}{2i}+C)

\mbox{However,} \frac{e^{2ix}-e^{-2ix}}{2i} = \sin(2x), \mbox{so}
-\frac{1}{4}(2x+\frac{e^{2ix}}{2i}-\frac{e^{-2ix}}{2i}+C) = -\frac{\frac{1}{2}\sin(2x)+x}{2}+C, \mbox{which appears to be the answer. Can it survive the derivative test?}


Third step: Take the derivative of -\frac{\frac{1}{2}\sin(2x)+x}{2}+C and see if it equals \sin^{2}x

\frac{d}{dx}(-\frac{\frac{1}{2}\sin(2x)+x}{2}+C)=-\frac{1}{2}-\frac{1}{2}\cos(2x)=-\frac{1}{2}(1+\cos(2x))=-\cos^{2}x \mbox{, which is the answer less one.}

Where is the error in the above process?
 
HallsofIvy said:
You have a sign error.
\left(\frac{e^{ix}- e^{-ix}}{2i}\right)^2= -\frac{1}{4}\left({e^{2ix}- 2+ e^{-2ix}\right)
= \frac{1}{2}- \frac{e^{2ix}+ e^{-2ix}}{4}

Wow. What a simple error to overlook. So the final answer is
-\frac{1}{4}\sin(2x)+\frac{1}{2}x+C which does differentiate to \sin^{2}x

Thank you.
 
the expansion for sin(x) which you have used is for hyperbolic function of sin(x) .
hyperbolic function of sin(x) is sin(hx).
 
No, he has used the correct formula:
sin(x)= \frac{e^{ix}- e^{-ix}}{2i}

The corresponding formula for sinh(x) is
sinh(x)= \frac{e^x- e^{-x}}{2}.
 
can u explain the formula from where it is derived
 
Euler's formula,

e^{ix} = \cos x + i\sin x
 
Back
Top