text: # How to evaluate $\int \frac{x^6}{x^4-1} \, \mathrm{d}x.$
  
  Evaluate the integral:
  
  $$\int \frac{x^6}{x^4-1} \, \mathrm{d}x$$
  
  After a lot of help I have reached this point:
  
  $x^2 = Ax^3 - Ax + Bx^2 - B + Cx^3 + Cx^2 + Cx + C + Dx^3 - Dx^2 + Dx - D$
  
  But now I don't really know how to solve for $A, B, C$, and $D$. Please help!
  
  -
  First do division, then factor the denominator using difference of squares. – Adam Hughes Jul 1 '14 at 20:48
  
  First: Divide! Use polynomial division to get $$\frac{x^6}{x^4 - 1} = 1 + \frac{x^2}{x^4 - 1}$$ $\int 1\,dx = x + C$
  
  For the second term:
  
  Now factor the denominator, and decompose: $$x^4 - 1 = (x^2 + 1)(x^2-1) = (x^2 + 1)(x-1)(x+1)$$
  
  So the set up we want for the second term is:
  
  $$\frac{x^2}{x^4 - 1} = \dfrac{Ax + B}{x^2 + 1} +\frac{C}{x-1} + \frac D{x+1}$$
  
  Now solve for A, B, C, D.
  
  -
  When I did the log division I got 1 + (x^2/x^4 - 1) o_o where did I go wrong? – user152099 Jul 1 '14 at 20:53
  You long division is correct. – amWhy Jul 1 '14 at 20:54
  Would I have to simplify it further like this?: x^2 = Ax+B(x-1)(x+1) + C (x^2+1)(x+1) + D (x^2 + 1)(x-1) and then distribute? – user152099 Jul 1 '14 at 21:00
  That would give me x^2 = Ax^3 - Ax + Bx^2 - B + Cx^3 + Cx^2 + Cx + C + Dx^3 - Dx^2 + Dx - D. Now what should I do to solve for A, B, C, and D? I don't really know how to do that. – user152099 Jul 1 '14 at 21:07
  You made a mistake. – Tunk-Fey Jul 2 '14 at 10:02
  
  Integrand can be transformed without long divison $$\begin{gathered}\frac{x^6}{x^4 - 1}=\frac{x^6-1+1}{x^4 - 1}=\frac{(x^2-1)(x^4+x^2+1)}{x^4 - 1}+\frac{1}{x^4 - 1}=\\ =\frac{x^4+x^2+1}{x^2 + 1} + \frac{1}{x^4 - 1}=\\ =x^2+\frac{1}{x^2 + 1}+\frac{1}{2}\left(\frac{1}{x^2-1} - \frac{1}{x^2+1} \right)=\\ =x^2 + \frac{1}{2}\left(\frac{1}{x^2-1} + \frac{1}{x^2+1} \right). \end{gathered}$$
  
  -
  
  Rewrite the integrand as \begin{align} \frac{x^6}{x^4-1}&\stackrel{\color{red}{[1]}}=\color{darkgreen}{x^2}+\color{blue}{\frac{x^2}{x^4-1}}\\ &=\color{darkgreen}{x^2}+\color{blue}{\frac{x^2}{(x^2-1)(x^2+1)}}\\ &\stackrel{\color{red}{[2]}}=\color{darkgreen}{x^2}+\color{blue}{\frac{1}{2}\left(\color{black}{\frac{1}{x^2+1}}+\color{red}{\frac{1}{x^2-1}}\right)}\\ &=\color{darkgreen}{x^2}+\color{blue}{\frac{1}{2}\left(\color{black}{\frac{1}{x^2+1}}+\color{red}{\frac{1}{(x-1)(x+1)}}\right)}\\ &\stackrel{\color{red}{[3]}}=\color{darkgreen}{x^2}+\color{blue}{\frac{1}{2}\left(\color{black}{\frac{1}{x^2+1}}+\color{red}{\frac12\left[\frac1{x-1}-\frac1{x+1}\right]}\right)}\\ &=x^2+\color{red}{\underbrace{\color{black}{\frac{1}{2(x^2+1)}}}_{\color{blue}{\large \color{black}{\text{set}}\ x=\tan\theta}}}+\color{red}{\underbrace{\color{black}{\frac1{4(x-1)}}}_{\color{blue}{\large \color{black}{\text{set}}\ u=x-1}}}-\color{red}{\underbrace{\color{black}{\frac1{4(x+1)}}}_{\color{blue}{\large \color{black}{\text{set}}\ v=x+1}}} \end{align}
  
  Notes :
  
  $\color{red}{[1]}\;\;\;$Polynomial long division
  
  $\color{red}{[2]}\text{ and }\color{red}{[3]}\;\;\;$Partial fractions decomposition
  
  -