Could someone show me how to solve this integral? $$\int_0^{\frac{\pi}{2}} e^{x+2}\sin(x) \,dx$$ I think that it's improper, but I'm not sure.
I tried to solve by parts, but first I sobstitute $$e^{x+2} = u$$ And this is what I obtained: $$\int{u\sin(\log(u) - 2)\frac{1}{u}}\,du$$ And at this point, integrating by part seems easy, but...
Could you help me? Maybe avoiding to follow the way that uses WolframAlpha because I don't know that method. Thanks in advance
Evaluating $\int_{0}^{\frac{\pi}{2}} e^{x+2}\sin(x) \,dx$
-
2You can simplify matters a tad by writing $e^{x+2}=e^x\cdot e^2$ and factoring out $e^2$ from the integral. To find the antiderivative of $e^x\sin x$, integrate by parts twice. This will give you an equation with the desired antiderivative as the variable. Once you find the antiderivative, you can then compute the definite integral. – 2012-06-16
-
0What is the "antiderivative"? – 2012-06-16
-
0The indefinite integral $\int e^x\sin x\, dx$. Use $u=e^x$ and $dv=\sin x\,dx$ for the first integration by parts. – 2012-06-16
-
1[This question](http://math.stackexchange.com/questions/155706/solving-int-e2x-sin-3x-dx) may help. – 2012-06-16
-
2My usual comment: We're talking about _evalutating_ an integral, not about "solving" an integral. One _solves_ equations; one _solves_ problems; one _evaluates_ expressions. – 2012-06-16
-
1@MichaelHardy I'm sorry.. I'm not familiar with mathematical english.. – 2012-06-16
4 Answers
We can compute the indefinite integral first, and then apply Barrow's rule. We start by factoring out $e^2$, since it's a constant factor.
$\displaystyle \int e^{x+2}\sin x \,dx = e^2 \int e^x \sin x \,dx $
To evaluate $\int e^x \sin x \,dx$, we perform integration by parts $\int u \,dv = uv - \int v \,du$, with $u=e^x$ and $dv = \sin x \,dx$ first, and then again with $u = e^x$, $dv = \cos x \,dx$.
$\begin{align*} \int e^x \sin x \,dx &= - e^x \cos x - \int e^x (-\cos x) \,dx = -e^x \cos x + \int e^x \cos x \,dx = \\ &= - e^x \cos x + \big( e^x \sin x - \int e^x \sin x \,dx \big) = - e^x \cos x + e^x \sin x - \int e^x \sin x \,dx \end{align*}$
Note that we get back the original integral, so we can solve for it. This is sometimes called a cyclic integral.
$\displaystyle 2 \int e^x \sin x \,dx = e^x (\sin x - \cos x)$, and then $\displaystyle \int e^x \sin x \,dx = \frac{1}{2} e^x(\sin x - \cos x)$.
Finally, we have, with Barrow's rule:
$\begin{align*} \int_0^{\pi/2} e^{x+2}\sin x \,dx &= e^2 \int_0^{\pi/2} e^x \sin x \,dx = e^2\big(\frac{1}{2} e^x(\sin x - \cos x)\big|_0^{\pi/2}\big) \\ &= e^2 \big( \frac{1}{2}e^{\pi/2}(\sin {\frac{\pi}{2}} - \cos {\frac{\pi}{2}}) - \frac{1}{2}e^0(\sin 0 - \cos 0)\big) \\ &= \frac{1}{2}e^2 \big(e^{\pi/2}(1 - 0) - (0 - 1)\big) = \frac{1}{2}e^2(1+e^{\pi/2}) \end{align*}$
-
1It's very clear and helpful! I was worried about recursive integration, but now It's really clear :) Thank you very much! – 2012-06-16
$\sin(x) = \Im(e^{ix})$, so $$\begin{aligned} \int_0^{\pi/2} e^{x+2}\sin(x) \mathrm d x &= \Im\left(\int _0^{\pi/2} e^{2+(1+i)x} \mathrm d x\right)\\ &=e^2 \cdot \Im\left(\frac{i e^{\pi/2} - 1}{1+i}\right)\\ &= \frac{e^2}{2}(e^{\pi/2} +1 ). \end{aligned}$$
-
0The other answers do not have your minus sign. – 2012-06-16
-
0@NateEldredge — Thanks, corrected ! – 2012-06-16
-
0@GEdgar — Sorry, my fault, that's corrected. – 2012-06-16
$$\int_{0}^{\frac{\pi}{2}}{e^{x}\sin(x)}dx=e^\frac{\pi}{2}+1+\int_0^\frac{\pi}{2}e^x\cos(x)dx=e^\frac{\pi}{2}+1-\int_0^\frac{\pi}{2}e^x\sin(x)dx$$
Then $$\int^\frac{\pi}{2}_0e^x\sin(x)dx=\frac{e^\frac{\pi}{2}+1}{2}$$
And so $$\int^\frac{\pi}{2}_0e^{x+2}\sin(x)dx=e^2\left(\frac{e^\frac{\pi}{2}+1}{2}\right)$$
(The first step is an integration per parts with $u=e^x$ and $v'=\sin(x)$ and the second step is an other ipp with $u=e^x$ and $v'=\cos(x)$)
Integrating by parts, we let $u = e^{x+2}$, $dv = \sin(x) \ dx$. Then $du = e^{x+2} \ dx$ and $v = -\cos(x)$, and so
$$ \int_0^{\frac\pi2}e^{x+2}\sin(x)\ dx = \left.-e^{x+2}\cos(x)\right|_0^{\frac\pi2} - \int_0^{\frac\pi2}e^{x+2}(-\cos(x)) \ dx $$ $$ = \left.-e^{x+2}\cos(x)\right|_0^{\frac\pi2} + \int_0^{\frac\pi2}e^{x+2}\cos(x) \ dx = \left.-e^{x+2}\cos(x)\right|_0^{\frac\pi2} + I $$
Now we concentrate on $I = \int_0^{\frac\pi2}e^{x+2}\cos(x) \ dx$. Again, letting $u = e^{x+2}$ and $dv = \cos(x) \ dx$, we have that $du = e^{x+2} \ dx$ and $v = \sin(x)$.
$$ I = \int_0^{\frac\pi2}e^{x+2}\cos(x) \ dx = \left.e^{x+2}\sin(x)\right|_0^{\frac\pi2} - \int_0^{\frac\pi2}e^{x+2}\sin(x) \ dx $$
Substituting what we have so far,
$$ \int_0^{\frac\pi2}e^{x+2}\sin(x)\ dx = \left.-e^{x+2}\cos(x)\right|_0^{\frac\pi2} + I $$ $$= \left.\left(-e^{x+2}\cos(x) + e^{x+2}\sin(x)\right)\right|_0^{\frac\pi2} - \int_0^{\frac\pi2}e^{x+2}\sin(x) \ dx $$
Now rearranging the terms, we have that
$$ 2\int_0^{\frac\pi2}e^{x+2}\sin(x)\ dx = \left.\left(-e^{x+2}\cos(x) + e^{x+2}\sin(x)\right)\right|_0^{\frac\pi2} $$
and so
$$ \int_0^{\frac\pi2}e^{x+2}\sin(x)\ dx = \left.\frac12e^{x+2}\left(\sin(x) - \cos(x)\right)\right|_0^{\frac\pi2} =\frac12e^{\frac\pi2 + 2} + \frac12e^2 $$