Polynomial Calculator

The calculator will find (with steps shown) the sum, difference, product and result of the division of two polynomials (quadratic, binomial, trinomial, etc.). It will also calculate the roots of the polynomials and factor them. Both univariate and multivariate polynomials are accepted.

Show Instructions
  • In general, you can skip the multiplication sign, so `5x` is equivalent to `5*x`.
  • In general, you can skip parentheses, but be very careful: e^3x is `e^3x`, and e^(3x) is `e^(3x)`.
  • Also, be careful when you write fractions: 1/x^2 ln(x) is `1/x^2 ln(x)`, and 1/(x^2 ln(x)) is `1/(x^2 ln(x))`.
  • If you skip parentheses or a multiplication sign, type at least a whitespace, i.e. write sin x (or even better sin(x)) instead of sinx.
  • Sometimes I see expressions like tan^2xsec^3x: this will be parsed as `tan^(2*3)(x sec(x))`. To get `tan^2(x)sec^3(x)`, use parentheses: tan^2(x)sec^3(x).
  • Similarly, tanxsec^3x will be parsed as `tan(xsec^3(x))`. To get `tan(x)sec^3(x)`, use parentheses: tan(x)sec^3(x).
  • From the table below, you can notice that sech is not supported, but you can still enter it using the identity `sech(x)=1/cosh(x)`.
  • If you get an error, double check your expression, add parentheses and multiplication signs where needed, and consult the table below.
  • All suggestions and improvements are welcome. Please leave them in comments.
The following table contains the supported operations and functions:
TypeGet
Constants
ee
pi`pi`
ii (imaginary unit)
Operations
a+ba+b
a-ba-b
a*b`a*b`
a^b, a**b`a^b`
sqrt(x), x^(1/2)`sqrt(x)`
cbrt(x), x^(1/3)`root(3)(x)`
root(x,n), x^(1/n)`root(n)(x)`
x^(a/b)`x^(a/b)`
abs(x)`|x|`
Functions
e^x`e^x`
ln(x), log(x)ln(x)
ln(x)/ln(a)`log_a(x)`
Trigonometric Functions
sin(x)sin(x)
cos(x)cos(x)
tan(x)tan(x), tg(x)
cot(x)cot(x), ctg(x)
sec(x)sec(x)
csc(x)csc(x), cosec(x)
Inverse Trigonometric Functions
asin(x), arcsin(x), sin^-1(x)asin(x)
acos(x), arccos(x), cos^-1(x)acos(x)
atan(x), arctan(x), tan^-1(x)atan(x)
acot(x), arccot(x), cot^-1(x)acot(x)
asec(x), arcsec(x), sec^-1(x)asec(x)
acsc(x), arccsc(x), csc^-1(x)acsc(x)
Hyperbolic Functions
sinh(x)sinh(x)
cosh(x)cosh(x)
tanh(x)tanh(x)
coth(x)coth(x)
1/cosh(x)sech(x)
1/sinh(x)csch(x)
Inverse Hyperbolic Functions
asinh(x), arcsinh(x), sinh^-1(x)asinh(x)
acosh(x), arccosh(x), cosh^-1(x)acosh(x)
atanh(x), arctanh(x), tanh^-1(x)atanh(x)
acoth(x), arccoth(x), cot^-1(x)acoth(x)
acosh(1/x)asech(x)
asinh(1/x)acsch(x)

First polynomial:

Second polynomial:

The second polynomial is needed for addition, subtraction, multiplication, division; but not for root finding, factoring

Write all suggestions in comments below.

Solution

Your input: find the sum, difference, product of two polynomials, quotient and remainder from dividing one by another; factor them and find roots.


Addition of polynomials

To add polynomials, combine and add the coefficients near the like terms:

$$$\left(\color{Crimson}{2 x^{4}}\color{GoldenRod}{- 3 x^{3}}\color{Chocolate }{- 15 x^{2}}+\color{Chartreuse}{32 x}\color{SaddleBrown}{-12}\right)+\left(\color{Chocolate }{x^{2}}\color{Chartreuse}{- 4 x}\color{SaddleBrown}{-12}\right)=$$$

$$$=\color{Crimson}{2 x^{4}}\color{GoldenRod}{- 3 x^{3}}+\color{Chocolate }{\left(\left(-15\right)+1\right) x^{2}}+\color{Chartreuse}{\left(32+\left(-4\right)\right) x}+\color{SaddleBrown}{\left(\left(-12\right)+\left(-12\right)\right) }=$$$

$$$=2 x^{4} - 3 x^{3} - 14 x^{2} + 28 x - 24$$$


Subtraction of polynomials

To subtract polynomials, combine and subtract thecoefficients near the like terms:

$$$\left(\color{Crimson}{2 x^{4}}\color{GoldenRod}{- 3 x^{3}}\color{Chocolate }{- 15 x^{2}}+\color{Chartreuse}{32 x}\color{SaddleBrown}{-12}\right)-\left(\color{Chocolate }{x^{2}}\color{Chartreuse}{- 4 x}\color{SaddleBrown}{-12}\right)=$$$

$$$=\color{Crimson}{2 x^{4}}\color{GoldenRod}{- 3 x^{3}}+\color{Chocolate }{\left(\left(-15\right)-1\right) x^{2}}+\color{Chartreuse}{\left(32-\left(-4\right)\right) x}+\color{SaddleBrown}{\left(\left(-12\right)-\left(-12\right)\right) }=$$$

$$$=2 x^{4} - 3 x^{3} - 16 x^{2} + 36 x$$$


Multiplication of polynomials

To multiply polynomials, multiple each term of the first polynomial with every term of the second polynomial. Then simplify the products and add them. Finally, simplify further if possible.

So, perform the first step:

$$$\left(\color{Chocolate }{2 x^{4}}\color{SaddleBrown}{- 3 x^{3}}\color{GoldenRod}{- 15 x^{2}}+\color{Chartreuse}{32 x}\color{Crimson}{-12}\right) \cdot \left(\color{Magenta}{x^{2}}\color{Green}{- 4 x}\color{Brown}{-12}\right)=$$$

$$$=\left(\color{Chocolate }{2 x^{4}}\right)\cdot \left(\color{Magenta}{x^{2}}\right)+\left(\color{Chocolate }{2 x^{4}}\right)\cdot \left(\color{Green}{- 4 x}\right)+\left(\color{Chocolate }{2 x^{4}}\right)\cdot \left(\color{Brown}{-12}\right)+$$$

$$$+\left(\color{SaddleBrown}{- 3 x^{3}}\right)\cdot \left(\color{Magenta}{x^{2}}\right)+\left(\color{SaddleBrown}{- 3 x^{3}}\right)\cdot \left(\color{Green}{- 4 x}\right)+\left(\color{SaddleBrown}{- 3 x^{3}}\right)\cdot \left(\color{Brown}{-12}\right)+$$$

$$$+\left(\color{GoldenRod}{- 15 x^{2}}\right)\cdot \left(\color{Magenta}{x^{2}}\right)+\left(\color{GoldenRod}{- 15 x^{2}}\right)\cdot \left(\color{Green}{- 4 x}\right)+\left(\color{GoldenRod}{- 15 x^{2}}\right)\cdot \left(\color{Brown}{-12}\right)+$$$

$$$+\left(\color{Chartreuse}{32 x}\right)\cdot \left(\color{Magenta}{x^{2}}\right)+\left(\color{Chartreuse}{32 x}\right)\cdot \left(\color{Green}{- 4 x}\right)+\left(\color{Chartreuse}{32 x}\right)\cdot \left(\color{Brown}{-12}\right)+$$$

$$$+\left(\color{Crimson}{-12}\right)\cdot \left(\color{Magenta}{x^{2}}\right)+\left(\color{Crimson}{-12}\right)\cdot \left(\color{Green}{- 4 x}\right)+\left(\color{Crimson}{-12}\right)\cdot \left(\color{Brown}{-12}\right)=$$$

Simplify the products:

$$$=2 x^{6}- 8 x^{5}- 24 x^{4}+$$$

$$$- 3 x^{5}+12 x^{4}+36 x^{3}+$$$

$$$- 15 x^{4}+60 x^{3}+180 x^{2}+$$$

$$$+32 x^{3}- 128 x^{2}- 384 x+$$$

$$$- 12 x^{2}+48 x+144=$$$

Simplify further (same way as adding/subtracting polynomials):

$$$=2 x^{6} - 11 x^{5} - 27 x^{4} + 128 x^{3} + 40 x^{2} - 336 x + 144$$$


Division of polynomials

Perform polynomial long division (use polynomial long division calculator too see the steps).

$$$\frac{2 x^{4} - 3 x^{3} - 15 x^{2} + 32 x - 12}{x^{2} - 4 x - 12}=2 x^{2} + 5 x + 29+\frac{208 x + 336}{x^{2} - 4 x - 12}$$$


Factoring $$$2 x^{4} - 3 x^{3} - 15 x^{2} + 32 x - 12$$$

Since all coefficients are integer, apply the Rational Zeros Theorem.

The trailing coefficient (coefficient of the constant term) is .

Find its factors (with plus and minus): . These are the possible values for `p`.

The leading coefficient (coefficient of the term with the highest degree) is .

Find its factors (with plus and minus): . These are the possible values for `q`.

Find all possible values of `p/q`: .

Simplify and remove duplicates (if any): .

If `a` is a root of the polynomial `P(x)`, then the remainder from division of `P(x)` by `x-a` should equal `0`.

  • Check : divide by .

    The quotient is , and the remainder is (use synthetic division calculator to see the steps).

  • Check : divide by .

    The quotient is , and the remainder is (use synthetic division calculator to see the steps).

  • Check : divide by .

    The quotient is , and the remainder is (use synthetic division calculator to see the steps).

Since the remainder is `0`, then is the root and is the factor:

Since all coefficients are integer, apply the Rational Zeros Theorem.

The trailing coefficient (coefficient of the constant term) is .

Find its factors (with plus and minus): . These are the possible values for `p`.

The leading coefficient (coefficient of the term with the highest degree) is .

Find its factors (with plus and minus): . These are the possible values for `q`.

Find all possible values of `p/q`: .

Simplify and remove duplicates (if any): .

If `a` is a root of the polynomial `P(x)`, then the remainder from division of `P(x)` by `x-a` should equal `0`.

  • Check : divide by .

    The quotient is , and the remainder is (use synthetic division calculator to see the steps).

  • Check : divide by .

    The quotient is , and the remainder is (use synthetic division calculator to see the steps).

  • Check : divide by .

    The quotient is , and the remainder is (use synthetic division calculator to see the steps).

Since the remainder is `0`, then is the root and is the factor:

To factor the quadratic function , we should solve the corresponding quadratic equation .

Indeed, if and are the roots of the quadratic equation , then .

Solve the quadratic equation .

The roots are , (use quadratic equation calculator to see steps).

Therefore, .

Simplify: $$$2 \left(x - 2\right)^{2} \left(x - \frac{1}{2}\right) \left(x + 3\right)=\left(x - 2\right)^{2} \left(x + 3\right) \left(2 x - 1\right)$$$.

$$$2 x^{4} - 3 x^{3} - 15 x^{2} + 32 x - 12=\left(x - 2\right)^{2} \left(x + 3\right) \left(2 x - 1\right)$$$.


Roots of the equation $$$2 x^{4} - 3 x^{3} - 15 x^{2} + 32 x - 12=0$$$

We have already found the factorization of $$$2 x^{4} - 3 x^{3} - 15 x^{2} + 32 x - 12=\left(x - 2\right)^{2} \left(x + 3\right) \left(2 x - 1\right)$$$ (see above).

Thus, we can write that $$$2 x^{4} - 3 x^{3} - 15 x^{2} + 32 x - 12=0$$$ is equivalent to the $$$\left(x - 2\right)^{2} \left(x + 3\right) \left(2 x - 1\right)=0$$$.

It is known that the product is zero when at least one factor is zero, so we just need to set the factors equal to zero and solve the corresponding equations (some equations have already been solved, some can't be solved by hand).

  • $$$\left(x - 2\right)^{2}=0$$$: root is $$$x=2$$$ (multiplicity: $$$2$$$).
  • $$$2 x - 1=0$$$: root is $$$x=\frac{1}{2}$$$.
  • $$$x + 3=0$$$: root is $$$x=-3$$$.

Therefore, roots of the initial equation are: $$$x_1=\frac{1}{2}$$$; $$$x_2=2$$$ (multiplicity: $$$2$$$); $$$x_3=-3$$$.


Factoring $$$x^{2} - 4 x - 12$$$

To factor the quadratic function , we should solve the corresponding quadratic equation .

Indeed, if and are the roots of the quadratic equation , then .

Solve the quadratic equation .

The roots are , (use quadratic equation calculator to see steps).

Therefore, .

$$$x^{2} - 4 x - 12=\left(x - 6\right) \left(x + 2\right)$$$.


Roots of the equation $$$x^{2} - 4 x - 12=0$$$

We have already found the factorization of $$$x^{2} - 4 x - 12=\left(x - 6\right) \left(x + 2\right)$$$ (see above).

Thus, we can write that $$$x^{2} - 4 x - 12=0$$$ is equivalent to the $$$\left(x - 6\right) \left(x + 2\right)=0$$$.

It is known that the product is zero when at least one factor is zero, so we just need to set the factors equal to zero and solve the corresponding equations (some equations have already been solved, some can't be solved by hand).

  • $$$x - 6=0$$$: root is $$$x=6$$$.
  • $$$x + 2=0$$$: root is $$$x=-2$$$.

Therefore, roots of the initial equation are: $$$x_1=-2$$$; $$$x_2=6$$$.


Answer:

$$$\left(2 x^{4} - 3 x^{3} - 15 x^{2} + 32 x - 12\right)+\left(x^{2} - 4 x - 12\right)=2 x^{4} - 3 x^{3} - 14 x^{2} + 28 x - 24$$$.

$$$\left(2 x^{4} - 3 x^{3} - 15 x^{2} + 32 x - 12\right)-\left(x^{2} - 4 x - 12\right)=2 x^{4} - 3 x^{3} - 16 x^{2} + 36 x$$$.

$$$\left(2 x^{4} - 3 x^{3} - 15 x^{2} + 32 x - 12\right)\cdot \left(x^{2} - 4 x - 12\right)=2 x^{6} - 11 x^{5} - 27 x^{4} + 128 x^{3} + 40 x^{2} - 336 x + 144$$$.

$$$\frac{2 x^{4} - 3 x^{3} - 15 x^{2} + 32 x - 12}{x^{2} - 4 x - 12}=2 x^{2} + 5 x + 29+\frac{208 x + 336}{x^{2} - 4 x - 12}$$$.

$$$2 x^{4} - 3 x^{3} - 15 x^{2} + 32 x - 12=\left(x - 2\right)^{2} \left(x + 3\right) \left(2 x - 1\right)$$$.

Roots of the equation $$$2 x^{4} - 3 x^{3} - 15 x^{2} + 32 x - 12=0$$$:

  • $$$\frac{1}{2}$$$, multiplicity $$$1$$$.
  • $$$2$$$, multiplicity $$$2$$$.
  • $$$-3$$$, multiplicity $$$1$$$.

$$$x^{2} - 4 x - 12=\left(x - 6\right) \left(x + 2\right)$$$.

Roots of the equation $$$x^{2} - 4 x - 12=0$$$:

  • $$$-2$$$, multiplicity $$$1$$$.
  • $$$6$$$, multiplicity $$$1$$$.