Let f(x)=2x^3-5x^2+x+2
f(1)=2-5+1+2=0
Therefore, (x-1) is a factor
f(2)=16-20+2+2=0
Therefore, (x-2) is a factor
(x-1)(x-2)=x^2-3x+2 is a factor
To find the last factor, we do a long division
color(white)(aaaa)2x^3-5x^2+x+2color(white)(aaaa)∣x^2-3x+2
color(white)(aaaa)2x^3-6x^2+4xcolor(white)(aaaaaaa)∣2x+1
color(white)(aaaaaa)0+x^2-3x+2
color(white)(aaaaaaaa)+x^2-3x+2
color(white)(aaaaaaaaaa)+0-0+0
We can perform the decomposition into partial fractions
(x^2+1)/(2x^3-5x^2+x+2)=(x^2+1)/((x-1)(x-2)(2x+1))
=A/(x-1)+B/(x-2)+C/(2x+1)
=(A(x-2)(2x+1)+B(x-1)(2x+1)+C(x-1)(x-2))/((x-1)(x-2)(2x+1))
Therefore,
x^2+1=A(x-2)(2x+1)+B(x-1)(2x+1)+C(x-1)(x-2))
Let x=1, =>, 2=-3A, =>, A=-2/3
Let x=2, =>, 5=5B, =>, B=1
Let x=-1/2, =>, 5/4=15/4C, =>, C=1/3
So,
(x^2+1)/(2x^3-5x^2+x+2)=(-2/3)/(x-1)+1/(x-2)+(1/3)/(2x+1)
int((x^2+1)dx)/(2x^3-5x^2+x+2)=int((-2/3)dx)/(x-1)+int(dx)/(x-2)+int((1/3)dx)/(2x+1)
=-2/3ln(∣x-1∣)+ln(∣x-2∣)+1/6ln(∣2x+1∣)+C