Register to reply

Integration of sin^2(x)

by planck42
Tags: integration, sin2x
Share this thread:
planck42
#1
Dec25-09, 09:35 PM
P: 82
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]

[tex]\sin^{2}x=-\frac{1}{2}-\frac{e^{2ix}+e^{-2ix}}{4}[/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?
Phys.Org News Partner Science news on Phys.org
Final pieces to the circadian clock puzzle found
A spray-on light show on four wheels: Darkside Scientific
How an ancient vertebrate uses familiar tools to build a strange-looking head
fourier jr
#2
Dec25-09, 10:06 PM
P: 948
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:
http://en.wikipedia.org/wiki/Trig_identities
D H
#3
Dec25-09, 10:13 PM
Mentor
P: 15,201
Quote Quote by planck42 View Post
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]

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

[tex]\sin^2 x = \frac {1-\cos 2x}2[/tex]

HallsofIvy
#4
Dec26-09, 05:10 AM
Math
Emeritus
Sci Advisor
Thanks
PF Gold
P: 39,682
Integration of sin^2(x)

Quote Quote by planck42 View Post
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]

[tex]\sin^{2}x=-\frac{1}{2}-\frac{e^{2ix}+e^{-2ix}}{4}[/tex]
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]


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?
planck42
#5
Dec26-09, 08:14 AM
P: 82
Quote Quote by HallsofIvy View Post
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]
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.
amaresh92
#6
Dec27-09, 03:14 AM
P: 162
the expansion for sin(x) which you have used is for hyperbolic function of sin(x) .
hyperbolic function of sin(x) is sin(hx).
HallsofIvy
#7
Dec27-09, 05:09 AM
Math
Emeritus
Sci Advisor
Thanks
PF Gold
P: 39,682
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].
amaresh92
#8
Dec27-09, 10:33 AM
P: 162
can u explain the formula from where it is derived
D H
#9
Dec27-09, 11:00 AM
Mentor
P: 15,201
Euler's formula,

[tex]e^{ix} = \cos x + i\sin x[/tex]


Register to reply

Related Discussions
Integration of dirac delta composed of function of integration variable Calculus & Beyond Homework 3
Integration problems. (Integration by parts) Calculus & Beyond Homework 5
Help with integration, involving integration by partial fractions. Calculus & Beyond Homework 3
Calc BC - Integration Problem involving Constants of Integration and Related Rates Calculus & Beyond Homework 5
Question arrising from integration homework (advanced integration i guess?) Calculus 9