planck42
- 82
- 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?
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?