I have to integrate the following indefinite integrals $$\int e^{ax}\sin bxdx~~;~\int e^{ax}\cos bx$$ The procedure I used is the same for both integrals:

  • Make the change of variables $bx=t$

  • Use partial integration twice with $dv=e^{at/b}dt$ until the initial integral reappears and then solve.

This is the full procedure for the first integral. For the 2nd integral the result I obtain is the same except for the signs. $$\int e^{ax}\sin bxdx$$ Change of variables $bx=t$ $$\frac{1}{b}\int e^{at/b}\sin tdt$$ Partial integration $$dv=e^{at/b}dt~;~v=\frac{b}{a}e^{at/b}~;~u=\sin t~;~du=\cos tdt$$ Which leads to $$\frac{1}{a}e^{at/b}\sin t-\frac{1}{a}\int e^{at/b}\cos tdt$$ Partial integration again $$dv=e^{at/b}~;~v=\frac{b}{a}e^{at/b}~;~u=\cos t~;~du=-\sin tdt$$ Which leads to $$\frac{1}{b}I=\frac{1}{a}e^{at/b}\sin t-\frac{b}{a^2}e^{at/b}\cos t-\frac{b}{a^2}\int e^{at/b}\sin tdt$$ $$\frac{a^2+b^2}{ba^2}I=\frac{1}{a}e^{at/b}\sin t-\frac{b}{a^2}e^{at/b}\cos t$$ $$(a^2+b^2)I=bae^{at/b}\sin t-b^2e^{at/b}\cos t$$ $$I=\frac{ba}{a^2+b^2}e^{at/b}\sin t-\frac{b^2}{a^2+b^2}e^{at/b}\cos t$$ $$I=\frac{ba}{a^2+b^2}e^{ax}\sin bx-\frac{b^2}{a^2+b^2}e^{ax}\cos bx+C$$

The correct result is the one I obtained but divided by $b$ and for the love of God I can't figure out where I made the mistake.

  • $\begingroup$ If you Know Complex Analysis then using residue theory all becomes easy to solve! $\endgroup$ – user8795 Mar 25 '17 at 19:41
  • $\begingroup$ Hint: Write the earlier steps in terms of $I$ rather than just the last one. (You're in effect multiplying by $b$ when you should be dividing; writing the steps out more explicitly will make that clearer.) $\endgroup$ – Semiclassical Mar 25 '17 at 19:41

I prefer to write this using Euler's formula (exponentials are so much easier) \begin{align} \int e^{x(a+ i b)} \, dx & = \frac{1}{a + i b} e^{x(a + ib)} \\ & = \frac{a - ib}{a^2+b^2} e^{x(a+ib)}. \end{align}

Then you can just read off $$\int e^{ax} \cos(bx) = \frac{e^{ax}}{a^2+b^2}[a \cos(bx) + b \sin(bx)]$$ and $$\int e^{ax} \sin(bx) = \frac{e^{ax}}{a^2+b^2}[a \sin(bx) - b \cos(bx)]$$


Let, $I=\displaystyle\int{e^{ax}\sin{bx}}\ dx$

now by applying by parts rule \begin{align*} I&= e^{ax}\int \sin{bx}\ dx-\int\left[\frac{d}{dx}(e^{ax})\cdot\int\sin{bx}\ dx\right]\ dx\\ &= e^{ax}\left(-\frac{\cos{bx}}{b}\right)-\int{ae^{ax}}\cdot\left(-\frac{\cos{bx}}{b}\right)\ dx\\ &=-\frac{e^{ax}\cos{bx}}{b}+\frac{a}{b}\int{e^{ax}\cos{bx}}\ dx\\ &=-\frac{e^{ax}\cos{bx}}{b}+\frac{a}{b}\left[e^{ax}\int\cos{bx}\ dx-\int\left\{\frac{d}{dx}(e^{ax})\cdot\int\cos{bx}\ dx\right\}dx\right]+k_1\\ &=-\frac{e^{ax}\cos{bx}}{b}+\frac{a}{b}e^{ax}\cdot\frac{\sin{bx}}{b}-\frac{a}{b}\int ae^{ax}\cdot\frac{\sin{bx}}{b}\ dx+k_1\\ or,\ I&=-\frac{e^{ax}\cos{bx}}{b}+\frac{a}{b^2}e^{ax}\sin{bx}-\frac{a^2}{b^2}I+k_1\\ or,\ I+\frac{a^2}{b^2}I&=\frac{e^{ax}}{b^2}\left(a\sin{bx}-b\cos{bx}\right)+k_1\\ or,\ I&=\frac{e^{ax}}{a^2+b^2}\left(a\sin{bx}-b\cos{bx}\right)+k \end{align*}


\begin{align*} I &= \int e^{ax} \cos bx \, dx \\ J &= \int e^{ax} \sin bx \, dx \\ I &= \frac{e^{ax}}{a} \cos bx-\int \frac{e^{ax}}{a} d(\cos bx) \\ &= \frac{e^{ax}}{a} \cos bx+\frac{b}{a}\int e^{ax} \sin bx \, dx \\ I &= \frac{e^{ax}}{a} \cos bx+\frac{b}{a} J+C_1 \tag{1} \\ J &= \frac{e^{ax}}{a} \sin bx-\int \frac{e^{ax}}{a} d(\sin bx) \\ &= \frac{e^{ax}}{a} \sin bx-\frac{b}{a}\int e^{ax} \cos bx \, dx \\ J &= \frac{e^{ax}}{a} \sin bx-\frac{b}{a} I+C_2 \tag{2} \\ \end{align*}

Solving $I$ and $J$ gives the answers.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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