Solveeit Logo

Question

Question: How do you integrate \(\ln ({x^2} - x + 2)dx\)?...

How do you integrate ln(x2x+2)dx\ln ({x^2} - x + 2)dx?

Explanation

Solution

We are asked to integrate the function ln(x2x+2)dx\ln ({x^2} - x + 2)dx, where ln\ln represents the natural logarithm to the base ee. Firstly, we make use of methods of integration by parts. The method is given by udv=uvvdu\int {udv = uv - \int {vdu} } . We take here u=ln(x2x+2)u = \ln ({x^2} - x + 2) and dv=1dv = 1 to solve. Then we make use of some properties of integration to simplify the problem and obtain the solution.

Complete step by step solution:
In this question we need to integrate a function ln(x2x+2)dx\ln ({x^2} - x + 2)dx.
Note that logarithm is an inverse of an exponential function. Here ln\ln represents the natural logarithm to the base ee.
To solve the above problem we use the method of integration by parts.
The method is given by udv=uvvdu\int {udv = uv - \int {vdu} } …… (1)
Take u=ln(x2x+2)u = \ln ({x^2} - x + 2)
Differentiating u we obtain dudu.
du=2x1x2x+2du = \dfrac{{2x - 1}}{{{x^2} - x + 2}}
Take dv=1dv = 1.
Integrate dvdv to obtain v.
dv=1dx\int {dv = \int {1dx} }
v=x\Rightarrow v = x.
Now substituting in the equation (1), we get,
ln(x2x+2)1dx=ln(x2x+2)xx2x1x2x+2dx\int {\ln ({x^2}} - x + 2) \cdot 1dx = \ln ({x^2} - x + 2)x - \int {x\dfrac{{2x - 1}}{{{x^2} - x + 2}}} dx
ln(x2x+2)dx=xln(x2x+2)2x2xx2x+2dx\Rightarrow \int {\ln ({x^2}} - x + 2)dx = x \cdot \ln ({x^2} - x + 2) - \int {\dfrac{{2{x^2} - x}}{{{x^2} - x + 2}}} dx …… (2)
Now we simplify the term 2x2xx2x+2\dfrac{{2{x^2} - x}}{{{x^2} - x + 2}}.
Express x - x as 2x+x - 2x + x, we get,
2x22x+xx2x+2\Rightarrow \dfrac{{2{x^2} - 2x + x}}{{{x^2} - x + 2}}
Now add and subtract by 4 in the numerator we get,
2x22x+4+x4x2x+2\Rightarrow \dfrac{{2{x^2} - 2x + 4 + x - 4}}{{{x^2} - x + 2}}
Now we split the above term as,
2(x2x+2)x2x+2+x4x2x+2\Rightarrow \dfrac{{2({x^2} - x + 2)}}{{{x^2} - x + 2}} + \dfrac{{x - 4}}{{{x^2} - x + 2}}
2+x4x2x+2\Rightarrow 2 + \dfrac{{x - 4}}{{{x^2} - x + 2}}
Now 2x2xx2x+2dx=2+x4x2x+2dx\int {\dfrac{{2{x^2} - x}}{{{x^2} - x + 2}}dx} = \int {2 + } \dfrac{{x - 4}}{{{x^2} - x + 2}}dx
2dx+x4x2x+2dx\Rightarrow \int {2dx + \int {\dfrac{{x - 4}}{{{x^2} - x + 2}}} } dx …… (3)
Now we simplify the term x4x2x+2\dfrac{{x - 4}}{{{x^2} - x + 2}}
We try to convert it as f(x)f(x)\dfrac{{f'(x)}}{{f(x)}}.
x4x2x+2=12(2x8)x2x+2\dfrac{{x - 4}}{{{x^2} - x + 2}} = \dfrac{{\dfrac{1}{2}(2x - 8)}}{{{x^2} - x + 2}}
12(2x1)72x2x+2\Rightarrow \dfrac{{\dfrac{1}{2}(2x - 1) - \dfrac{7}{2}}}{{{x^2} - x + 2}}
Now splitting the terms we get,
12(2x1)x2x+2721x2x+2\Rightarrow \dfrac{{\dfrac{1}{2}(2x - 1)}}{{{x^2} - x + 2}} - \dfrac{7}{2}\dfrac{1}{{{x^2} - x + 2}}
Substituting this in the equation (3), we get,
2dx+(12(2x1)x2x+2721x2x+2)dx\Rightarrow \int {2dx + \int {\left( {\dfrac{{\dfrac{1}{2}(2x - 1)}}{{{x^2} - x + 2}} - \dfrac{7}{2}\dfrac{1}{{{x^2} - x + 2}}} \right)dx} }
Splitting the integration in the second term we get,
2dx+12(2x1)x2x+2dx721x2x+2dx\Rightarrow \int {2dx + } \int {\dfrac{{\dfrac{1}{2}(2x - 1)}}{{{x^2} - x + 2}}} dx - \int {\dfrac{7}{2}\dfrac{1}{{{x^2} - x + 2}}dx}
Now integrating we get,
2x+12ln(x2x+2)721x2x+2dx\Rightarrow 2x + \dfrac{1}{2}\ln ({x^2} - x + 2) - \dfrac{7}{2}\int {\dfrac{1}{{{x^2} - x + 2}}dx}
Substituting in the equation (2) we get,
ln(x2x+2)dx=xln(x2x+2)2x2xx2x+2dx\int {\ln ({x^2}} - x + 2)dx = x \cdot \ln ({x^2} - x + 2) - \int {\dfrac{{2{x^2} - x}}{{{x^2} - x + 2}}} dx
xln(x2x+2)(2x+12ln(x2x+2)721x2x+2dx)\Rightarrow x\ln ({x^2} - x + 2) - \left( {2x + \dfrac{1}{2}\ln ({x^2} - x + 2) - \dfrac{7}{2}\int {\dfrac{1}{{{x^2} - x + 2}}dx} } \right)
Now combining the like terms we get,
(x12)ln(x2x+2)2x+721x2x+2dx\Rightarrow \left( {x - \dfrac{1}{2}} \right)\ln ({x^2} - x + 2) - 2x + \dfrac{7}{2}\int {\dfrac{1}{{{x^2} - x + 2}}dx} …… (4)
Now we simplify the term 1x2x+2dx\int {\dfrac{1}{{{x^2} - x + 2}}dx} .
We try to convert the denominator as factors using completing squares.
Consider the quadratic equation x2x+2{x^2} - x + 2.
Add and subtract 14\dfrac{1}{4} we get,
x2x+14+214\Rightarrow {x^2} - x + \dfrac{1}{4} + 2 - \dfrac{1}{4}
(x12)2+74\Rightarrow {\left( {x - \dfrac{1}{2}} \right)^2} + \dfrac{7}{4}
1x2x+2dx=1(x12)2+74dx\therefore \int {\dfrac{1}{{{x^2} - x + 2}}dx} = \int {\dfrac{1}{{{{\left( {x - \dfrac{1}{2}} \right)}^2} + \dfrac{7}{4}}}} dx …… (5)
Take (x12)2=74tan2θ{\left( {x - \dfrac{1}{2}} \right)^2} = \dfrac{7}{4}{\tan ^2}\theta
(x12)=72tanθ\Rightarrow {\left( {x - \dfrac{1}{2}} \right)^{}} = \dfrac{{\sqrt 7 }}{2}\tan \theta …… (6)
θ=arctan27(x12)\Rightarrow \theta = \arctan \dfrac{2}{{\sqrt 7 }}\left( {x - \dfrac{1}{2}} \right) …… (7)
Differentiating (6) we get,
dx=72sec2θdθ\Rightarrow dx = \dfrac{{\sqrt 7 }}{2}{\sec ^2}\theta d\theta
Hence the equation (5) becomes,
174tan2θ+7472sec2θdθ\Rightarrow \int {\dfrac{1}{{\dfrac{7}{4}{{\tan }^2}\theta + \dfrac{7}{4}}}} \cdot \dfrac{{\sqrt 7 }}{2}{\sec ^2}\theta d\theta
72174(tan2θ+1)sec2θdθ\Rightarrow \dfrac{{\sqrt 7 }}{2}\int {\dfrac{1}{{\dfrac{7}{4}({{\tan }^2}\theta + 1)}}} \cdot {\sec ^2}\theta d\theta
We know the trigonometric identity 1+tan2θ=sec2θ1 + {\tan ^2}\theta = {\sec ^2}\theta .
72sec2θ74(sec2θ)dθ\Rightarrow \dfrac{{\sqrt 7 }}{2}\int {\dfrac{{{{\sec }^2}\theta }}{{\dfrac{7}{4}({{\sec }^2}\theta )}}d\theta }
Cancelling the terms and taking out the constant term in the denominator out of integration we get,
7227dθ\Rightarrow \dfrac{{\sqrt 7 }}{2} \cdot \dfrac{2}{7}\int {d\theta }
Note that 7=7×77 = \sqrt 7 \times \sqrt 7
7227×7dθ\Rightarrow \dfrac{{\sqrt 7 }}{2} \cdot \dfrac{2}{{\sqrt 7 \times \sqrt 7 }}\int {d\theta }
27dθ\Rightarrow \dfrac{2}{{\sqrt 7 }}\int {d\theta }
27θ\Rightarrow \dfrac{2}{{\sqrt 7 }}\theta
Substituting the value θ\theta from the equation (7), θ=arctan27(x12)\theta = \arctan \dfrac{2}{{\sqrt 7 }}\left( {x - \dfrac{1}{2}} \right) we get,
27arctan(27(x12))\Rightarrow \dfrac{2}{{\sqrt 7 }}\arctan \left( {\dfrac{2}{{\sqrt 7 }}\left( {x - \dfrac{1}{2}} \right)} \right)
Hence The equation (4) becomes,
(x12)ln(x2x+2)2x+7227arctan(27(x12))\Rightarrow \left( {x - \dfrac{1}{2}} \right)\ln ({x^2} - x + 2) - 2x + \dfrac{7}{2} \cdot \dfrac{2}{{\sqrt 7 }}\arctan \left( {\dfrac{2}{{\sqrt 7 }}\left( {x - \dfrac{1}{2}} \right)} \right)
(x12)ln(x2x+2)2x+7arctan(2x17)\Rightarrow \left( {x - \dfrac{1}{2}} \right)\ln ({x^2} - x + 2) - 2x + \sqrt 7 \arctan \left( {\dfrac{{2x - 1}}{{\sqrt 7 }}} \right)

Hence ln(x2x+2)dx=(x12)ln(x2x+2)2x+7arctan(2x17)\int {\ln ({x^2}} - x + 2)dx = \left( {x - \dfrac{1}{2}} \right)\ln ({x^2} - x + 2) - 2x + \sqrt 7 \arctan \left( {\dfrac{{2x - 1}}{{\sqrt 7 }}} \right).

Note:
Remember to make use of method of integration of parts which is given by,
udv=uvvdu\int {udv = uv - \int {vdu} } .
It is important to make the right choice of u and v. Students may go wrong in this. We have to make a clever choice so that the equation gets simplified.
Also sometimes the terms will be complicated while integrating. In this situation we make use of a substitution method or any other which gives us the required solution.