Integral of excos(x)e^{x} \cos{\left(x \right)}

The calculator will find the integral/antiderivative of excos(x)e^{x} \cos{\left(x \right)}, with steps shown.

Related calculator: Definite and Improper Integral Calculator

Please write without any differentials such as dxdx, dydy etc.
Leave empty for autodetection.

If the calculator did not compute something or you have identified an error, or you have a suggestion/feedback, please contact us.

Your Input

Find excos(x)dx\int e^{x} \cos{\left(x \right)}\, dx.

Solution

For the integral excos(x)dx\int{e^{x} \cos{\left(x \right)} d x}, use integration by parts udv=uvvdu\int \operatorname{u} \operatorname{dv} = \operatorname{u}\operatorname{v} - \int \operatorname{v} \operatorname{du}.

Let u=cos(x)\operatorname{u}=\cos{\left(x \right)} and dv=exdx\operatorname{dv}=e^{x} dx.

Then du=(cos(x))dx=sin(x)dx\operatorname{du}=\left(\cos{\left(x \right)}\right)^{\prime }dx=- \sin{\left(x \right)} dx (steps can be seen ») and v=exdx=ex\operatorname{v}=\int{e^{x} d x}=e^{x} (steps can be seen »).

The integral becomes

excos(x)dx=(cos(x)exex(sin(x))dx)=(excos(x)(exsin(x))dx){\color{red}{\int{e^{x} \cos{\left(x \right)} d x}}}={\color{red}{\left(\cos{\left(x \right)} \cdot e^{x}-\int{e^{x} \cdot \left(- \sin{\left(x \right)}\right) d x}\right)}}={\color{red}{\left(e^{x} \cos{\left(x \right)} - \int{\left(- e^{x} \sin{\left(x \right)}\right)d x}\right)}}

Apply the constant multiple rule cf(x)dx=cf(x)dx\int c f{\left(x \right)}\, dx = c \int f{\left(x \right)}\, dx with c=1c=-1 and f(x)=exsin(x)f{\left(x \right)} = e^{x} \sin{\left(x \right)}:

excos(x)(exsin(x))dx=excos(x)(exsin(x)dx)e^{x} \cos{\left(x \right)} - {\color{red}{\int{\left(- e^{x} \sin{\left(x \right)}\right)d x}}} = e^{x} \cos{\left(x \right)} - {\color{red}{\left(- \int{e^{x} \sin{\left(x \right)} d x}\right)}}

For the integral exsin(x)dx\int{e^{x} \sin{\left(x \right)} d x}, use integration by parts udv=uvvdu\int \operatorname{u} \operatorname{dv} = \operatorname{u}\operatorname{v} - \int \operatorname{v} \operatorname{du}.

Let u=sin(x)\operatorname{u}=\sin{\left(x \right)} and dv=exdx\operatorname{dv}=e^{x} dx.

Then du=(sin(x))dx=cos(x)dx\operatorname{du}=\left(\sin{\left(x \right)}\right)^{\prime }dx=\cos{\left(x \right)} dx (steps can be seen ») and v=exdx=ex\operatorname{v}=\int{e^{x} d x}=e^{x} (steps can be seen »).

Therefore,

excos(x)+exsin(x)dx=excos(x)+(sin(x)exexcos(x)dx)=excos(x)+(exsin(x)excos(x)dx)e^{x} \cos{\left(x \right)} + {\color{red}{\int{e^{x} \sin{\left(x \right)} d x}}}=e^{x} \cos{\left(x \right)} + {\color{red}{\left(\sin{\left(x \right)} \cdot e^{x}-\int{e^{x} \cdot \cos{\left(x \right)} d x}\right)}}=e^{x} \cos{\left(x \right)} + {\color{red}{\left(e^{x} \sin{\left(x \right)} - \int{e^{x} \cos{\left(x \right)} d x}\right)}}

We've arrived to an integral that we already saw.

Thus, we've obtained the following simple equation with respect to the integral:

excos(x)dx=exsin(x)+excos(x)excos(x)dx\int{e^{x} \cos{\left(x \right)} d x} = e^{x} \sin{\left(x \right)} + e^{x} \cos{\left(x \right)} - \int{e^{x} \cos{\left(x \right)} d x}

Solving it, we get that

excos(x)dx=(sin(x)+cos(x))ex2\int{e^{x} \cos{\left(x \right)} d x} = \frac{\left(\sin{\left(x \right)} + \cos{\left(x \right)}\right) e^{x}}{2}

Therefore,

excos(x)dx=(sin(x)+cos(x))ex2\int{e^{x} \cos{\left(x \right)} d x} = \frac{\left(\sin{\left(x \right)} + \cos{\left(x \right)}\right) e^{x}}{2}

Simplify:

excos(x)dx=2exsin(x+π4)2\int{e^{x} \cos{\left(x \right)} d x} = \frac{\sqrt{2} e^{x} \sin{\left(x + \frac{\pi}{4} \right)}}{2}

Add the constant of integration:

excos(x)dx=2exsin(x+π4)2+C\int{e^{x} \cos{\left(x \right)} d x} = \frac{\sqrt{2} e^{x} \sin{\left(x + \frac{\pi}{4} \right)}}{2}+C

Answer

excos(x)dx=2exsin(x+π4)2+C\int e^{x} \cos{\left(x \right)}\, dx = \frac{\sqrt{2} e^{x} \sin{\left(x + \frac{\pi}{4} \right)}}{2} + CA