Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Integration of sin^2(x)

  1. Dec 25, 2009 #1
    Could somebody please check my work on the integration of [tex]sin^{2}x dx[/tex]? Thank you for your time.

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

    [tex]\sin x=\frac{e^{ix}-e^{-ix}}{2i}[/tex]


    Second step: Integrate the complex function

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

    [tex]\mbox{However,} \frac{e^{2ix}-e^{-2ix}}{2i} = \sin(2x), \mbox{so}[/tex]
    [tex]-\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?}[/tex]

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

    [tex]\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.}[/tex]

    Where is the error in the above process?
  2. jcsd
  3. Dec 25, 2009 #2
    I don't think it's that complicated. I would just use the identity [itex]\sin^2x = \frac{1}{2}(1 - \cos2x)[/itex]. that's probably what I would use if I had to reduce (& integrate) any even power of sin or cos, since [itex]\cos^2x = \frac{1}{2}(1 + \cos2x)[/itex]. look at all the other trig identities on wiki:
    Last edited: Dec 25, 2009
  4. Dec 25, 2009 #3

    D H

    User Avatar
    Staff Emeritus
    Science Advisor

    Check this step again. Does this agree with the identity

    [tex]\sin^2 x = \frac {1-\cos 2x}2[/tex]
  5. Dec 26, 2009 #4


    User Avatar
    Science Advisor

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

  6. Dec 26, 2009 #5
    Wow. What a simple error to overlook. So the final answer is
    [tex]-\frac{1}{4}\sin(2x)+\frac{1}{2}x+C[/tex] which does differentiate to [tex]\sin^{2}x[/tex]

    Thank you.
  7. Dec 27, 2009 #6
    the expansion for sin(x) which you have used is for hyperbolic function of sin(x) .
    hyperbolic function of sin(x) is sin(hx).
  8. Dec 27, 2009 #7


    User Avatar
    Science Advisor

    No, he has used the correct formula:
    [tex]sin(x)= \frac{e^{ix}- e^{-ix}}{2i}[/tex]

    The corresponding formula for sinh(x) is
    [tex]sinh(x)= \frac{e^x- e^{-x}}{2}[/tex].
  9. Dec 27, 2009 #8
    can u explain the formula from where it is derived
  10. Dec 27, 2009 #9

    D H

    User Avatar
    Staff Emeritus
    Science Advisor

    Euler's formula,

    [tex]e^{ix} = \cos x + i\sin x[/tex]
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook