Expanding Polynomial Calculator: Steps & Examples
The calculator for this page is switched off while it is checked. The formula is below, and the worked example in the article shows how to use it by hand.
This calculator expands a polynomial expression, multiplying out products and powers of binomials and combining like terms to give a simplified standard-form result. You enter an expression like (x+2)^3 or (x^2+3x-1)(x-4), and it returns the expanded polynomial with terms ordered from highest to lowest degree. The result is shown as a single polynomial with no parentheses, ready for further analysis or graphing.
Formula
Expansion uses the distributive property repeatedly: for any polynomials A, B, and C, A(B + C) = AB + AC. For a power like (x + a)^n, the binomial theorem gives:
(x + a)^n = Σ (n choose k) x^(n-k) a^k, for k = 0 to n
where (n choose k) = n! / (k!(n-k)!). Each term is a product of a binomial coefficient, a power of x, and a power of the constant a. The calculator applies this rule symbolically, then collects terms with the same exponent of x by adding their coefficients.
Worked Example
Take the default expression (x + 2)^3. Using the binomial theorem with n = 3 and a = 2:
- k = 0: (3 choose 0) x^3 2^0 = 1 · x^3 · 1 = x^3
- k = 1: (3 choose 1) x^2 2^1 = 3 · x^2 · 2 = 6x^2
- k = 2: (3 choose 2) x^1 2^2 = 3 · x · 4 = 12x
- k = 3: (3 choose 3) x^0 2^3 = 1 · 1 · 8 = 8
Adding these gives x^3 + 6x^2 + 12x + 8. The calculator returns the same result, with terms in descending degree order.
What Kinds of Expressions Can You Expand?
The calculator handles the common forms you meet in algebra and calculus:
- Powers of binomials: (x + 3)^4, (2x – 5)^2
- Products of polynomials: (x^2 + 1)(x – 2)(x + 7)
- Repeated factors: (x – 1)^2(x + 2)^3
- Expressions with multiple variables, like (x + y)^3 or (a – b)^2(c + d)
- Constants and negative coefficients, such as (3x^2 – 2x + 1)^2
It does not handle division by variables (rational expressions) or radicals inside the polynomial; those require a more advanced computer algebra system.
How to Use the Calculator
Enter a valid polynomial expression using standard notation. Use ^ for exponents, * for multiplication (optional before a variable), and parentheses for grouping. The calculator follows the usual order of operations: parentheses first, then exponents, then multiplication, then addition and subtraction.
For example, to expand (2x – 1)(x + 4), type (2x-1)(x+4). To expand (x + 1)^5, type (x+1)^5. You can include spaces; they are ignored. The result appears as a polynomial with like terms combined, such as 2x^2 + 7x – 4.
Common Mistakes and How to Avoid Them
The most frequent errors come from forgetting the distributive property or mishandling signs:
- Forgetting to multiply every term in the first polynomial by every term in the second. Use the FOIL method for binomials, but for longer polynomials, systematically multiply each term.
- Sign errors: (x – 3)(x – 4) gives x^2 – 7x + 12, not x^2 + 7x + 12. Double-check each product’s sign.
- Incorrect exponent rules: (x^2)^3 = x^6, not x^5. When raising a power to a power, multiply the exponents.
- Forgetting to combine like terms. The final answer should have only one term for each exponent.
A quick check: plug in a simple value like x = 1 into both the original and expanded forms. They should give the same number. For (x+2)^3 at x=1, original gives 27, expanded gives 1+6+12+8 = 27.
Why Expand a Polynomial?
Expanded form is useful for several purposes:
- Finding the leading coefficient and degree, which describe the end behavior of the graph.
- Evaluating the polynomial quickly for multiple x values, since the expanded form has fewer operations.
- Finding the y-intercept: it is simply the constant term.
- Performing calculus operations like differentiation and integration term by term.
- Solving equations when you need to factor or apply the quadratic formula.
However, factored form is better for finding roots and understanding the shape of the graph. Keep both forms when possible.
Limits of the Calculator
This tool is designed for symbolic expansion of polynomials with integer or decimal coefficients. It will not simplify trigonometric functions, logarithms, or exponentials. It also does not factor the result, solve equations, or find roots. For very large expressions (degree above 20 or many variables), the output may be long and the calculation slow, but it still works.
Note that the calculator assumes the variable is x unless you use other letters. For expressions with multiple variables, it treats each letter as a separate variable and expands accordingly.
Frequently Asked Questions
Can I expand (x + y)^3? Yes, enter (x+y)^3 and the calculator returns x^3 + 3x^2y + 3xy^2 + y^3. It handles multiple variables correctly.
What does ‘combine like terms’ mean? It means adding terms that have the same variable raised to the same power. For example, 3x^2 + 5x^2 becomes 8x^2. The calculator does this automatically.
Why is my result different from the textbook answer? Check if the textbook uses a different variable order or a different convention for ordering terms (ascending vs. descending). The calculator orders by descending degree, which is standard. Also verify you entered the expression correctly, especially parentheses and signs.
Does the calculator work for negative exponents? No, it only handles non-negative integer exponents. Expressions like x^-1 are not polynomials and are not supported.
Can I expand a polynomial with decimal coefficients? Yes, decimals are allowed. For example, (1.5x + 0.5)^2 expands to 2.25x^2 + 1.5x + 0.25.
Is there a way to check my manual expansion? Substitute a few values of x into both the original and expanded forms. If they match for several values, the expansion is likely correct. This is a quick and reliable verification method.
Related
Formula used
in expr | Expression | - | (x+2)^3 | 0 out expanded | Expanded polynomial | - | expand(expr) | 0
Each line is one input (in, sel, list) or one result (out: label, unit, formula, decimals). How the calculators work
Method: the standard formula for this calculation, rounded as each result states. See how the calculators work or report an error.