# How would I integrate this? Partial fractions?

I'm wondering how I would go about integrating this.

$\int (4x^2 - 3x + 2) / (4x^2 - 4x +3) dx$

I believe the right method would be to use partial fractions.. But if that is the case, I'm not sure how to do it. It's been quite some time since I've had to use said method.

Any help is greatly appreciated!

\begin{align} \int{\frac{4x^2-3x+2}{4x^2-4x+3}dx}&=\int{\frac{4x^2-4x+3+(x-1)}{4x^2-4x+3}dx}\\ &=\int{\left(1+\frac{x-\frac{1}{2}}{4x^2-4x+3}-\frac{\frac{1}{2}}{4x^2-4x+3}\right)dx}\\ &=x+\frac{1}{8}\ln(4x^2-4x+3)-\frac{1}{8}\int{\frac{1}{(x-\frac{1}{2})^2+\frac{1}{2}}dx}\\ &=x+\frac{1}{8}\ln(4x^2-4x+3)-\frac{\sqrt{2}}{8}\tan^{-1}[\sqrt{2}(x-\frac{1}{2})]+C \end{align}

$$f(x)=\dfrac{4 x^2-3 x+2}{4 x^2-4 x+3} =\dfrac{ x-1}{4 x^2-4 x+3}+1$$ Now $4 x^2-4 x+3$ is irreducible in $\mathbb R$, so we write $$\dfrac{ x-1}{4 x^2-4 x+3}=\dfrac{1}{8}\dfrac{ 8x-8}{4 x^2-4 x+3}=\dfrac{1}{8}\dfrac{ 8x-4}{4 x^2-4 x+3}-\dfrac{1}{2}\dfrac{ 1}{4 x^2-4 x+3}$$ Now $$\int \dfrac{ 8x-4}{4 x^2-4 x+3}dx=\log(|4 x^2-4 x+3|)$$ and $$\dfrac{ 1}{4 x^2-4 x+3}=\dfrac{ 1}{(2x-1)^2+2}=\dfrac{ 1}{2}\dfrac{ 1}{(\dfrac{2x-1}{\sqrt2})^2+1}$$ Now $$\int \dfrac{ 1}{(\dfrac{2x-1}{\sqrt2})^2+1}dx=\dfrac{\sqrt2}{2}tan^{-1}(\dfrac{2x-1}{\sqrt2}))$$ hence $$\int f(x)dx= \dfrac{1}{8}\log(|4 x^2-4 x+3|)+x-\dfrac{\sqrt2}{8}\; tan^{-1}(\dfrac{2 x-1}{\sqrt2})+constant$$