How do you integrate #int e^x cos x^2 dx #?
2 Answers
# int \ e^x (cosx)^2 \ dx = 1/2 e^x + 1/5 e^xsin2x +1/10 e^xcos2x + C#
Explanation:
Assuming that we seek:
# I = int \ e^x (cosx)^2 \ dx #
Then, using the identity
# I = int \ e^x (1+cos2x)/2 \ dx #
# \ \ = 1/2 \ int \ e^x (1+cos2x) \ dx #
# \ \ = 1/2 \ {int \ e^x \ dx + int \ e^x cos2x \ dx }# ..... [A]
The first integral is trivial, for the second we apply integration by parts:
Let
# { (u,=e^x, => (du)/dx,=e^x), ((dv)/dx,=cos2x, => v,=1/2 sin2x ) :}#
Then plugging into the IBP formula:
# int \ (u)((dv)/dx) \ dx = (u)(v) - int \ (v)((du)/dx) \ dx #
We have:
# int \ e^xcos2x \ dx = e^x1/2sin2x-int \ 1/2sin2x \ e^x \ dx #
# " " = 1/2 e^xsin2x - 1/2 \ int \ e^xsin2x \ dx # ..... [B]
Now if we perform a second application of Integration By Parts:
Let
# { (u,=e^x, => (du)/dx,=e^x), ((dv)/dx,=sin2x, => v,=-1/2 cos2x ) :}#
Then plugging into the IBP formula, we have:
# int \ e^xsin2x \ dx = e^x(-1/2cos2x)-int \ (-1/2cos2x) \ e^x \ dx #
# " " = -1/2 e^xcos2x + 1/2 \ int \ e^xcos2x \ dx # ..... [C]
Substituting result [C] into [B] we have:
# int \ e^xcos2x \ dx = 1/2 e^xsin2x - 1/2 {-1/2 e^xcos2x + 1/2 \ int \ e^xcos2x \ dx} #
# :. int \ e^xcos2x \ dx = 1/2 e^xsin2x +1/4 e^xcos2x -1/4 \ int \ e^xcos2x \ dx #
# :. 5/4 \ int \ e^xcos2x \ dx = 1/2 e^xsin2x +1/4 e^xcos2x #
# :. int \ e^xcos2x \ dx = 2/5 e^xsin2x +1/5 e^xcos2x #
Now, substituting this result into [A] and integrating we get:
# I = 1/2 \ {e^x + 2/5 e^xsin2x +1/5 e^xcos2x} + C#
# \ \ = 1/2 e^x + 1/5 e^xsin2x +1/10 e^xcos2x + C#
See below.
Explanation:
Assuming the question reads
Now
Now
and
so finally