Solveeit Logo

Question

Question: Integrate \[\int {{e^x}\left( {\dfrac{1}{x} - \dfrac{1}{{{x^2}}}} \right)dx} \]...

Integrate ex(1x1x2)dx\int {{e^x}\left( {\dfrac{1}{x} - \dfrac{1}{{{x^2}}}} \right)dx}

Explanation

Solution

We will denote the function inside the parenthesis as a function of xx. We will then differentiate the assumed function such that its derivative is present in the integrand. Then we will apply the appropriate integration formula to obtain the value of the integral.

Formula used:
We will use the following formulas:

  1. ex[f(x)+f(x)]dx=exf(x)+c\int {{e^x}[f(x) + f'(x)} ]dx = {e^x}f(x) + c, where f(x)f(x) is a function of xx, f(x)f'(x) is its derivative, and cc is a constant.
  2. ddx(xn)=nxn1\dfrac{d}{{dx}}\left( {{x^n}} \right) = n{x^{n - 1}}

Complete step by step solution:
We have to integrate ex(1x1x2)dx\int {{e^x}\left( {\dfrac{1}{x} - \dfrac{1}{{{x^2}}}} \right)dx}
We will first use an appropriate function of xx from the integrand, such that its derivative is also present in the integrand.
Let us take 1x\dfrac{1}{x} as our required function. So,
f(x)=1xf(x) = \dfrac{1}{x}
Let us check if the derivative of 1x\dfrac{1}{x} is present in the integrand. For this we have to differentiate 1x\dfrac{1}{x}. Now, 1x=x1\dfrac{1}{x} = {x^{ - 1}}.
Using the formula ddx(xn)=nxn1\dfrac{d}{{dx}}\left( {{x^n}} \right) = n{x^{n - 1}}, we get
f(x)=(1)x11=x2 f(x)=1x2\begin{array}{l}f'(x) = ( - 1){x^{ - 1 - 1}} = - {x^{ - 2}}\\\ \Rightarrow f'(x) = - \dfrac{1}{{{x^2}}}\end{array}
We observe that 1x2 - \dfrac{1}{{{x^2}}} is also present in the integrand. Hence, our choice of function is right.
Now, we can write ex(1x1x2)dx\int {{e^x}\left( {\dfrac{1}{x} - \dfrac{1}{{{x^2}}}} \right)dx} as ex[1x+(1x2)]dx\int {{e^x}\left[ {\dfrac{1}{x} + \left( { - \dfrac{1}{{{x^2}}}} \right)} \right]} dx, where f(x)=1xf(x) = \dfrac{1}{x} and f(x)=1x2f'(x) = - \dfrac{1}{{{x^2}}}.
ex(1x1x2)dx=ex[1x+(1x2)]dx\int {{e^x}\left( {\dfrac{1}{x} - \dfrac{1}{{{x^2}}}} \right)dx} = \int {{e^x}\left[ {\dfrac{1}{x} + \left( { - \dfrac{1}{{{x^2}}}} \right)} \right]} dx
Using the formula ex[f(x)+f(x)]dx=exf(x)+c\int {{e^x}[f(x) + f'(x)} ]dx = {e^x}f(x) + c to integrate, we have

ex(1x1x2)dx=ex(1x)+c \Rightarrow \int {{e^x}\left( {\dfrac{1}{x} - \dfrac{1}{{{x^2}}}} \right)dx} = {e^x}\left( {\dfrac{1}{x}} \right) + c

Note:
We can also solve the above problem by integration by parts method.
udv=uvvdu\int {udv} = uv - \int {vdu} ……….(A)(A)
The integrand ex(1x1x2)dx\int {{e^x}\left( {\dfrac{1}{x} - \dfrac{1}{{{x^2}}}} \right)dx} can be written as ex(1x)dxex(1x2)dx\int {{e^x}\left( {\dfrac{1}{x}} \right)dx - \int {{e^x}\left( {\dfrac{1}{{{x^2}}}} \right)dx} } ……….(B)(B)
We will apply the integration by parts rule to the integral ex(1x)dx\int {{e^x}\left( {\dfrac{1}{x}} \right)dx} .
Let us take u=1xu = \dfrac{1}{x} and dv=exdxdv = {e^x}dx.
Now, du=1x2dxdu = - \dfrac{1}{{{x^2}}}dx and v=dv=exdxv = \int {dv} = \int {{e^x}dx} . This gives v=exv = {e^x}.
Substituting these values in equation (A)(A), we get
ex(1x)dx=ex(1x)ex(1x2)dx+c\int {{e^x}\left( {\dfrac{1}{x}} \right)dx} = {e^x}\left( {\dfrac{1}{x}} \right) - \int {{e^x}\left( { - \dfrac{1}{{{x^2}}}} \right)dx} + c
On the RHS, the ()( - ) can be taken out and we can rewrite the above equation as
ex(1x)dx=ex(1x)+ex(1x2)dx\int {{e^x}\left( {\dfrac{1}{x}} \right)dx} = {e^x}\left( {\dfrac{1}{x}} \right) + \int {{e^x}\left( {\dfrac{1}{{{x^2}}}} \right)dx} ………(C)(C)
Using equation (C)(C) in equation (B)(B), we get
ex(1x1x2)dx=ex(1x)+ex(1x2)dxex(1x2)dx+c\int {{e^x}\left( {\dfrac{1}{x} - \dfrac{1}{{{x^2}}}} \right)dx} = {e^x}\left( {\dfrac{1}{x}} \right) + \int {{e^x}\left( {\dfrac{1}{{{x^2}}}} \right)dx} - \int {{e^x}\left( {\dfrac{1}{{{x^2}}}} \right)dx} + c
Cancelling out ex(1x2)dx\int {{e^x}\left( {\dfrac{1}{{{x^2}}}} \right)dx} on the RHS, we finally get
ex(1x1x2)dx=ex(1x)+c\int {{e^x}\left( {\dfrac{1}{x} - \dfrac{1}{{{x^2}}}} \right)dx} = {e^x}\left( {\dfrac{1}{x}} \right) + c