# Evaluate the following Integral (II)

#### shamieh

##### Active member
Evaluate the following integral

I think this is a recursion type problem, but I'm not quite sure. Again, I could be going about this problem horribly. Just need someone to check to see if this is the correct answer or if I'm even close to doing this problem right.

$$\displaystyle \int sin(x) e^x \, dx$$

$$\displaystyle u = sinx$$
$$\displaystyle du = cosx dx$$

$$\displaystyle dv = e^x$$
$$\displaystyle v = e^x$$

$$\displaystyle sinx e^x - \int e^x cosx \,dx$$

$$\displaystyle u = e^x$$
$$\displaystyle du = e^x$$

$$\displaystyle dv = -sinx$$
$$\displaystyle v = cosx$$

$$\displaystyle sinx e^x - e^x cos x - \int cosx e^x dx$$

$$\displaystyle u = cosx$$
$$\displaystyle du = -sinx$$

$$\displaystyle dv = e^x$$
$$\displaystyle v = e^x$$

$$\displaystyle I = sinx e^x - cosx e^x - cosx e ^x + \int e^x sinx \, dx$$

$$\displaystyle 2I = sinx e^x - 2cosx e^x$$

$$\displaystyle I = \frac{sinx e^x - 2cosx e^x}{2}$$

Last edited:

#### Prove It

##### Well-known member
MHB Math Helper
Evaluate the following integral

I think this is a recursion type problem, but I'm not quite sure. Again, I could be going about this problem horribly. Just need someone to check to see if this is the correct answer or if I'm even close to doing this problem right.

$$\displaystyle \int sin(x) e^x \, dx$$

$$\displaystyle u = sinx$$
$$\displaystyle du = cosx dx$$

$$\displaystyle vu = e^x$$
$$\displaystyle v = e^x$$

$$\displaystyle sinx e^x - \int e^x cosx \,dx$$

$$\displaystyle u = e^x$$
$$\displaystyle du = e^x$$

$$\displaystyle vu = -sinx$$
$$\displaystyle v = cosx$$

$$\displaystyle sinx e^x - e^x cos x - \int cosx e^x dx$$

$$\displaystyle u = cosx$$
$$\displaystyle du = -sinx$$

$$\displaystyle vu = e^x$$
$$\displaystyle v = e^x$$

$$\displaystyle I = sinx e^x - cosx e^x - cosx e ^x + \int e^x sinx \, dx$$

$$\displaystyle 2I = sinx e^x - 2cosx e^x$$

$$\displaystyle I = \frac{sinx e^x - 2cosx e^x}{2}$$
Start by writing \displaystyle \begin{align*} I = \int{e^x\sin{(x)}\,dx} \end{align*} and apply Integration by Parts twice, keeping the \displaystyle \begin{align*} e^x \end{align*} term either as "u" or as "dv" in BOTH. You will find that \displaystyle \begin{align*} I \end{align*} can be written in terms of \displaystyle \begin{align*} I \end{align*}, and thus can be solved.

#### shamieh

##### Active member
so you're saying

$$\displaystyle \int sin(x) e^x$$
$$\displaystyle u = sinx$$
$$\displaystyle du = cosx$$

$$\displaystyle dv = e^x$$
$$\displaystyle v = e^x$$

$$\displaystyle sinx e^x - \int e^x cos x$$

$$\displaystyle u = cos x$$
$$\displaystyle du = - sinx$$

$$\displaystyle dv = e^x$$
$$\displaystyle v = e^x$$

$$\displaystyle sinx e ^x - cosx e^x + \int e^x sinx$$

$$\displaystyle I = e^x sinx - cosx e^x + \int e^x sinx$$

so now do I just subtract the first $$\displaystyle e^x sinx$$ and the $$\displaystyle e^x sinx$$to the otehr side?

Last edited:

#### MarkFL

Staff member
You've made a mistake with a sign, and have been a bit lax with notation concerning differentials. I would take Prove It's advice and begin with:

$$\displaystyle I=\int e^x\sin(x)\,dx$$

Use integration by parts where:

$$\displaystyle u=\sin(x)\,\therefore\,du=\cos(x)\,dx$$

$$\displaystyle dv=e^x\,\therefore\,v=e^x$$

And we have:

$$\displaystyle I=e^x\sin(x)-\int e^x\cos(x)\,dx$$

Use integration by parts again where:

$$\displaystyle u=\cos(x)\,\therefore\,du=-\sin(x)\,dx$$

$$\displaystyle dv=e^x\,\therefore\,v=e^x$$

And we have:

$$\displaystyle I=e^x\sin(x)-\left(e^x\cos(x)+\int e^x\sin(x)\,dx \right)$$

Since $$\displaystyle I=\int e^x\sin(x)\,dx$$, and distributing the negative sign, we get:

$$\displaystyle I=e^x\sin(x)-e^x\cos(x)-I$$

Now solve for $I$ and append the constant of integration.

#### shamieh

##### Active member
so you would get $$\displaystyle I = \frac{e^x sinx - e^x cosx}{2} + C$$correct?

#### MarkFL

Staff member
so you would get $$\displaystyle I = \frac{e^x sinx - e^x cosx}{2} + C$$correct?
Yes, that's correct.

When you begin your study of ordinary differential equations, you will find a technique that you can use to find anti-derivatives of this type without using integration by parts, which relies on the methods used to solve inhomogeneous linear ODEs.

#### Pranav

##### Well-known member
Alternative approach:

Let
$$B=\int e^x\sin(x) \,dx$$
$$A=\int e^x\cos(x)\, dx$$
We get,
$$A+iB=\int e^{x(1+i)}\,dx =\frac{e^{x(1+i)}}{1+i}+C=\frac{e^x(\cos(x)+i\sin(x))(1-i)}{2}+C$$

Since we need the imaginary part, hence:
$$B=\frac{e^x(\sin(x)-\cos(x))}{2}+C$$

Last edited: