could someone help me
(x+5)dx/(x^2+x+1)
and this
(1/sqrt(2)*x+1)dx/(x^2-x*sqrt(2) +1)
By completing the square: $\displaystyle x^2+x+1= x^2+x+ (1/4)- (1/4)+ 1= (x+1/2)^2+ 3/4$. That cannot be factored in terms of real numbers and so you cannot use "partial fractions". Make the substitution u= x+ 1/2 instead.
Here, completing the square gives $\displaystyle x^2- x\sqrt{2}+ 1/2- 1/2+ 1= (x-\frac{\sqrt{2}}{2})^2+ 3/4$.and this
(1/sqrt(2)*x+1)dx/(x^2-x*sqrt(2) +1)
Again, you can't use partial fractions. Make the substitution $\displaystyle u= x-\frac{\sqrt{2}}{2}$ instead.
Consider
$\displaystyle \int \frac{x^2 + 1 }{x^4 + 1}~dx$
$\displaystyle = \int \frac{ 1 + 1/x^2 }{ x^2 + 1/x^2}~dx $
$\displaystyle = \int \frac{ 1+ 1/x^2}{ (x-1/x)^2 + 2} ~dx $
Sub $\displaystyle x - 1/x = t ~~\implies (1 + 1/x^2 )dx = dt$
the integral becomes
$\displaystyle \int \frac{dt}{ t^2 + 2}$
$\displaystyle = \frac{1}{\sqrt{2}} \tan^{-1}( \frac{x - 1/x}{\sqrt{2}}) + c$
similarly for $\displaystyle \int \frac{ x^2 - 1}{x^4 + 1}~dx $
$\displaystyle = - \frac{1}{\sqrt{2}} \tanh^{-1}( \frac{\sqrt{2}}{x + 1/x}) + c$
Finally , take sum of difference of them , what will you see then ?
Here is the technique of resolving $\displaystyle \frac{1}{1 + x^n} $ into partial fractions .
$\displaystyle (1 + x^n ) = (1 +x ) ( 1 - ax + x^2 ) ( 1 - bx + x^2 ) ... $
( * the term " 1 + x " exists only for n is odd )
Then , " log " both sides
$\displaystyle \ln(1 + x^n) = \ln(x+1) + \ln(1 - ax + x^2) + \ln(1 - bx + x^2 ) + ...$
After that , differentiate both sides ( we call this " Logarithmic Differentiaion ! )
$\displaystyle \frac{ nx^{n-1}}{ 1 + x^n} = \frac{1}{1 + x} + \frac{ 2x - a}{1 - ax + x^2} + \frac{2x - b}{ 1 - bx + x^2} + ... $
Replace $\displaystyle x $ with $\displaystyle \frac{1}{x}$
$\displaystyle \frac{ n x }{ 1 + x^n } = \frac{x}{1 + x} + \frac{ 2x - ax^2 }{ 1 - ax + x^2 } + \frac{ 2x - bx^2 }{ 1 - bx + x^2 } + ...$
Divide both sides by $\displaystyle x $
$\displaystyle \frac{1}{ 1 + x^n } = \frac{1}{n} [ \frac{1}{ 1 + x } + \frac{ 2 - ax }{1 -ax + x^2} + \frac{ 2 -bx}{ 1 -bx + x^2} + ...$
ps : you should know what a ,b , c , d ... are . for this case ,
let $\displaystyle a = \sqrt{2} , b = -\sqrt{2}$