;and the corresponding stroke of the return key. To familiarize yourself with it, try to run the following examples and analyze the results. The commands that you type in and the Maple results are shown here in a way that is similar to what you see on the screen.
>and Maple responds with an answer:
The symbols for the basic operations are
/. Exponentiation is denoted by
In the first example, the inverse of 2 is added to 3. In the second, we input , and Maple computes its value before printing the output.
You must always use the asterisk
* for multiplication. Forgetting it in
4*x is easy, and may result
in a syntax error message. Even if you don't get a syntax error, Maple will
not treat the expression as you expect.
Maple works primarily with whole numbers or fractions. However, you can
force it to write the decimal expansion of any number with
Be careful with this example. The assignment of the variable
to is done with
:= rather than with
will be the case of any other assignment operation you do in Maple, as we
discuss below. The equals sign
= is used to signify that two things
are equal, not to set one to the other.
Notice the difference in the following two examples:
In both cases, we compute
(2i)-1. However, in the
second case, the presence of
1.0 indicates to Maple the terms in
this computation are approximate, and gives you a decimal
expansion of the result.
We can ask to factor the resulting polynomial in n:
In this example, Maple's ``ditto operator''
to refer to the result previously obtained.
Thus, in effect, the example above is equivalent to
factor(1/4*(n + 1)^4 - 1/2*(n + 1)^3 + 1/4*(n + 1)^2);
One can expand or factor conveniently:
We can use Maple to solve equations (if
b still has the value
from the previous section, first unassign it by executing
solve provides both roots of the quadratic polynomial.
Maple also divides polynomials. Here the command you execute has a syntax which is a little bit more complicated. Consider the following example:1.4
We assign the polynomials x10 - 1 and x - 1 to the variables
q, respectively, and then ask Maple to divide
q.1.5Maple replies with the statement
true to indicate that the
polynomial q = x - 1 divides the polynomial
p = x10 - 1 exactly, and places
the quotient in the third argument of the
divide command. Thus, if you
want to know the value of the quotient, you must see what the variable
b stands for now:
Of course, the answer produced by
divide will be
the polynomials do not divide each other exactly. Then one can use the
rem to find the quotient
and remainder of the division:
We would have obtained an error if we would have tried
trying to place the quotient of the division in the variable
b: it is
no longer a variable since it has a value from the previous example:
The above command is equivalent to
divide(p,r,x^9+x^8+x^7+x^6+x^5+x^4+x^3+x^2+x+1), which makes no sense
at all. If we insist on calling the result of the division
it would have been necessary to unassign the value of
We could also have done this within the command itself, using
divide(p,r,'b').1.6Further discussion on this is given in section 4.2.
We can use
solve for systems of equations. For example:
(1/6)*x+(1/24)*y+(1/120)*z =1, x,y,z );
Maple also solves inequalities:
Notice that within the worksheet interface, clicking the right mouse button on the displayed graph causes a menu to pop up that allows you to change some of its properties. Clicking the left mouse button causes a box to appear around the graph and the buttons on the toolbar to change. You can use the box to resize the graph, and the buttons to change attributes such as the style of the axes and the aspect ration.
In section 9 we shall discuss in further detail the graphing features of Maple.