# Math Help - [SOLVED] integral

1. ## [SOLVED] integral

HI ,

i need the integral of:

e^ax * cos(bx) *dx
x^k * sin(ax) *dx
x^k * e^ax *dx

2. Originally Posted by fid
HI ,

i need the integral of:

e^ax * cos(bx) *dx
Assume $a,b \neq 0$, the solution is trivial in any of the cases a = 0 or b = 0 or both a = b = 0.

So, if $a,b \neq 0$ we can proceed by Integration by parts.

$\int e^{ax} \cos (bx) dx = \frac {1}{a}e^{ax} \cos (bx) + \frac {b}{a} \int e^{ax} \sin (bx)dx$ .......do this last integral by parts again

$\Rightarrow \int e^{ax} \cos (bx)dx = \frac {1}{a}e^{ax} \cos (bx) + \frac {b}{a} \left[ \frac {1}{a}e^{ax} \sin(bx) - \frac {b}{a}\int e^{ax} \cos(bx)dx \right]$

$\Rightarrow \int e^{ax} \cos(bx)dx = \frac {1}{a}e^{ax} \cos(bx) + \frac {b}{a^2}e^{ax} \sin(bx) - \left( \frac {b}{a} \right)^2 \int e^{ax} \cos (bx)dx$

$\Rightarrow \left[1 + \left( \frac {b}{a} \right)^2 \right] \int e^{ax} \cos (bx)dx = \frac {1}{a}e^{ax} \cos(bx) + \frac {b}{a^2} e^{ax} \sin(bx)$

$\Rightarrow \int e^{ax} \cos(bx)dx = \frac { \frac {1}{a}e^{ax} \cos (bx) + \frac {b}{a^2}e^{ax} \sin(bx)}{ \left[1 + \left( \frac {b}{a} \right)^2 \right]}$

Someone please check this. I still get lost when typing out solutions with LaTex

I see others replying to the thread, so i'll hold off on answering the others. i'd only answer one though, since the last two are kind of similar

3. Looks like correct.

I got

$\int{e^{ax}\cdot\cos{bx}~dx}=\frac{ae^{ax}\cos{bx} +be^{ax}\sin{bx}}{a^2+b^2}+k$

4. Originally Posted by Krizalid
Looks like correct.

I got

$\int{e^{ax}\cdot\cos{bx}~dx}=\frac{ae^{ax}\cos{bx} +be^{ax}\sin{bx}}{a^2+b^2}+k$
yeah, i think that's what mine simplifies to, i could bother simplifying however. And i forgot the arbitrary constant...I always do that!

did you use a different method?

5. Hello, fid!

These are very messy problems . . . Here's the first one.

$I \;= \;\int e^{ax}\cos(bx)\,dx$

Integrate by parts:
. . $\begin{array}{ccccccc}u & = & \cos(bx) & \quad & dv & = & e^{ax}dx \\
du & = & -b\sin(bx)\,dx & \quad & v & = & \frac{1}{a}e^{ax} \end{array}$

We have: . $I \;=\;\frac{1}{a}e^{ax}\cos(bx) + \frac{b}{a}\int e^{ax}\sin(bx)\,dx$

. . Integrate by parts:
. . . . $\begin{array}{ccccccc}u & = & \sin(bx) & \quad & dv &= & e^{ax}dx \\
du & = & b\cos(bx)\,dx & \quad & v & = & \frac{1}{a}e^{ax} \end{array}$

We have: . $I \;=\;\frac{1}{a}e^{ax}\cos(bx) + \frac{b}{a}\left[\frac{1}{a}e^{ax}\sin(bx) - \frac{b}{a}\int e^{ax}\cos(bx)\,dx\right]$

. . . . . . . $I \;=\;\frac{1}{a}e^{ax}\cos(bx) + \frac{b}{a^2}e^{ax}\sin(bx) - \frac{b^2}{a^2}\underbrace{\int e^{ax}\cos(bx)\,dx}_{\text{This is }I}$

We have: . . $I \;=\;\frac{1}{a}e^{ax}\cos(bx) + \frac{b}{a^2}e^{ax}\sin(bx) - \frac{b^2}{a^2}I$

Then: . $I + \frac{b^2}{a^2}I \;=\;\frac{1}{a}e^{ax}\cos(bx) + \frac{b}{a^2}e^{ax}\sin(bx) + C$

. . . $\left(\frac{a^2+b^2}{a^2}\right)I \;=\;\frac{e^{ax}}{a^2}\bigg[a\cos(bx) + b\sin(bx)\bigg] + C$

. . . . . . . . . $I \;=\;\frac{e^{ax}}{a^2+b^2}\bigg[a\cos(bx) + b\sin(bx)\bigg] + C$

Therefore: . $\int e^{ax}\cos(bx)\,dx \;=\;\frac{e^{ax}}{a^2+b^2}\bigg[a\cos(bx) + b\sin(bx)\bigg] + C$

6. Originally Posted by fid
HI ,

i need the integral of:

e^ax * cos(bx) *dx
x^k * sin(ax) *dx
x^k * e^ax *dx

Look up integration by parts. The first one is the trickiest so I'll do that one.

$\int e^{ax}cos(bx) \, dx$

We know that $\int u dv = uv - \int v du$ (from the product rule) so choose:
$u = cos(bx)$ ==> $du = -b \cdot sin(bx) dx$
$dv = e^{ax} dx$ ==> $v = \frac{1}{a}e^{ax}$

So:
$\int e^{ax}cos(bx) \, dx = cos(bx) \cdot \frac{1}{a}e^{ax} - \int \frac{1}{a}e^{ax} \cdot -b \, sin(bx) \, dx$ $= \frac{1}{a}e^{ax}cos(bx) + \frac{b}{a} \int e^{ax}sin(bx) \, dx$

Now do $\int e^{ax}sin(bx) \, dx$.

Choose
$u = sin(bx)$ ==> $du = b \cdot cos(bx) dx$
$dv = e^{ax} dx$ ==> $v = \frac{1}{a}e^{ax}$

Then
$\int e^{ax}sin(bx) \, dx = sin(bx) \cdot \frac{1}{a}e^{ax} - \int \frac{1}{a}e^{ax} \cdot b \cdot cos(bx) dx$ $=
\frac{1}{a}e^{ax}sin(bx) - \frac{b}{a} \int
e^{ax}cos(bx) dx$

Now substitute this value for the sin(bx) integral into your cos(bx) expression:
$\int e^{ax}cos(bx) \, dx = \frac{1}{a}e^{ax}cos(bx) + \frac{b}{a} \int e^{ax}sin(bx) \, dx$ $= \frac{1}{a}e^{ax}cos(bx) + \frac{b}{a} \left (
\frac{1}{a}e^{ax}sin(bx) - \frac{b}{a} \int
e^{ax}cos(bx) dx \right )$

$\int e^{ax}cos(bx) \, dx = \frac{1}{a}e^{ax}cos(bx) + \frac{b}{a^2}e^{ax}sin(bx) - \frac{b^2}{a^2} \int
e^{ax}cos(bx) dx$

This would apparently give us nothing because the solution of the integral depends on the value of the integral! But treat $\int e^{ax}cos(bx) \, dx$ as a variable for the moment. If we add $\frac{b}{a^2} \int e^{ax}cos(bx) dx$ to both sides...

$\int e^{ax}cos(bx) \, dx + \frac{b^2}{a^2} \int
e^{ax}cos(bx) dx = \frac{1}{a}e^{ax}cos(bx) + \frac{b}{a^2}e^{ax}sin(bx)$

Now factor the common $\int e^{ax}cos(bx) \, dx$:
$\left ( \int e^{ax}cos(bx) \, dx \right) \left ( 1 + \frac{b^2}{a^2} \right ) = \frac{1}{a}e^{ax}cos(bx) + \frac{b}{a^2}e^{ax}sin(bx)$

$\int e^{ax}cos(bx) \, dx = \frac{ \frac{1}{a}e^{ax}cos(bx) + \frac{b}{a^2}e^{ax}sin(bx)}{1 + \frac{b^2}{a^2}}$

$\int e^{ax}cos(bx) \, dx = \frac{ ae^{ax}cos(bx) + be^{ax}sin(bx)}{a^2 + b^2}$

-Dan

(Oops! As Soroban, Krizalid, and Jhevon all said, you need to add an arbitrary constant to this. Wow was I slow on this one! )

7. Originally Posted by fid
x
x^k * sin(ax) *dx
x^k * e^ax *dx
I'm not going to do these last two, but consider using
$u = x^k$
and
$dv = sin(ax)$
for the second one. The third one is done in a similar fashion.

-Dan

8. By the way!!!

I hope to see you there!!

9. Originally Posted by topsquark
I'm not going to do these last two, but consider using
$u = x^k$
and
$dv = sin(ax)$
for the second one. The third one is done in a similar fashion.

-Dan
the second one is a bit more complicated i believe. we have to deal with factorials and also, i think, we have to do two cases: if k is odd or even. don't think we need cases for the third, but factorials may come into play again

it seems everyone else simplified their answer. turns out i was the lazy one here...hey, i had to leave something for fid to do on this question, right?

10. For the first a simple way of doing the integral is to observe that:

$\int{e^{ax}\cdot\cos{bx}~dx}=Re\left[\int e^{(a+\bold{i}b)x} ~dx\right]$

RonL