Integration using Euler's formula: Difference between revisions

Content deleted Content added
No edit summary
Major revision
Line 1:
In [[integral calculus]], [[complex number]]s and [[Euler's formula]] may be used to evaluate [[integral]]s involving [[trigonometric functions]]. Using Euler's formula, any trigonometric function may be written in terms of ''e''<sup>''ix''</sup> and ''e''<sup>&minus;''ix''</sup>, and then integrated. This technique is often simpler and faster than using [[trigonometric identities]] or [[integration by parts]], and is sufficiently powerful to integrate any rational expression involving trigonometric functions.
{{Cleanup|date=August 2008}}
 
==Euler's formula==
Functions containing sine or cosine can be expressed as complex exponentials using
[[Euler's formula]]. states that
: <math>\int e^x{ix} = \cos x + i\,\sin dxx.</math>
Substituting &minus;''x'' for ''x'' gives the equation
Example: suppose we wanted to integrate:
: <math>\int e^x{-ix} = \cos x - i\,\sin dxx.</math>
These two equations can be solved for the sine and cosine:
: <math>\intcos e^x \cdot= \frac{e^{ix} + e^{-ix}}{2} \,quad\text{and}\quad\sin dxx = \frac{e^{ix}-e^{-ix}}{2i}.</math>
 
==Simple example==
: <math>\int e^x \cos x \, dx</math>
Consider the integral
: <math>\int e^x \mathrm{Re}\{ ecos^{ix}2 \}x \, dx.</math>
The standard approach to this integral is to use a [[half-angle formula]] to simplify the integrand. We shall use Euler's identity instead:
:<math>\begin{align}
\int \cos^2 x \, dx \,&=\, \int \left(\frac{e^{ix}+e^{-ix}}{2}\right)^2 dx \\[6pt]
&=\, \frac{1}{4}\int \left( e^{2ix} + 2 + e^{-2ix} \right) dx
\end{align}</math>
At this point, it would be possible to change back to real numbers using the formula ''e''<sup>2''ix''</sup>&nbsp;+&nbsp;''e''<sup>&minus;2''ix''</sup>&nbsp;=&nbsp;2&nbsp;cos&nbsp;2''x''. Alternatively, we can integrate the complex exponentials and not change back to trigonometric functions until the end:
:<math>\begin{align}
\frac{1}{4}\int \left( e^{2ix} + 2 + e^{-2ix} \right) dx
\,&=\, \frac{1}{4}\left(\frac{e^{2ix}}{2i} + 2x - \frac{e^{-2ix}}{2i}\right)+C \\[6pt]
&=\, \frac{1}{4}\left(2x + \sin 2x\right) +C
\end{align}</math>
Of course, this example is so simple that it's not very difficult to handle with standard trigonometric identities.
 
==Second example==
Then the cosine function can be expressed in its Euler form: <math>\cos \theta = \frac{e^{i\theta} + e^{-i\theta}}{2}</math>
Consider the integral
:<math>\int \sin^2 x \cos 4x \, dx.</math>
This integral would be extremely tedious to solve using trigonometric identities, but using Euler's identity makes it relatively painless:
:<math>\begin{align}
\int \sin^2 x \cos 4x \, dx \,
&=\, \int \left(\frac{e^{ix}+e^{-ix}}{2i}\right)^2\left(\frac{e^{4ix}+e^{-4ix}}{2}\right) dx \\[6pt]
&=\, -\frac{1}{8}\int \left(e^{2ix} + 2 + e^{-2ix}\right)\left(e^{4ix}+e^{-4ix}\right) dx \\[6pt]
&=\, -\frac{1}{8}\int \left(e^{6ix} + 2e^{4ix} + e^{2ix} + e^{-2ix} + 2e^{-4ix} + e^{-6ix}\right) dx.
\end{align}</math>
At this point we can either integrate directly, or we can first change the integrand to cos&nbsp;6''x''&nbsp;+&nbsp;2&nbsp;cos&nbsp;4''x''&nbsp;+&nbsp;cos&nbsp;2''x'' and continue from there.
Either method gives
:<math>\int \sin^2 x \cos 4x \, dx \,=\, -\frac{1}{48}\sin 6x - \frac{1}{16}\sin 4x - \frac{1}{16}\sin 2x + C.</math>
 
==Using real parts==
: <math>\int e^x \cdot \frac{e^{ix} + e^{-ix}}{2} \, dx</math>
In addition to Euler's identity, it can be helpful to make judicious use of the [[real part]]s of complex expressions. For example, consider the integral
: <math>{1\over 2} \int e^{x(1+i)} +\cos e^{x(1-i)} \, dx.</math>
Since cos&nbsp;''x'' is the real part of ''e''<sup>''ix''</sup>, we know that
: <math>\mathrm{Re}int e^x \leftcos x \{, dx \,=\, \operatorname{Re}\int e^x e^{ix} \, dx \right\}.</math>
The integral on the right is easy to evaluate:
:<math>\int e^x e^{ix} \, dx \,=\, \int e^{(1+i)x}\,dx \,=\, \frac{e^{(1+i)x}}{1+i} + C.</math>
Thus:
:<math>\begin{align}
\int e^x \cos x \, dx \,&=\, \operatorname{Re}\left\{\frac{e^{(1+i)x}}{1+i}\right\} + C \\[6pt]
&=\, e^x\operatorname{Re}\left\{\frac{e^{ix}}{1+i}\right\} +C \\[6pt]
&=\, e^x\operatorname{Re}\left\{\frac{e^{ix}(1-i)}{2}\right\} +C \\[6pt]
&=\, e^x\,\frac{\cos x + \sin x}{2} +C.
\end{align}
</math>
 
==Rational expressions==
: <math>{1\over 2} \int e^{x(1+i)} + e^{x(1-i)} \, dx</math>
In general, this technique may be used to evaluate any rational expression involving trigonometric functions. For example, consider the integral
 
: <math>=\int e\frac{1+\cos^2 x \mathrm{Re}\left\{ \cos x + i\cdotcos \sin x \right\3x} \, dx.</math>
This is far easier to integrate.
Using Euler's identity, this integral becomes
 
:<math>\frac{1}{2}\int \frac{6 + e^{2ix} + e^{-2ix} }{e^{ix} + e^{-ix} + e^{3ix} + e^{-3ix}} \, dx.</math>
Alternatively, we may also take note of real and imaginary portions of complex numbers
If we now make the [[integration by substitution|substitution]] ''u''&nbsp;=&nbsp;''e''<sup>''ix''</sup>, the result is the integral of a [[rational function]]:
 
:<math>\frac{1}{2}\int \frac{6 + u^2 + u^{-2}}{u + u^{-1} + u^3 + u^{-3}}\,\frac{du}{iu}
Cosine is the real portion of a complex number written in cos&nbsp;''x''&nbsp;+&nbsp;''i''&nbsp;sin&nbsp;''x'' form.
\,=\, \frac{1}{2i}\int \frac{1+6u^2 + u^4}{1 + u^2 + u^4 + u^6}\,du.</math>
 
Any rational function is integrable (using, for example, [[partial fractions in integration|partial fractions]]), and therefore any rational expression involving trigonometric functions may be integrated as well.
: <math>\int e^x \cos x \, dx</math>
 
: <math>=\int e^x \mathrm{Re}\left\{ \cos x + i\cdot \sin x \right\} \, dx</math>
 
: <math>\int e^x \mathrm{Re}\{ e^{ix} \} \, dx</math>
 
: <math>\mathrm{Re}\left\{ \int e^x e^{ix} \, dx \right\}</math>
 
: <math>\mathrm{Re}\left\{ \int e^{(i+1)x} \, dx \right\}</math>
 
This calculation continues as:
 
: <math>=\mathrm{Re}\left\{ \frac{1}{1+i}\ e^{(1+i)x} \right\}</math>
 
: <math>=\mathrm{Re}\left\{ \left(\frac{1}{2}\ - i\frac{1}{2}\right)e^x(\cos x +i\sin x) \right\}</math>
 
=Re 1/2 exp(x) cos(x)+1/2 i exp(x) sin(x)-1/2*i exp(x) cos(x)+1/2 exp(x) sin(x)
 
=1/2 exp(x) cos(x) + 1/2 exp(x) sin(x)
 
[[Category:Integral calculus]]
 
{{math-stub}}
 
[[bs:Integracija trigonometrijskih proizvoda kao kompleksnih eksponencijala]]