In order to use partial fractions, the degree of the numerator must be less than the degree of the denominator. If the numerator and denominator have the same degree, or the numerator is higher than the denominator, then you must use long division to find that.
Using long division, we get
color(white)(aaaaaaaaaaaaaaaaaaa)xaaaaaaaaaaaaaaaaaaax
x^3+0x^2+2x+0 " " |bar(x^4+0x^3+0x^2+0x+1)x3+0x2+2x+0 ∣¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯x4+0x3+0x2+0x+1
color(white)(aaaaaaaaaaaaaaaa)-ul((x^4+0x^3+2x^2+0x))
color(white)(aaaaaaaaaaaaaaaaaaaaaaaaaaa)-2x^2color(white)(aaa)+1
Therefore,
(x^4+1)/(x^3+2x)=x-(2x^2-1)/(x^3+2x)
Factoring out an x from the denominator gives
x-color(blue)((2x^2-1)/(x(x^2+2)))
The partial fraction decomposition changes the color(blue)("blue") section and breaks into multiple rational functions.
(2x^2-1)/(x(x^2+2))=A/x+(Bx)/(x^2+2)
Multiplying both sides by the common denominator x(x^2+2)
2x^2-1=A(x^2+2)+Bx^2
The case, x=0 gives
-1=2A => A=-1/2
Plugging A=-1/2 back in gives
2x^2-1=-1/2(x^2+2)+Bx^2
The case, x=1 gives
1=-3/2+B
B=5/2
So our partial fraction decomposition is
(2x^2-1)/(x(x^2+2))=(-1/2)/x+(5/2x)/(x^2+2)
EXPERT TIP: I like to keep the fractions on top because it makes the later integration a little easier.
This gives us:
(x^4+1)/(x^3+2x)=x+(1/2)/x+(5/2x)/(x^2+2)
Let's integrate it:
int(x+(1/2)/x+(5/2x)/(x^2+2))dx
int(x)dx+int((1/2)/x)dx+int((5/2x)/(x^2+2))dx
int(x)dx+1/2int(1/x)dx+5/2int((x)/(x^2+2))dx
x^2/2+1/2ln(x)+C+5/2int((x)/(x^2+2))dx
Using u substitution on the last one, we get
Let u=x^2+2 and du=2xdx or xdx=1/2du
So int(x/(x^2+2))dx=int(1/u)1/2du=1/2ln(u)+C
Plugging u=x^2+2 back in gives
int(x/(x^2+2))dx=1/2ln(x^2+2)+C
So our final answer is
x^2/2+1/2ln(x)+C+5/2(1/2ln(x^2+2)+C)
x^2/2+1/2ln(x)+5/4ln(x^2+2)+C