#### Please Solve R.D.Sharma Class 12 Chapter 18 Indefinite Integrals Exercise 18.20 Question 6 Maths Textbook Solution.

Answer: $x+\log \left|x^{2}-x+1\right|+\frac{2}{\sqrt{3}} \tan ^{-1}\left(\frac{2 x-1}{\sqrt{3}}\right)+c$

Given: $\int \frac{x^{2}+x+1}{x^{2}-x+1} d x$

Hint: Using Partial Fraction

Explanation:

Let

$I=\int \frac{x^{2}+x+1}{x^{2}-x+1} d x$

$\frac{x^{2}+x+1}{x^{2}-x+1}=\frac{x^{2}-x+x+x+1}{x^{2}-x+1}=\frac{x^{2}-x+1}{x^{2}-x+1}+\frac{2 x}{x^{2}-x+1}$

$=1+\frac{2 x-1}{x^{2}-x+1}+\frac{1}{x^{2}-x+1}$

$\int \frac{x^{2}+x+1}{x^{2}-x+1} d x=\int 1 d x+\int \frac{2 x-1}{x^{2}-x+1} d x+\int \frac{1}{x^{2}-x+\left(\frac{1}{2}\right)^{2}-\left(\frac{1}{2}\right)^{2}+1} d x$

$=\int 1 d x+\int \frac{2 x-1}{x^{2}-x+1} d x+\int \frac{1}{\left(x-\frac{1}{2}\right)^{2}+\left(\frac{\sqrt{3}}{2}\right)^{2}} d x$

$=x+\log \left|x^{2}-x+1\right|+\frac{1}{\frac{\sqrt{3}}{2}} \tan ^{-1}\left(\frac{2 x-1}{\sqrt{3}}\right)+c$

$=x+\log \left|x^{2}-x+1\right|+\frac{2}{\sqrt{3}} \tan ^{-1}\left(\frac{2 x-1}{\sqrt{3}}\right)+c$