Evaluating $\int_{0}^{\frac{\pi}{2}} e^{x+2}\sin(x) \,dx$ 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
 A: 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*}$
A: $\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}$$
A: $$\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)$)
A: 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
$$
