Multiplying Polynomials in Mathematica

In summary, the syntax for multiplying polynomials in Mathematica is Expand[expression]. This will distribute the terms and combine like terms to simplify the polynomial. You can also multiply polynomials with different variables by including them in the expression, and Mathematica will automatically distribute and combine them appropriately. To multiply polynomials with more than two terms, use the asterisk (*) symbol between each term. To indicate exponents, use the caret (^) symbol. There is no limit to the number of terms you can multiply in Mathematica, as long as the resulting expression does not exceed the maximum allowed size.
  • #1
Treadstone 71
275
0
How do I get mathematica to multiply out a bunch of polynomials? Like (1-x)(34+x)(32-x). When I hit return it simply gives me what I wrote.
 
Physics news on Phys.org
  • #2
Expand[(1 - x)(34 + x)(32 - x)]
 
  • #3


To multiply out a bunch of polynomials in Mathematica, you can use the Expand function. For example, to multiply out (1-x)(34+x)(32-x), you can type the following into the Mathematica input cell:

Expand[(1-x)(34+x)(32-x)]

When you hit return, Mathematica will give you the expanded form of the polynomial, which in this case is:

1088 - 67x - 33x^2 + 2x^3

You can also use the Distribute function to distribute the multiplication over addition, which can be helpful for more complex polynomials. For example, if you have (x+2)(x^2+3x+5), you can type the following into the input cell:

Distribute[(x+2)(x^2+3x+5)]

Mathematica will then give you the expanded form of the polynomial:

x^3 + 5x^2 + 11x + 10

Additionally, you can use the ExpandAll function to expand all parts of the expression, including any exponents. For example, if you have (x+2)^3, you can type the following into the input cell:

ExpandAll[(x+2)^3]

Mathematica will then give you the expanded form of the polynomial:

x^3 + 6x^2 + 12x + 8

Overall, using functions such as Expand, Distribute, and ExpandAll can help you easily multiply out a bunch of polynomials in Mathematica.
 

Related to Multiplying Polynomials in Mathematica

1. What is the syntax for multiplying polynomials in Mathematica?

The syntax for multiplying polynomials in Mathematica is Expand[expression]. This will distribute the terms and combine like terms to simplify the polynomial.

2. Can I multiply polynomials with different variables in Mathematica?

Yes, you can multiply polynomials with different variables in Mathematica. Simply include the variables in the expression, and Mathematica will automatically distribute and combine them appropriately.

3. How do I multiply polynomials with more than two terms in Mathematica?

To multiply polynomials with more than two terms in Mathematica, use the asterisk (*) symbol between each term. For example, to multiply x^2 + 2x + 3 and 2x^3 + 4x^2 + 5x + 6, the expression would be (x^2 + 2x + 3) * (2x^3 + 4x^2 + 5x + 6).

4. How do I multiply polynomials with exponents in Mathematica?

To multiply polynomials with exponents in Mathematica, use the caret (^) symbol to indicate the exponent. For example, to multiply x^2 and x^3, the expression would be x^2 * x^3. Mathematica will automatically simplify the result to x^5.

5. Is there a limit to the number of terms I can multiply in Mathematica?

No, there is no limit to the number of terms you can multiply in Mathematica. You can multiply polynomials with any number of terms, as long as the resulting expression does not exceed the maximum allowed size in Mathematica.

Similar threads

Replies
3
Views
1K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
8
Views
3K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
4
Views
1K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
91
  • MATLAB, Maple, Mathematica, LaTeX
Replies
5
Views
1K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
6
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
4
Views
923
  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
183
  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
1K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
2
Views
1K
Back
Top