<s>[INST] Partial Fraction decomposition when denominator is in $x^2 + a$ form Why isn't the expansion of $$ \frac{s^3 - 2s^2 + 16s - 2}{(s^2+1)(s^2+16)} $$
in the form of 
$$ \frac{As+B}{s^2+1} + \frac{Cs+D}{s^2+16} $$ since (as I recall) the denominator is of square power  and you should decompose it (in the numerator) until the s diminishes.
Apparently wolframalpha is saying the correct form should be
$$ \frac{A}{s^2+1} + \frac{B}{s^2+16} $$
Please clarify.
Thank you in advance.
 [/INST] We have:
$$ \dfrac{s^3 - 2s^2 + 16s - 2}{(s^2+1)(s^2+16)} = \dfrac{as+b}{s^2+1} + \dfrac{cs+d}{s^2+16} $$
When we multiply things out and equate sides, we have:
$$ s^3 - 2s^2 + 16s - 2 = 16 b + d + 16 a s + c s + b s^2 + d s^2 + a s^3 + c s^3$$
Equating like powers leads to:
$$a+c = 1, b+d = -2, 16a+c = 16, 16b+d=-2$$
When you solve for the constants, you get:
$$a = 1, b = 0, c = 0, d = -2$$
So,
$$ \dfrac{s^3 - 2s^2 + 16s - 2}{(s^2+1)(s^2+16)} = \dfrac{s}{s^2+1} - \dfrac{2}{s^2+16} $$
</s>