Partial Fractions Calculator with Steps
Use this Partial Fractions Calculator to decompose a rational expression into simpler fractions and view the complete solution step by step. Enter the numerator and denominator separately, or type the entire rational expression in the combined input field.
The calculator checks whether the rational expression is proper or improper, performs polynomial long division when required, factors the denominator, constructs the correct partial-fractions form, solves the unknown coefficients, and displays the final decomposition.
It supports exact fractional results, decimal approximations, repeated factors, irreducible polynomial factors, recent calculation history, preset examples, LaTeX copying, and printable solution steps.
🔢 Expression Input
(x^2 - 4)/(x^2 + 2x + 5) or (5x-4)/(x^2-x-2)x^2 + 2x + 5 or factored: (x-1)^2(x+1)💡 Standard Presets
⏱️ Recent History
Ready to Decompose
Enter a rational function in the left panel and click “Decompose Now”. You’ll get an exact, beautifully formatted step-by-step breakdown using standard algebraic methods.
How to Use the Partial Fractions Calculator
The tool provides two ways to enter a rational expression.
Enter the Complete Rational Expression
Type the complete fraction using a slash between the numerator and denominator.
For example: (5x-4)/(x^2-x-2)
Use parentheses around both parts when the numerator or denominator contains more than one term.
Another valid example is: (3x^2+5x-1)/((x-1)^2(x+1))
Enter the Numerator and Denominator Separately
You may instead enter the numerator and denominator in their individual fields.
Numerator: 5x-4
Denominator: x^2-x-2
The denominator may be entered in expanded form: x^2-x-2
or factored form: (x-2)(x+1)
Repeated factors can be entered using powers: (x-1)^2(x+1)
After entering the expression:
- Select Fraction for an exact answer or Decimal for an approximation.
- Select the number of decimal places when using decimal mode.
- Click Decompose Now.
- Open each solution step to review the working.
- Copy the final result as text or LaTeX, or print the steps.
What Is Partial Fraction Decomposition?
Partial fraction decomposition is a method of rewriting a rational expression as a sum of simpler rational expressions.

A rational expression has the general form:
\[\frac{P(x)}{Q(x)}\]
Here, \(P(x)\) and \(Q(x)\) are polynomials and:
\[Q(x)\neq 0\]
For example, consider:
\[\frac{5x-4}{x^2-x-2}\]
The denominator can be factored as:
\[x^2-x-2=(x-2)(x+1)\]
Therefore, the rational expression can be written in the form:
\[\frac{5x-4}{(x-2)(x+1)}=\frac{A}{x-2}+\frac{B}{x+1}\]
After calculating the coefficients, we obtain:
\[\frac{5x-4}{x^2-x-2}=\frac{2}{x-2}+\frac{3}{x+1}\]
The decomposed fractions are easier to integrate and may also be useful in algebra, differential equations, Laplace transforms, and engineering mathematics.
Types of Partial Fractions Supported
The calculator supports the main denominator forms used in partial fraction decomposition.
Distinct Linear Factors
When the denominator contains different linear factors, each factor receives a constant numerator.
The general form is:
\[\frac{P(x)}{(x-a)(x-b)}=\frac{A}{x-a}+\frac{B}{x-b}\]
For three distinct linear factors:
\[\frac{P(x)}{(x-a)(x-b)(x-c)}=\frac{A}{x-a}+\frac{B}{x-b}+\frac{C}{x-c}\]
The calculator can factor many expanded denominators automatically. You can also enter the denominator in factored form.
Repeated Linear Factors
When a linear factor appears more than once, a separate fraction must be included for every power of that factor.
For example:
\[\frac{P(x)}{(x-a)^3}=\frac{A}{x-a}+\frac{B}{(x-a)^2}+\frac{C}{(x-a)^3}\]
If the denominator is:
\[(x-1)^2(x+1)\]
the required form is:
\[\frac{P(x)}{(x-1)^2(x+1)}=\frac{A}{x-1}+\frac{B}{(x-1)^2}+\frac{C}{x+1}\]
The calculator detects repeated factors and automatically inserts all the required terms.
Irreducible Quadratic Factors
A quadratic expression is irreducible over the rational numbers when it cannot be factored into rational linear factors.
For an irreducible quadratic factor, the numerator must be a linear expression.
For example:
\[\frac{P(x)}{x(x^2+1)}=\frac{A}{x}+\frac{Bx+C}{x^2+1}\]
The numerator above \(x^2+1\) is \(Bx+C\) rather than a single constant because its degree must be one less than the degree of the quadratic factor.
Repeated Irreducible Quadratic Factors
If an irreducible quadratic factor is repeated, a separate linear numerator is required for every power.
For example:
\[\frac{P(x)}{(x^2+1)^2}=\frac{Ax+B}{x^2+1}+\frac{Cx+D}{(x^2+1)^2}\]
The same rule applies to higher powers of irreducible polynomial factors.
Improper Rational Expressions
A rational expression is improper when the degree of the numerator is greater than or equal to the degree of the denominator.
The condition is:
\[\deg P(x)\geq\deg Q(x)\]
An improper rational expression must first be divided using polynomial long division.
The result takes the form:
\[\frac{P(x)}{Q(x)}=S(x)+\frac{R(x)}{Q(x)}\]
Here:
- \(S(x)\) is the quotient.
- \(R(x)\) is the remainder.
- \(\deg R(x)<\deg Q(x)\).
The tool performs the required polynomial division before decomposing the proper remainder fraction.
How the Partial Fractions Calculator Works
The solution is divided into clear stages.
Step 1: Check Whether the Fraction Is Proper
The calculator compares the degree of the numerator with the degree of the denominator.
If: \[\deg P(x)<\deg Q(x)\]
the fraction is proper and can be decomposed directly.
If: \[\deg P(x)\geq\deg Q(x)\]
polynomial division is performed first.
Step 2: Factor the Denominator
The denominator is separated into linear or irreducible polynomial factors.
For example: \[x^2-x-2=(x-2)(x+1)\]
A denominator that is already factored can also be entered directly:
(x-2)(x+1)
For a repeated factor, use: (x-1)^2(x+1)
Entering a difficult higher-degree denominator in factored form may help the calculator identify its structure more reliably.
Step 3: Construct the Partial-Fractions Form
The calculator examines the degree and repetition of each factor and forms the correct decomposition template.
For example:
\[\frac{3x^2+5x-1}{(x-1)^2(x+1)}=\frac{A}{x-1}+\frac{B}{(x-1)^2}+\frac{C}{x+1}\]
For a denominator containing an irreducible quadratic:
\[\frac{P(x)}{x(x^2+1)}=\frac{A}{x}+\frac{Bx+C}{x^2+1}\]
Step 4: Clear the Denominators
Both sides are multiplied by the complete denominator.
For example: \[\frac{5x-4}{(x-2)(x+1)}=\frac{A}{x-2}+\frac{B}{x+1}\]
Multiplying both sides by \((x-2)(x+1)\) gives:
\[5x-4=A(x+1)+B(x-2)\]
The equation no longer contains fractions.
Step 5: Find the Unknown Coefficients
The unknown coefficients can be calculated by equating coefficients or substituting suitable values of \(x\).
Expanding: \[5x-4=A(x+1)+B(x-2)\]
gives: \[5x-4=(A+B)x+(A-2B)\]
Comparing coefficients: \[A+B=5\]
\[A-2B=-4\]
Solving the equations gives: \[A=2,\qquad B=3\]
The substitution method gives the same result.
Put \(x=2\):
\[5(2)-4=A(2+1)\]
\[6=3A\]
\[A=2\]
Put \(x=-1\):
\[5(-1)-4=B(-1-2)\]
\[-9=-3B\]
\[B=3\]
Step 6: Write the Final Answer
Substitute the calculated values into the decomposition template:
\[\frac{5x-4}{x^2-x-2}=\frac{2}{x-2}+\frac{3}{x+1}\]
The final answer can then be copied as plain text or LaTeX.
Worked Example 1: Distinct Linear Factors
Decompose:
\[\frac{5x-4}{x^2-x-2}\]
Factor the denominator:
\[x^2-x-2=(x-2)(x+1)\]
Write the required form:
\[\frac{5x-4}{(x-2)(x+1)}=\frac{A}{x-2}+\frac{B}{x+1}\]
Clear the denominators:
\[5x-4=A(x+1)+B(x-2)\]
Substitute \(x=2\):
\[6=3A\]
\[A=2\]
Substitute \(x=-1\):
\[-9=-3B\]
\[B=3\]
Therefore:
\[\boxed{\frac{5x-4}{x^2-x-2}=\frac{2}{x-2}+\frac{3}{x+1}}\]
Worked Example 2: Repeated Linear Factor
Decompose:
\[\frac{3x^2+5x-1}{(x-1)^2(x+1)}\]
The required decomposition is:
\[\frac{3x^2+5x-1}{(x-1)^2(x+1)}=\frac{A}{x-1}+\frac{B}{(x-1)^2}+\frac{C}{x+1}\]
After clearing the denominators:
\[3x^2+5x-1=A(x-1)(x+1)+B(x+1)+C(x-1)^2\]
Substituting \(x=1\):
\[3+5-1=2B\]
\[7=2B\]
\[B=\frac{7}{2}\]
Substituting \(x=-1\):
\[3-5-1=4C\]
\[-3=4C\]
\[C=-\frac{3}{4}\]
Comparing coefficients or substituting another value gives:
\[A=\frac{15}{4}\]
Therefore:
\[\boxed{\frac{3x^2+5x-1}{(x-1)^2(x+1)}=\frac{15}{4(x-1)}+\frac{7}{2(x-1)^2}-\frac{3}{4(x+1)}}\]
Worked Example 3: Irreducible Quadratic Factor
Decompose:
\[\frac{x^2+2x+3}{x^3+x}\]
Factor the denominator:
\[x^3+x=x(x^2+1)\]
Since \(x^2+1\) is irreducible over the rational numbers, write:
\[\frac{x^2+2x+3}{x(x^2+1)}=\frac{A}{x}+\frac{Bx+C}{x^2+1}\]
Clear the denominators:
\[x^2+2x+3=A(x^2+1)+x(Bx+C)\]
Expand:
\[x^2+2x+3=(A+B)x^2+Cx+A\]
Compare coefficients:
\[A+B=1\]
\[C=2\]
\[A=3\]
Therefore:
\[B=1-A\]
\[B=-2\]
The final decomposition is:
\[\boxed{\frac{x^2+2x+3}{x^3+x}=\frac{3}{x}+\frac{-2x+2}{x^2+1}}\]
It may also be written as:
\[\frac{x^2+2x+3}{x^3+x}=\frac{3}{x}-\frac{2(x-1)}{x^2+1}\]
Worked Example 4: Improper Rational Expression
Decompose:
\[\frac{3x^3-2x^2+4}{x^2-x-2}\]
The degree of the numerator is greater than the degree of the denominator, so polynomial division is required.
Polynomial division gives:
\[\frac{3x^3-2x^2+4}{x^2-x-2}=3x+1+\frac{7x+6}{x^2-x-2}\]
Factor the denominator:
\[x^2-x-2=(x-2)(x+1)\]
Now write:
\[\frac{7x+6}{(x-2)(x+1)}=\frac{A}{x-2}+\frac{B}{x+1}\]
Clear the denominators:
\[7x+6=A(x+1)+B(x-2)\]
Substitute \(x=2\):
\[20=3A\]
\[A=\frac{20}{3}\]
Substitute \(x=-1\):
\[-1=-3B\]
\[B=\frac{1}{3}\]
Therefore:
\[\boxed{\frac{3x^3-2x^2+4}{x^2-x-2}=3x+1+\frac{20}{3(x-2)}+\frac{1}{3(x+1)}}\]
When No Further Decomposition Is Possible
Consider:
\[\frac{x^2-4}{x^2+2x+5}\]
The numerator and denominator have equal degrees, so polynomial division gives:
\[\frac{x^2-4}{x^2+2x+5}=1+\frac{-2x-9}{x^2+2x+5}\]
For the denominator:
\[x^2+2x+5\]
the discriminant is:
\[\Delta=b^2-4ac\]
\[\Delta=2^2-4(1)(5)\]
\[\Delta=4-20\]
\[\Delta=-16\]
The denominator has no rational linear factors. Since there is only one irreducible quadratic factor, the remaining fraction cannot be split into smaller rational partial fractions.
The final form is therefore:
\[\boxed{\frac{x^2-4}{x^2+2x+5}=1-\frac{2x+9}{x^2+2x+5}}\]
Fraction and Decimal Output
Fraction mode displays exact rational coefficients.
For example:
\[A=\frac{15}{4}\]
Decimal mode may display the same value as:
\[A=3.7500\]
You can select the required number of decimal places. Exact fraction mode is generally preferable for algebraic work.
Copy and Print Options
The calculator provides the following result options:
- Copy Text copies the decomposition as an ordinary expression.
- Copy LaTeX copies properly formatted LaTeX code.
- Print Steps opens the browser’s print dialogue.
The LaTeX option is useful for WordPress, MathJax, KaTeX, assignments, notes, and educational documents.
Preset Examples
The tool includes ready-made examples for several common cases:
- Distinct linear factors
- Repeated linear factors
- Irreducible quadratic factors
- Improper rational expressions
- Improper expressions with irreducible denominators
Selecting a preset automatically loads and solves the expression.
Recent Calculation History
The calculator stores recent expressions in the browser so that they can be opened again without retyping them.
This history remains on the user’s device and can be cleared by removing individual entries or clearing the browser’s stored data.
Applications of Partial Fractions
Partial fraction decomposition is used in several branches of mathematics.
Integration
Consider:
\[\int\frac{5x-4}{x^2-x-2}\,dx\]
Using:
\[\frac{5x-4}{x^2-x-2}=\frac{2}{x-2}+\frac{3}{x+1}\]
the integral becomes:
\[\int\frac{5x-4}{x^2-x-2}\,dx=\int\frac{2}{x-2}\,dx+\int\frac{3}{x+1}\,dx\]
Therefore:
\[\int\frac{5x-4}{x^2-x-2}\,dx=2\ln|x-2|+3\ln|x+1|+C\]
Inverse Laplace Transforms
Partial fractions can separate a complicated rational transform into simpler expressions with known inverse transforms.
Differential Equations
Rational expressions produced while solving differential equations can often be simplified through partial fraction decomposition.
Algebraic Simplification
The method is also helpful when simplifying rational functions, evaluating some limits, and comparing expressions with polynomial denominators.
Input Guidelines
Follow these rules for accurate results:
- Use one variable at a time.
- Write powers using ^, such as x^2.
- Use parentheses around grouped expressions.
- Use / between the numerator and denominator.
- Enter multiplication explicitly when needed using *.
- Do not leave the denominator empty.
- Do not enter a zero denominator.
- Enter higher-degree denominators in factored form when their factors are already known.
Examples of valid inputs include:
(5x-4)/(x^2-x-2)
(3x^2+5x-1)/((x-1)^2*(x+1))
(x^2+2x+3)/(x^3+x)
(3x^3-2x^2+4)/(x^2-x-2)
The calculator is designed for rational polynomial expressions. It is not intended for expressions containing trigonometric, exponential, or logarithmic functions.
Frequently Asked Questions
What is a Partial Fractions Calculator?
A Partial Fractions Calculator rewrites a rational expression as a sum of simpler fractions. This tool also shows the main algebraic steps used to obtain the decomposition.
Does the calculator show complete steps?
Yes. It checks whether the fraction is proper, performs polynomial division when needed, factors the denominator, constructs the correct template, clears the denominators, solves the coefficients, and displays the final result.
Can it solve improper rational expressions?
Yes. When:
\[\deg P(x)\geq\deg Q(x)\]
the calculator performs polynomial long division first.
Can it handle repeated linear factors?
Yes. For a factor such as \((x-a)^3\), it creates terms over \((x-a)\), \((x-a)^2\), and \((x-a)^3\).
Can it handle irreducible quadratic factors?
Yes. It uses a linear numerator of the form:
\[Ax+B\]
above an irreducible quadratic factor.
Can I enter an already factored denominator?
Yes. You may enter:
x^2-x-2
or:
(x-2)(x+1)
For repeated factors, use:
(x-1)^2(x+1)
Why is long division sometimes necessary?
Partial fraction decomposition is performed on a proper rational expression. Long division is required when the numerator degree is greater than or equal to the denominator degree.
Can I copy the result as LaTeX?
Yes. Use the Copy LaTeX button to copy the final decomposed expression in LaTeX format.
Is substitution the same as the cover-up method?
The methods are closely related for distinct linear factors. Substituting the root of a factor eliminates other terms and allows one coefficient to be found quickly.
Why does the calculator sometimes stop after polynomial division?
The remaining denominator may be irreducible and unsuitable for further decomposition into smaller rational fractions. In that case, the quotient-and-remainder form is already the final result.
Related Partial Fractions Resources
Students can use the following resources for additional theory and textbook exercises:
Unit 5 Class 11 Math Notes – Partial Fractions
Unit 4 Partial Fractions Solutions
Unit 21 Class 10 Math Sindh Board Solutions
Final Words
The Partial Fractions Calculator provides a step-by-step method for decomposing rational expressions. It supports distinct factors, repeated factors, irreducible polynomial factors, and improper rational expressions.
Students can use it to check homework, understand decomposition templates, practise polynomial long division, compare coefficient methods, and copy exact results for their notes.
