Let the partial fractions of #(2x+1)/((x+1)^3(x^2+4)^2#
#A/(x+1)+B/(x+1)^2+C/(x+1)^3+(Dx+E)/(x^2+4)+(Fx+G)/(x^2+4)^2#
(as we have linear binomials or their powers in denominator we have used just A, B and C in numerator we have put binomials as denominators are quadratic or their powers)
Simplifying we get
#(A(x+1)^2(x^2+4)^2+B(x+1)(x^2+4)^2+C(x^2+4)^2+(Dx+E)(x^2+4)(x+1)^3+(Fx+G)(x+1)^3)/((x+1)^3(x^2+4)^2#
The numerator can now be simplified to
#(Ax^2+2Ax+A)(x^4+8x^2+16)+(Bx+B)(x^4+8x^2+16)+C(x^4+8x^2+16)+(Dx^3+Ex^2+4Dx+4E)(x^3+3x^2+3x+1)+(Fx+G)(x^3+3x^2+3x+1)#
#(Ax^6+8Ax^4+16Ax^2+2Ax^5+16Ax^3+32Ax+Ax^4+8Ax^2+16A)+(Bx^5+8Bx^3+16Bx+Bx^4+8Bx^2+16B)+(Cx^4+8Cx^2+16C)+(Dx^6+3Dx^5+3Dx^4++Dx^3+Ex^5+3Ex^4+3Ex^3+Ex^2+4Dx^4+12Dx^3+12Dx^2+4Dx+4Ex^3+12Ex^2+12Ex+4E)+(Fx^4+3Fx^3+3Fx^2+Fx+Gx^3+3Gx^2+3Gx+G)#
This can be simplified to
#x^6(A+D)+x^5(2A+B+3D+E)+x^4(8A+A+B+C+3D+3E+4D+F)+x^3(16A+8B+D+3E+12D+4E+3F+G)+x^2(16A+8A+8B+8C+E+12D+12E+3F+3G)+x(32A+16B+4D+12E+F+3G)+(16A+16B+16C+4E+G)# or
#x^6(A+D)+x^5(2A+B+3D+E)+x^4(9A+B+C+7D+3E+F)+x^3(16A+8B+7E+13D+3F+G)+x^2(24A+8B+8C+12D+13E+3F+3G)+x(32A+16B+4D+12E+F+3G)+(16A+16B+16C+4E+G)# and as numerator is #2x+1#
We have #A+D=0#; #2A+B+3D+E=0#; #9A+B+C+7D+3E+F=0#; #16A+8B+7E+13D+3F+G=0#; #24A+8B+8C+12D+13E+3F+3G=0#; #32A+16B+4D+12E+F+3G=2# and #16A+16B+16C+4E+G=1#
Now we have #7# simultaneous linear equations in #7# variables, which should give us values of #A,B,C,D,E,F# and #G# and putting this in #A/(x+1)+B/(x+1)^2+C/(x+1)^3+(Dx+E)/(x^2+4)+(Fx+G)/(x^2+4)^2#, will give us the partial fractions.