Free Partial Fraction Calculator – Decompose Rational Functions Quickly

Algebra Decomposition Tool

Partial Fraction Calculator

Decompose rational functions quickly into partial fractions. This calculator handles proper rational expressions with linear factors and repeated linear factors, such as (2x+3)/((x-1)(x+2)) or (3x+5)/(x-1)^2(x+3).

Enter the rational function

Instead of typing a full expression parser, enter the numerator coefficients and choose denominator factors directly. This makes the calculator stable and lets it solve for the unknown constants accurately.

Numerator form: a₁x + a₀
Example: (x – 1), (x + 2), (x – 1)^2
Supported form:
For linear factors, the calculator rewrites P(x) / [(x-r₁)^{m₁}(x-r₂)^{m₂}…] as a sum such as A/(x-r₁) + B/(x-r₁)^2 + C/(x-r₂) + … and solves for the constants numerically.
Advertisement
Original Rational Function 0
Partial Fraction Decomposition 0
Numerator
0
Denominator
0
Unknown Constants
0
Expansion form 0
Solved coefficients 0
Verification 0
Status 0
No calculation yet.
This version is optimized for the most common algebra homework cases: distinct linear factors and repeated linear factors. It does not currently handle irreducible quadratic factors or improper fractions directly.
Advertisement

A partial fraction calculator helps you split a rational function into a sum of simpler fractions that are easier to integrate, invert with Laplace transforms, or evaluate symbolically. This guide explains the logic behind partial fraction decomposition so you can understand what a calculator is doing, verify results by hand, and avoid common mistakes.


When Partial Fractions Apply

You can decompose a rational function P(x)Q(x)\frac{P(x)}{Q(x)}Q(x)P(x)? when:

  1. P(x)P(x)P(x) and Q(x)Q(x)Q(x) are polynomials, and
  2. deg?P(x)<deg?Q(x)\deg P(x) < \deg Q(x)degP(x)<degQ(x) (if not, perform polynomial long division first), and
  3. Q(x)Q(x)Q(x) factors over the reals into linear factors (x?a)(x-a)(x?a) and/or irreducible quadratics (x2+bx+c,?b2?4c<0)(x^2+bx+c, \, b^2-4c<0)(x2+bx+c,b2?4c<0).

Standard Decomposition Forms

  1. Distinct linear factors
    If Q(x)=(x?a1)(x?a2)?(x?an)Q(x) = (x-a_1)(x-a_2)\cdots(x-a_n)Q(x)=(x?a1?)(x?a2?)?(x?an?), then P(x)Q(x)=?k=1nAkx?ak.\frac{P(x)}{Q(x)} = \sum_{k=1}^n \frac{A_k}{x-a_k}.Q(x)P(x)?=k=1?n?x?ak?Ak??.
  2. Repeated linear factor (x?a)m(x-a)^m(x?a)m P(x)(x?a)m=A1x?a+A2(x?a)2+?+Am(x?a)m.\frac{P(x)}{(x-a)^m} = \frac{A_1}{x-a} + \frac{A_2}{(x-a)^2} + \cdots + \frac{A_m}{(x-a)^m}.(x?a)mP(x)?=x?aA1??+(x?a)2A2??+?+(x?a)mAm??.
  3. Irreducible quadratic (x2+bx+c)(x^2+bx+c)(x2+bx+c) P(x)x2+bx+c=Ax+Bx2+bx+c.\frac{P(x)}{x^2+bx+c} = \frac{Ax+B}{x^2+bx+c}.x2+bx+cP(x)?=x2+bx+cAx+B?.
  4. Repeated irreducible quadratic (x2+bx+c)m(x^2+bx+c)^m(x2+bx+c)m P(x)(x2+bx+c)m=?k=1mAkx+Bk(x2+bx+c)k.\frac{P(x)}{(x^2+bx+c)^m} = \sum_{k=1}^{m} \frac{A_k x + B_k}{(x^2+bx+c)^k}.(x2+bx+c)mP(x)?=k=1?m?(x2+bx+c)kAk?x+Bk??.

The Workflow (What a Calculator Does)

  1. Check improper vs proper.
    If deg?P?deg?Q\deg P \ge \deg QdegP?degQ, perform long division: PQ=S(x)+R(x)Q(x) \frac{P}{Q} = S(x) + \frac{R(x)}{Q(x)}QP?=S(x)+Q(x)R(x)? where deg?R<deg?Q\deg R < \deg QdegR<degQ.
  2. Factor the denominator.
    Find linear and irreducible quadratic factors (with multiplicities).
  3. Write the decomposition template.
    Use the forms above to set unknown coefficients A,B,�A, B,\ldotsA,B,�.
  4. Solve for coefficients.
    • Multiply both sides by Q(x)Q(x)Q(x), expand, and equate coefficients of like powers of xxx; or
    • Use the Heaviside (cover-up) method for distinct linear factors to find simple residues quickly; then finish with equating coefficients if needed.
  5. Verify.
    Combine the found terms over a common denominator to confirm you recover P(x)/Q(x)P(x)/Q(x)P(x)/Q(x).

Worked Examples

1) Distinct linear factors

Decompose 3x+5×2?1=3x+5(x?1)(x+1)=Ax?1+Bx+1.\frac{3x+5}{x^2-1}=\frac{3x+5}{(x-1)(x+1)}=\frac{A}{x-1}+\frac{B}{x+1}.x2?13x+5?=(x?1)(x+1)3x+5?=x?1A?+x+1B?.

Multiply by (x?1)(x+1)(x-1)(x+1)(x?1)(x+1): 3x+5=A(x+1)+B(x?1)=(A+B)x+(A?B).3x+5 = A(x+1) + B(x-1) = (A+B)x + (A-B).3x+5=A(x+1)+B(x?1)=(A+B)x+(A?B).

Equate coefficients: {A+B=3A?B=5?A=4,??B=?1.\begin{cases} A+B = 3\\ A-B = 5 \end{cases} \Rightarrow A=4,\; B=-1.{A+B=3A?B=5??A=4,B=?1.

So 3x+5×2?1=4x?1?1x+1.\frac{3x+5}{x^2-1} = \frac{4}{x-1} – \frac{1}{x+1}.x2?13x+5?=x?14??x+11?.

Cover-up check:
At x=1x=1x=1: A=3x+5x+1?x=1=82=4.\displaystyle A=\left.\frac{3x+5}{x+1}\right|_{x=1}=\frac{8}{2}=4.A=x+13x+5??x=1?=28?=4.
At x=?1x=-1x=?1: B=3x+5x?1?x=?1=2?2=?1.\displaystyle B=\left.\frac{3x+5}{x-1}\right|_{x=-1}=\frac{2}{-2}=-1.B=x?13x+5??x=?1?=?22?=?1.


2) Repeated linear factor

Decompose 2x+1(x?1)2=Ax?1+B(x?1)2.\frac{2x+1}{(x-1)^2}=\frac{A}{x-1}+\frac{B}{(x-1)^2}.(x?1)22x+1?=x?1A?+(x?1)2B?.

Multiply by (x?1)2(x-1)^2(x?1)2: 2x+1=A(x?1)+B.2x+1 = A(x-1) + B.2x+1=A(x?1)+B.

Set x=1x=1x=1: 2(1)+1=3=B?B=32(1)+1=3=B\Rightarrow B=32(1)+1=3=B?B=3.
Then compare coefficients: 2x+1=Ax?A+32x+1 = A x – A + 32x+1=Ax?A+3.
Thus A=2A=2A=2 and ?A+3=1-A+3=1?A+3=1 checks.
So 2x+1(x?1)2=2x?1+3(x?1)2.\frac{2x+1}{(x-1)^2}=\frac{2}{x-1}+\frac{3}{(x-1)^2}.(x?1)22x+1?=x?12?+(x?1)23?.


3) Irreducible quadratic factor

Decompose 2×2+3x+1(x+1)(x2+1)=Ax+1+Bx+Cx2+1.\frac{2x^2+3x+1}{(x+1)(x^2+1)}=\frac{A}{x+1}+\frac{Bx+C}{x^2+1}.(x+1)(x2+1)2×2+3x+1?=x+1A?+x2+1Bx+C?.

Multiply by (x+1)(x2+1)(x+1)(x^2+1)(x+1)(x2+1): 2×2+3x+1=A(x2+1)+(Bx+C)(x+1).2x^2+3x+1 = A(x^2+1) + (Bx+C)(x+1).2×2+3x+1=A(x2+1)+(Bx+C)(x+1).

Expand RHS: Ax2+A+Bx2+Bx+Cx+C=(A+B)x2+(B+C)x+(A+C).A x^2 + A + Bx^2 + Bx + Cx + C = (A+B)x^2 + (B+C)x + (A+C).Ax2+A+Bx2+Bx+Cx+C=(A+B)x2+(B+C)x+(A+C).

Match coefficients: {A+B=2B+C=3A+C=1?A=0,??B=2,??C=1.\begin{cases} A+B = 2\\ B+C = 3\\ A+C = 1 \end{cases} \Rightarrow A=0,\; B=2,\; C=1.????A+B=2B+C=3A+C=1??A=0,B=2,C=1.

So 2×2+3x+1(x+1)(x2+1)=0x+1+2x+1×2+1=2x+1×2+1.\frac{2x^2+3x+1}{(x+1)(x^2+1)}=\frac{0}{x+1}+\frac{2x+1}{x^2+1}=\frac{2x+1}{x^2+1}.(x+1)(x2+1)2×2+3x+1?=x+10?+x2+12x+1?=x2+12x+1?.

(Here the linear term ends up capturing everything; this is a good sanity check example.)


Long Division First: An Improper Example

x3+2×2+1×2?1\frac{x^3+2x^2+1}{x^2-1}x2?1×3+2×2+1?

Divide: x3+2×2+1=(x2?1)(x+2)+(2x+3)x^3+2x^2+1 = (x^2-1)(x+2) + (2x+3)x3+2×2+1=(x2?1)(x+2)+(2x+3).
Thus x3+2×2+1×2?1=x+2+2x+3×2?1=x+2+Ax?1+Bx+1.\frac{x^3+2x^2+1}{x^2-1} = x+2 + \frac{2x+3}{x^2-1} = x+2 + \frac{A}{x-1}+\frac{B}{x+1}.x2?1×3+2×2+1?=x+2+x2?12x+3?=x+2+x?1A?+x+1B?.

Proceed as in Example 1 to find AAA and BBB.


Cover-Up Method (Heaviside) in a Nutshell

For distinct linear factors: P(x)?k(x?ak)=?kAkx?ak,Ak=P(x)?j?k(x?aj)?x=ak.\frac{P(x)}{\prod_{k}(x-a_k)}=\sum_k \frac{A_k}{x-a_k},\quad A_k=\left.\frac{P(x)}{\prod_{j\ne k}(x-a_j)}\right|_{x=a_k}.?k?(x?ak?)P(x)?=k??x?ak?Ak??,Ak?=?j?=k?(x?aj?)P(x)??x=ak??.

This gives the simple residues quickly. For repeated factors and quadratics, use equating coefficients.


Common Mistakes to Avoid

  • Skipping long division when the fraction is improper.
  • Using A/(x2+bx+c)A/(x^2+bx+c)A/(x2+bx+c) for an irreducible quadratic; it must be (Ax+B)/(x2+bx+c)(Ax+B)/(x^2+bx+c)(Ax+B)/(x2+bx+c).
  • Forgetting terms for repeated factors (you need a term for each power).
  • Not verifying by recombining over the common denominator.

Applications

  • Integration: Decompose first, then integrate term by term.
  • Differential Equations & Laplace Transforms: Convert rational expressions to simpler forms for inverse transforms.
  • Algebraic Simplification: Make expressions easier to manipulate or evaluate.

FAQ

Do I always need to factor completely?
Yes, decompose with respect to linear and irreducible quadratic factors. Over the reals, not all quadratics factor into linears.

What if factoring is hard?
Symbolic calculators use algorithms (e.g., square-free factorization). By hand, try rational root tests and complete the square for quadratics.

How do I check my decomposition?
Combine your result over a common denominator and confirm you recover the original numerator.

Can I use partial fractions for complex numbers?
Yes. Over C\mathbb{C}C, every polynomial factors into linear terms; coefficients may be complex.

Why do some coefficients become zero?
It simply means certain partial terms are not needed after solving the system�this is normal.


Conclusion

A partial fraction calculator automates factorization, template setup, coefficient solving, and verification. Understanding the process ensures you can trust the output, spot mistakes, and handle edge cases�especially when integrating or applying Laplace transforms.