Perform partial fraction decomposition:
#(x^2-1)/((x^2+1)(x^2+2)) =A/(x^2+1) + B/(x^2+2)#
#(x^2-1)/((x^2+1)(x^2+2)) =(A(x^2+2) +B(x^2+1))/((x^2+1)(x^2+2)) #
#x^2-1 = (A+B)x^2 +(2A+B)#
#{(A+B=1),(2A+B=-1):}#
#{(A=-2),(B=3):}#
#(x^2-1)/((x^2+1)(x^2+2)) = 3/(x^2+2)-2/(x^2+1)#
Consider now the sum of a geometric series:
#sum_(n=0)^oo q^n = 1/(1-q)# for #absq<1#
we have:
#3/(x^2+2) = 3/2 1/(1+x^2/2)#
Let #q= -x^2/2# so we can see that:
#3/(x^2+2) = 3/2 sum_(n=0)^oo (-x^2/2)^n#
#3/(x^2+2) = 3/2 sum_(n=0)^oo (-1)^n x^(2n)/2^n#
SImilarly:
#2/(x^2+1) = 2sum_(n=0)^oo (-1)^n x^(2n)#
Then:
#(x^2-1)/((x^2+1)(x^2+2)) = 3/2 sum_(n=0)^oo (-1)^n x^(2n)/2^n - 2sum_(n=0)^oo (-1)^n x^(2n)#
and grouping the terms of the same index:
#(x^2-1)/((x^2+1)(x^2+2)) = sum_(n=0)^oo (-1)^n (3/2^(n+1)-2)x^(2n)#
#(x^2-1)/((x^2+1)(x^2+2)) =-1/2+5/4x^2-13/8x^4+...#