Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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

share|cite|improve this question
You 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. – David Mitra Jun 16 '12 at 16:38
What is the "antiderivative"? – Overflowh Jun 16 '12 at 16:41
This question may help. – David Mitra Jun 16 '12 at 16:44
My usual comment: We're talking about evalutating an integral, not about "solving" an integral. One solves equations; one solves problems; one evaluates expressions. – Michael Hardy Jun 16 '12 at 16:52
@MichaelHardy I'm sorry.. I'm not familiar with mathematical english.. – Overflowh Jun 16 '12 at 17:18
up vote 3 down vote accepted

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*}$

share|cite|improve this answer
It's very clear and helpful! I was worried about recursive integration, but now It's really clear :) Thank you very much! – Overflowh Jun 16 '12 at 18:00

$\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}$$

share|cite|improve this answer
The other answers do not have your minus sign. – GEdgar Jun 16 '12 at 17:35
@NateEldredge — Thanks, corrected ! – Lierre Jun 16 '12 at 19:54
@GEdgar — Sorry, my fault, that's corrected. – Lierre Jun 16 '12 at 19:54
+1, I think this is by far the simplest solution. – Nate Eldredge Jun 16 '12 at 20:02


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)$)

share|cite|improve this answer

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 $$

share|cite|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.