I have to solve this:

$\int e^{2x} \sin x\, dx$

I managed to do it like this:

let $\space u_1 = \sin x \space$ and let $\space \dfrac{dv}{dx}_1 = e^{2x}$

$\therefore \dfrac{du}{dx}_1 = \cos x \space $ and $\space v_1 = \frac{1}{2}e^{2x}$

If I substitute these values into the general equation:

$\int u\dfrac{dv}{dx}dx = uv - \int v \dfrac{du}{dx}dx$

I get:

$\int e^{2x} \sin x dx = \frac{1}{2}e^{2x}\sin x - \frac{1}{2}\int e^{2x}\cos x\, dx$

Now I once again do integration by parts and say:

let $u_2 = \cos x$ and let $\dfrac{dv}{dx}_2 = e^{2x}$

$\therefore \dfrac{du}{dx}_2 = -\sin x$ and $v_2 = \frac{1}{2}e^{2x}$

If I once again substitute these values into the general equation I get:

$\int e^{2x}\sin x dx =\frac{1}{2}e^{2x}\sin x - \frac{1}{4}e^{2x}\cos x - \frac{1}{4}\int e^{2x}\sin x dx$

$\therefore \int e^{2x}\sin x dx = \frac{4}{5}(\frac{1}{2}e^{2x}\sin x - \frac{1}{4}e^{2x}\cos x) + C$

$\therefore \int e^{2x}\sin x\, dx = \frac{2}{5}e^{2x}\sin x - \frac{1}{5}e^{2x}\cos x + C$

I was just wondering whether there was a nicer and more efficient way to solve this?

Thank you :)

  • 2
    $\begingroup$ Nope, this is pretty much the standard way to do it! (Unless you like complex numbers and write $\sin x = \frac1{2i}(e^{ix} - e^{-ix})$ - that's another way to do it - but few would call it nicer....) $\endgroup$ Jan 30, 2014 at 16:19
  • 2
    $\begingroup$ This is very well done ! There is another way using complex numbers. Do you want me to elaborate ? This is what Greg wrote ! $\endgroup$ Jan 30, 2014 at 16:20
  • $\begingroup$ Obviously, everyone is happy of what you did and propose the same alternate solution. Cheers. $\endgroup$ Jan 30, 2014 at 16:22
  • $\begingroup$ Essentially the same integral is asked about here: math.stackexchange.com/questions/136595/… $\endgroup$ Jan 30, 2014 at 16:42

3 Answers 3


we have

$$ \int e^{2x}\sin x \mathrm d x = (A\cos x + B\sin x)e^{2x} $$

Equation is the same at both ends of the derivative $x$

$$ e^{2x}\sin x = 2e^{2x}(A\cos x +B \sin x) + (B\cos x -A\sin x)e^{2x} $$

Finishing $$ e^{2x}\sin x =(2B-A)\sin x\,e^{2x} +(2A+B)\cos x\,e^{2x} $$

Compare coefficient,we have $$ 2A+B = 0\\ 2B-A = 1 $$ Solutions have $$ A =-\frac{1}{5} \\ B=\frac{2}{5} $$

  • $\begingroup$ Ahh, this looks really good. Thanks. I'll have to look at it for a while to make sure I understand it. It's reminding me of complex roots when working with second order differentials but I'll have to look at it for a bit longer to understand how it's working :P Thanks again. $\endgroup$
    – Elise
    Jan 30, 2014 at 17:00
  • $\begingroup$ If I may add a comment, this works because integration and derivation, seen as operators on the space of functions, both send the subspace of functions of that form considered into itself. Nice solution, +1. $\endgroup$
    – pppqqq
    Jan 30, 2014 at 20:30

$$ \begin{align*} \\ \int e^{2x}\sin x dx &= \Im \int e^{2x}(\cos x + i\sin x) dx \\ &= \Im \int e^{(2 + i)x}dx \\ &= \Im \frac{e^{(2 + i)x}}{2+i} + C \\ &= \Im \frac15 e^{2x}(\cos x + i\sin x)(2-i) + C \\ &= \frac15 e^{2x}(2\sin x - \cos x) +C \end{align*}$$

  • $\begingroup$ Thank you :) but I'm not too sure what the symbol in front of you integral sign is doing, is is just a constant like $\lambda$? I'm assuming it is what is allowing you to express $sinx$ as $cosx + isinx$ as I'm not too sure how this is done either. I know that $sin\theta = \frac{1}{2i}(e^{i\theta} - e^{-i\theta})$ have you manipulated this somehow? Thank you again :) $\endgroup$
    – Elise
    Jan 30, 2014 at 16:34
  • $\begingroup$ These answers, this in particular, would be even nicer if you substitute $e^{2x}$ by $e^{nx}, \ n \neq 0$. Cheers! $\endgroup$
    – Dmoreno
    Jan 30, 2014 at 16:37
  • 1
    $\begingroup$ @Elise The symbol stands the "the imaginary part of" $\endgroup$
    – JeffDror
    Jan 30, 2014 at 16:38
  • $\begingroup$ @JeffDror Right, okay thanks. I think I need to learn how to integrate complex numbers as this looks really cool :P It'll be a great way to double check my working in exams as well :D thanks everyone $\endgroup$
    – Elise
    Jan 30, 2014 at 16:44

A different method (though not really easier) is to use the fact that $\sin x$ can be expressed using exponents: $$\sin x = \frac{e^{ix} - e^{-ix}}{2i}$$

So that your integral is: $$\int e^{2x} \sin x\ dx = \int \frac{e^{2x+ix} - e^{2x-ix}}{2i} dx= \frac{e^{2x+ix}}{4ix-2x} - \frac{e^{2x-ix}}{4ix+2x}+C$$ $$=\frac{-1}{10}(2i+1)e^{2x+ix} +\frac{1}{10} (2i-1)e^{2x-ix}+C$$ $$=\frac{2}{5}e^{2x}\sin x-\frac{1}{5}e^{2x}\cos x +C$$

  • $\begingroup$ Thanks :D I can understand this up to $\int \dfrac{e^{2x+ix}-e^{2x-ix}}{2i}dx$ but unfortunately I don't know how to integrate imaginary numbers yet but I'm going to go learn now :D could you perhaps recommend a good book/website? Thanks again :) $\endgroup$
    – Elise
    Jan 30, 2014 at 16:47
  • 1
    $\begingroup$ @Elise - there's nothing special going here, you can integrate imaginary numbers just like any other number, and at the end replace $i^2=-1$. $\endgroup$
    – nbubis
    Jan 30, 2014 at 16:49
  • $\begingroup$ Ahh, of course, thanks. I'll have another go :) $\endgroup$
    – Elise
    Jan 30, 2014 at 16:52

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.