I have recently learned about the use of Partial Fraction Decomposition (P.F.D) in integration.
I want to know whether one has to memorize the decompositions for various fractions or is there some logic behind them from which we can quickly figure 'them' out ( 'them' referring to knowing whether the numerator should be a constant, linear or quadratic polynomial just by seeing the particular fraction; etc.).
Consider this fraction $$\dfrac{x^4 +x +1}{x^3 \cdot (x^2 +9)^2}$$
I've read that its decomposition is: $$\dfrac{A}{x} + \dfrac{B}{x^2} + \dfrac{C}{x^3} + \dfrac {Dx+E}{x^2 +9} + \dfrac{Fx+G}{{(x^2 +9)}^2}$$
I'm this the numerator of 3 terms is a constant but then suddenly the rest two terms have linear expressions as their numerator. So, if I got even one of the terms wrong my calculations would go wrong too! And that is just another example of the several different fractions we get.
So, Is their some technique or logic that can be used for figuring out the P.F.D or do we actually need to memorize all of that?