<s>[INST] Integral $\int \frac{2x^5-2x^4+2x^3+3}{2x^4-2x^3-x^2+1}dx$ as partial fraction solved using matrix equation in order to solve the integral $$\int \frac{2x^5-2x^4+2x^3+3}{2x^4-2x^3-x^2+1}\mathrm dx,$$
the expression inside the integral can be expressed as
$$(2x^5-2x^4+2x^3+3/2x^4-2x^3-x^2+1)= x+(A/(x-1))+(B/(x-1)^2)+(Cx+D/2x^2+2x+1)$$
from here I have been ask to set up the system of linear simultaneous equations that are needed to be solved to calculate the integral, by utilising MX=Z, where M is the coefficient matrix, X is the solution vector containing the coefficients, and Z is the RHS of the matrix equation 
I have attempt to do this by factoring the LHS denominator to the form of 
$$(x-1)^2(2x^2+2x+1)$$ and then multiplied both sides by this giving the resulting equation 
$$2x^5-2x^4+2x^3+3 = 2x^5-2x^4+2x^3+3+A(x-1)(2x^2+2x+1)+B(2x^2+2x+1)+CxD(x-1)^2$$
if I subtract $(2x^5-2x^4+2x^3+3)$ from LHS I am left with 
$$LHS = 3x^3-x+3$$
I have tried expanding out the rest of the RHS and then collected like terms and to try and set up four equations
$3=2A+CD$
$0=2B-2CD$
$-1=-A+2B+CD$
$3=-A+B$
however, there is no solution. 
any help would be appreciated
 [/INST] Hint. This is an exercise in simplifying the integrand.
First divide to obtain $$x+\frac{3x^3-x+3}{2x^4-2x^3-x^2+1}.$$ We now focus on the second part, and we immediately recognise that the denominator vanishes when $x=1.$ Hence $x-1$ is a factor of the denominator. Dividing out, we can express the fraction as $$\frac{3x^3-x+3}{(x-1)(2x^3-x-1)},$$ and again noticing that the cubic below has a factor $x-1$ we easily obtain $$\frac{3x^3-x+3}{(x-1)^2(2x^2+2x+1)},$$ or fully factored, $$\frac32\frac{x^3-x/3+1}{(x-1)^2\left(x^2+x+\frac12\right)}.$$ I shall now ignore the constant factor henceforth.
We then write the last fraction as $$\frac{\left(x^2+x+\frac12\right)-\left(x^2+x+\frac12\right)+x^3-x/3+1}{(x-1)^2\left(x^2+x+\frac12\right)}=\frac{\left(x^2+x+\frac12\right)}{(x-1)^2\left(x^2+x+\frac12\right)}+\frac{-\left(x^2+x+\frac12\right)+x^3-x/3+1}{(x-1)^2\left(x^2+x+\frac12\right)},$$ which simplifies to become $$\frac{1}{x-1}+\frac56\frac{x+9/5}{(x-1)^2\left(x^2+x+\frac12\right)}.$$ Ignoring the first part again, we focus on the second and write it as (also ignoring the constant $5/6$) $$\frac{x-1+1+9/5}{(x-1)^2\left(x^2+x+\frac12\right)}=\frac{x-1}{(x-1)^2\left(x^2+x+\frac12\right)}+\frac{1+9/5}{(x-1)^2\left(x^2+x+\frac12\right)},$$ which simplifies to become $$\frac{1}{(x-1)\left(x^2+x+\frac12\right)}+\frac{14}{5}\frac{1}{(x-1)^2\left(x^2+x+\frac12\right)}.$$
You may now deal with the last two fractions, as usual.
</s>