5
$\begingroup$

I'm trying to integrate $$ I = \int {e^x \sin (k \pi x)} dx. $$ I've used Matlab and Wolfram Alpha, which have both given me the result $$ I = \frac{e^x(\sin (k \pi x) - \cos (k \pi x))}{k^2 \pi^2 +1 }.$$

How did these programs get this result?

$\endgroup$
2

3 Answers 3

5
$\begingroup$

Consider $e^{ik\pi x} = \cos k\pi x + i \sin k\pi x$. The integrand becomes $e^{(ik\pi + 1)x}$, then take the imaginary part after integrating. We get:

$$ \int e^{(ik\pi + 1) x} dx=\frac{e^{(ik\pi+1)x}}{ik\pi + 1}+C = \frac{(1-ik\pi)e^{(ik\pi+1)x}}{1+k^2\pi^2}+C=\frac{(1-ik\pi)e^x (\cos k\pi x+ i \sin k\pi x)}{1+k^2\pi^2}+C $$

Take the imaginary parts of both sides, should yield same result as integration by parts.

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

$\endgroup$
1
  • $\begingroup$ this ought to be taught in first calculus courses along with basic complex arithmetic. Nice answer. $\endgroup$ Oct 1, 2014 at 4:35
3
$\begingroup$

$$I = \int e^x \sin (k \pi x) dx\\=\sin k\pi x\int e^xdx-\int k\pi\cos k\pi x \left(\int e^xdx \right)dx\\=e^x\sin k\pi x-k\pi\int e^x\cos k \pi x\\=e^x\sin k\pi x-k\pi\left(\cos k\pi x\int e^x dx-\int k\pi \sin k\pi x\left(\int e^x dx\right)dx\right) \\ I=e^x(\sin k \pi x -k\pi\cos k\pi x)+k^2\pi^2 I+c$$ $$I=\frac{e^x(\sin k\pi x-k\pi\cos k\pi x)}{1+k^2\pi^2}+c$$


In general: $$I_{a,b}=\int e^{ax}\sin bx dx=\frac{e^{ax}(a\sin bx-b\cos bx)}{a^2+b^2}+c$$

$\endgroup$
1
  • $\begingroup$ Also a good solution! @James Harrison's jsut looked nicer. $\endgroup$
    – jamesh625
    Oct 1, 2014 at 14:23
2
$\begingroup$

Hint: Use integration by parts twice.

$\endgroup$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .