# Fast partial-fraction decomposition

I'm studying Laplace transformations for my differential equations class and typically there's a partial fraction decomposition involved, which can be very long and demanding for calculations by hand, if done the standard way.

I am aware of some of the tricks used to speed-up this procedure (like the usage of limits at infinity, or multiplying with denominators and taking particular values of $s$), however I am not able to apply them at this example:

$$\frac {s} {(s^2+2s+5)(s^2+4)} = \frac {\alpha s + \beta} {s^2+2s+5} + \frac {\gamma s + \delta} {s^2+4}$$

For example, if I attempt to extract a relation for $\gamma$ and $\delta$, by multiplying with $s^2+4$ and taking $s=2i$, I get and equation that involves complex numbers; that makes me feel I have not gained much in terms of number of operations.

Are there any better tricks for this example?

• Solving an easy system of four linear equations is probably faster than thinking about tricks. – Eckhard Apr 4 '13 at 21:27
• One ends up solving $\rm\ \gamma+2\delta =1,\ \delta -8\gamma = 0,\$ which is very easy. Are you trying to find something simpler than that? See here for another example of a nonlinear Heaviside cover-up method. @Greg typo fixed. – Math Gems Apr 4 '13 at 21:56
• @MathGems: shouldn't there be four linear equations in the four unknowns? – Greg Martin Apr 4 '13 at 21:59
• @Greg My comment addresses the OP's remark about "extracting a relation for $\gamma$ and $\delta$". This gives said two equations. For a worked example see the link I gave. – Math Gems Apr 4 '13 at 22:02
• Got it now, thanks. – Greg Martin Apr 4 '13 at 22:04

Let's apply the Heaviside cover-up method, nonlinear version, as described by Bill Dubuque.

$$\rm \frac{x}{(x^2\!+2x+5)(x^2\!+4)} \ =\ \frac{ax+b}{x^2\!+2x+5}\, +\ \frac{cx+d}{x^2\!+4}$$

Clearing denominators yields

$$\rm x\, =\, (x^2\!+4)(ax+b)\, +\, (x^2\!+2x+5)(cx+d)$$

Evaluating this mod $\rm\ x^2\! +\! 4\,\:$ i.e.$\:$ iteratively applying the rewrite rule $\rm\ x^2 \to -4\,\$ yields

$$\rm x\, =\, (c\!+\!2d)\ x\,+\, d\!-\!8c\ \ \Rightarrow\ \ c = 1/17,\,\ d= 8/17$$

Evaluating it mod $\rm\ x^2\! +\! 2x\!+\!5\:,\:$ i.e.$\:$ iteratively applying rewrite rule $\rm\ x^2 \to -2x\!-\!5\:$ yields

$$\rm x\, =\, (3a\!-\!2b)\ x \,+\, 10a\!-\!b\ \ \Rightarrow\ \ a = -1/17,\,\ b = -10/17$$

That seems easy enough to me.

• I wasn't aware of this method and I couldn't come up with it on my own. This is great, thank you. – gpo Apr 4 '13 at 22:32

Well, the following is certainly a trick. Whether it's better or not remains to be decided....

First, I want to make the factors in the denominator symmetric with respect to the origin (right now they're of the form $s^2+4$ and $(s+1)^2+4$, hence symmetric with respect to $1/2$). So setting $s=t-1/2$, we have the equivalent problem of doing partial fractions on $$\frac{16 t-8}{(4 t^2-4t+17)(4 t^2+4t+17)}.$$

Let's start by noting (using the symmetry) that $$\frac{1}{4 t^2-4t+17} - \frac{1}{4 t^2+4t+17} = \frac{8t}{(4 t^2-4t+17)(4 t^2+4t+17)}.$$ How can we divide everything in sight by $t$? Notice that the inverse of $t$ modulo $4t^2-4t+17$ is $(-4t+4)/17$, while the inverse of $t$ modulo $4t^2+4t+17$ is $(-4t-4)/17$. So we get \begin{align*} \frac{8}{(4 t^2-4t+17)(4 t^2+4t+17)} &= \frac{1/t}{4 t^2-4t+17} - \frac{1/t}{4 t^2+4t+17} \\ &\equiv \frac{-4t+4}{17(4 t^2-4t+17)} + \frac{4t+4}{17(4 t^2+4t+17)} \pmod1. \end{align*} But this (mod 1)-equivalence must actually be an equality(!): by the theory of partial fractions, the left-hand side (whose numberator has larger degree than the denominator) has a representation in the form of the right-hand side.

Between the last two identities, we see that $$\frac{16 t-8}{(4 t^2-4t+17)(4 t^2+4t+17)} = \frac{42 t+30}{17 (4 t^2-4 t+17)}-\frac{4t+38}{17 (4 t^2+4 t+17)};$$ now plugging $t=s+1/2$ back in yields $$\frac s{(s^2+2s+5)(s^2+4)} = \frac{-s-10}{17 (s^2+2 s+5)}+\frac{s+8}{17 (s^2+4)}.$$

I know this is a late answer but I thought it would be useful. First, you can use cover up method by plugging in $x=2i$. You end up getting $$\frac{(2i+8)}{17}= C(2i)+D\implies \frac{2i}{17}= C(2i) \implies C=\frac1{17}\text{ and }D=\frac8{17}.$$ Easy as that! To get $A$ and $B$, use cover up with $x= -1+2i$ which is one of the complex roots of $x^2+2x+5$. So $$\frac{-1+2i}{(-1+2i)^2+4} = A(-1+2i)+B \implies \frac{-1+2i}{1-4i}= A(-1+2i)+B.$$ Finally multiply by conjugate and we get $$\frac{(-1+2i)(1+4i)}{17}= A(-1+2i)+B\implies\frac{-9-2i}{17}= B-A+2iA \implies -\frac2{17}=2iA \implies A=-\frac1{17}$$ and so $B-A= -\frac9{17}\implies B= -\frac1{17}-\frac9{17}=-\frac{10}{17}$. Hence $A=-\frac1{17}$ and $B=-\frac{10}{17}$.