next up previous
Next: About this document ... Up: An introduction to Maple Previous: Basic Programming in Maple

Exercises

(1) Write a function which takes as input a square matrix and its size and returns its trace.

(2) Find all solutions to the system $ \{x^2+y^2+z^2=1, x^2+z^2 = y, x = z\}$.

(3) How many real roots does the equation $ x^{100}-x^{51}+x-2$ have? (Could you have predicted this before-hand?).

(4) Find out how to factor polynomials in Maple and then factor $ x^4+4$. Compare this with the following command: evala(AFactor($ x^4+4$));

(5) Suppose that we have Maple variables $ x[1],x[2]$, and $ x[3]$; we shall consider polynomials $ f$ in these three variables. Write a function that takes as input a polynomial $ f$ and a permutation $ \sigma$ (expressed in word form as an array such as [1,3,2]) and returns the polynomial produced from $ f$ by permuting the variables according to $ \sigma$. For example, if $ f = x[1]^2+x[2]x[3]$ and $ \sigma = [3,1,2]$, then we would like to return

$\displaystyle \sigma f = x[3]^2+x[1]x[2].$

(6) a) Let $ f = x^3-3x+1$. Look up the Maple commands to find the Galois group of $ f$. b) Let $ a$ be a root of $ f$ in the interval $ [1,2]$. Given that there are polynomials $ g(t)$ and $ h(t)$ with rational coefficients such that $ f(x) = (x-a)(x-g(a))(x-h(a))$, find the polynomials $ g$ and $ h$.

(7) If you are familiar with Gröbner bases, look up how Maple handles these computations. Work out explicitly some Gröbner bases for the polynomials $ \{xy+z,x^2-x+y^2+yx\}$ using different term orders. Compare the performance of other examples with that of Singular and Macaulay 2.


next up previous
Next: About this document ... Up: An introduction to Maple Previous: Basic Programming in Maple
Frank Sottile 2007-07-23