Question
Question: Evaluate the following integral: \(I=\int{{{e}^{x}}\left( \cos x-\sin x \right)dx}\)...
Evaluate the following integral: I=∫ex(cosx−sinx)dx
Solution
We will split the given function in order to simplify it. We will integrate the simplified function using the method of integration by parts, since the integrand will be a product of two types of functions. The formula for integration by parts for functions u and v with respect to x is as follows,
∫uvdx=u∫vdx−∫(dxdu⋅∫vdx)dx .
Complete step-by-step answer:
The function we have to integrate is ex(cosx−sinx). We will split it in the following manner,
ex(cosx−sinx)=excosx−exsinx
Now, the integral will become
I=∫ex(cosx−sinx)dx=∫excosxdx−∫exsinxdx
We will first integrate the first term of the above equation. As the first term is a product of the exponential function and a trigonometric function, we will use the method of integration by parts. The formula for integration by parts for functions u and v with respect to x is as follows,
∫uvdx=u∫vdx−∫(dxdu⋅∫vdx)dx .
Substituting u=cosx and v=ex in the above formula, we get the following,
∫cosx⋅exdx=cosx⋅∫exdx−∫[dxd(cosx)∫exdx]dx
Simplifying this expression, we get
∫cosx⋅exdx=cosx⋅ex−∫−sinx⋅exdx=excosx+∫exsinxdx
Now we will substitute this expression in place of the first term of I, we have the following equation,
I=excosx+∫exsinxdx−∫exsinxdx
Since, the terms with integrals will cancel out, we will get I==excosx+c where c is the integration constant.
Therefore, the value of the integration is I=excosx+c.
Note: It is important to understand by observing the function how it should be simplified. The simplification should help us realize which method of integration needs to be used. We are aware that the sine function and cosine function are related to each other via differentiation and integration. So, we chose to integrate the function by parts. Application of the formula for integration by parts needs to be done carefully since the second term in it has an integral inside an integral.