Solution
For the integral ∫excos(x)dx, use integration by parts ∫udv=uv−∫vdu.
Let u=cos(x) and dv=exdx.
Then du=(cos(x))′dx=−sin(x)dx (steps can be seen ») and v=∫exdx=ex (steps can be seen »).
The integral becomes
∫excos(x)dx=(cos(x)⋅ex−∫ex⋅(−sin(x))dx)=(excos(x)−∫(−exsin(x))dx)
Apply the constant multiple rule ∫cf(x)dx=c∫f(x)dx with c=−1 and f(x)=exsin(x):
excos(x)−∫(−exsin(x))dx=excos(x)−(−∫exsin(x)dx)
For the integral ∫exsin(x)dx, use integration by parts ∫udv=uv−∫vdu.
Let u=sin(x) and dv=exdx.
Then du=(sin(x))′dx=cos(x)dx (steps can be seen ») and v=∫exdx=ex (steps can be seen »).
Therefore,
excos(x)+∫exsin(x)dx=excos(x)+(sin(x)⋅ex−∫ex⋅cos(x)dx)=excos(x)+(exsin(x)−∫excos(x)dx)
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
Solving it, we get that
∫excos(x)dx=2(sin(x)+cos(x))ex
Therefore,
∫excos(x)dx=2(sin(x)+cos(x))ex
Simplify:
∫excos(x)dx=22exsin(x+4π)
Add the constant of integration:
∫excos(x)dx=22exsin(x+4π)+C