12.07.2015 Views

Learning Guide Learning Guide

Learning Guide Learning Guide

Learning Guide Learning Guide

SHOW MORE
SHOW LESS
  • No tags were found...

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

60 • Chapter 3: Finding Solutionssort_poly := x + x 2 − x 3 + 1 − x 4> sort(sort_poly);−x 4 − x 3 + x 2 + x + 1> sort_poly;−x 4 − x 3 + x 2 + x + 1Maple sorts multivariate polynomials in two ways. The default methodsorts them by total degree of the terms. Thus, x 2 y 2 will come before bothx 3 and y 3 . The other option sorts by pure lexicographic order (plex).When you choose this option, the sort deals first with the powers of thefirst variable in the variable list (second argument) and then with thepowers of the second variable. The difference between these sorts is bestshown by an example.> mul_var_poly := y^3 + x^2*y^2 + x^3;mul _var_poly := y 3 + x 2 y 2 + x 3> sort(mul_var_poly, [x,y]);x 2 y 2 + x 3 + y 3> sort(mul_var_poly, [x,y], ’plex’);x 3 + x 2 y 2 + y 3The collect command groups coefficients of like powers in a polynomial.For example, if the terms ax and bx are in a polynomial, Maplecollects them as (a + b)x.> big_poly:=x*y + z*x*y + y*x^2 - z*y*x^2 + x + z*x;big_poly := x y + z x y + y x 2 − z y x 2 + x + z x> collect(big_poly, x);

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!