Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

Partial Fractions

Partial Fractions

This example was copied from Wikipedia.

For example, we want to decompose:

f(x)=1x2+2x−3f(x) = \frac{1}{x^2 + 2x - 3}

First, we factor:

q(x)=x2+2x−3=(x+3)(x−1)q(x) = x^2 + 2x - 3 = (x + 3)(x - 1)

So we have the PFD:

f(x)=1x2+2x−3=Ax+3+Bx−1f(x) = \frac{1}{x^2 + 2x - 3} = \frac{A}{x + 3} + \frac{B}{x - 1}

Giving us the polynomial identity: $$

1=A(x−1)+B(x+3)1=Ax−A+Bx+3B0x+1=(A+B)x+(−A+3B)  ⟹  0=A+B1=−A+3B\begin{align*} 1 &= A(x - 1) + B(x + 3) \\ 1 &= Ax - A + Bx + 3B \\ 0x + 1 &= (A + B)x + (-A + 3B) \\ \implies \\ 0 &= A + B \\ 1 &= -A + 3B \end{align*}

$$

Which we can solve using SymPy:

{A: -1/4, B: 1/4}

We can also have SymPy perform the entire PFD but this probably defeats the purpose:

Loading...
1(x−1)(x+2)2=Ax−1+Bx+2+C(x+2)2\frac{1}{(x-1)(x+2)^2} = \frac{A}{x-1} + \frac{B}{x+2} + \frac{C}{(x+2)^2}
1(x−1)(x2+2x+5)=Ax−1+Bx+Cx2+2x+5\frac{1}{(x-1)(x^2 + 2x + 5)} = \frac{A}{x-1} + \frac{Bx + C}{x^2 + 2x + 5}
1(x−1)(x2+2x+5)2=Ax−1+Bx+Cx2+2x+5+Dx+E(x2+2x+5)2\frac{1}{(x-1)(x^2 + 2x + 5)^2} = \frac{A}{x - 1} + \frac{Bx + C}{x^2 + 2x + 5} + \frac{Dx + E}{(x^2 + 2x + 5)^2}

question 1

1=A(x+2)2+B(x−1)(x+2)+C(x−1)1 = A(x+2)^2 + B(x-1)(x+2) + C(x-1)
{A: 1/9, B: -1/9, C: -1/3}

question 3

{A: 1/64, B: -1/64, C: -3/64, D: -1/8, E: -3/8}