Integration of sin^2(x)


by planck42
Tags: integration, sin2x
planck42
planck42 is offline
#1
Dec25-09, 09:35 PM
P: 83
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
Review: With Galaxy S5, Samsung proves less can be more
Making graphene in your kitchen
Study casts doubt on climate benefit of biofuels from corn residue
fourier jr
fourier jr is offline
#2
Dec25-09, 10:06 PM
P: 943
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
D H is offline
#3
Dec25-09, 10:13 PM
Mentor
P: 14,459
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
HallsofIvy is offline
#4
Dec26-09, 05:10 AM
Math
Emeritus
Sci Advisor
Thanks
PF Gold
P: 38,886

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
planck42 is offline
#5
Dec26-09, 08:14 AM
P: 83
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
amaresh92 is offline
#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
HallsofIvy is offline
#7
Dec27-09, 05:09 AM
Math
Emeritus
Sci Advisor
Thanks
PF Gold
P: 38,886
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
amaresh92 is offline
#8
Dec27-09, 10:33 AM
P: 162
can u explain the formula from where it is derived
D H
D H is offline
#9
Dec27-09, 11:00 AM
Mentor
P: 14,459
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