# Integration of e^x Sin x

In this tutorial we shall derive the integral of e^x into the sine function, and this integral can be evaluated by using the integration by parts method.

The integration of the form is
$I = \int {{e^x}\sin xdx} \,\,\,\,{\text{ – – – }}\left( {\text{i}} \right)$

Here the first function is $f\left( x \right) = {e^x}$ and the second function is $g\left( x \right) = \sin x$

By using the integration by parts formula
$\int {\left[ {f\left( x \right)g\left( x \right)} \right]dx = f\left( x \right)\int {g\left( x \right)dx – \left[ {\frac{d}{{dx}}f\left( x \right)\left( {\int {g\left( x \right)} dx} \right)} \right]} dx}$

Equation (i) will become
$\begin{gathered} I = {e^x}\int {\sin xdx – \int {\left[ {\frac{d}{{dx}}{e^x}\left( {\int {\sin xdx} } \right)} \right]} dx} \\ \Rightarrow I = {e^x}\left( { – \cos x} \right) – \int {\left[ {{e^x}\left( { – \cos x} \right)} \right]} dx \\ \Rightarrow I = – \cos x{e^x} + \int {{e^x}\cos x} dx \\ \end{gathered}$

Again using the integration by parts formula, we have
$\begin{gathered} I = – \cos x{e^x} + {e^x}\int {\cos x} dx – \int {\left[ {\frac{d}{{dx}}{e^x}\left( {\int {\cos x} } \right)dx} \right]} dx \\ \Rightarrow I = – \cos x{e^x} + {e^x}\sin x – \int {{e^x}\sin x} dx \\ \end{gathered}$

But using $I = \int {{e^x}\sin xdx}$, we have
$\begin{gathered} I = – {e^x}\cos x + {e^x}\sin x – I \\ \Rightarrow I + I = – {e^x}\cos x + {e^x}\sin x \\ \Rightarrow 2I = – {e^x}\cos x + {e^x}\sin x \\ \Rightarrow I = \frac{1}{2}{e^x}\left( {\sin x – \cos x} \right) + c \\ \Rightarrow \int {{e^x}\sin x} dx = \frac{1}{2}{e^x}\left( {\sin x – \cos x} \right) + c \\ \end{gathered}$