Some Handy commands in Maple

We will be using Maple to do simple algebra including solving equations.

 

General rules:

 

 

Solving an equation

solve(11=3*x^2+5*x+17, x);

This command solves the specified equation  for x.  There will of course be two answers because the equation is a quadratic.

 

Solving simultaneous equations

solve({2*y=4*x-7, 2*x=-4*y+10},{x,y})

This command solves the two equations (note the curly brackets) for both x and y. Make sure you solve for as many variables as you have equations, even if you don't need all the variables, in other words, always solve for the full reduced form.

 

Evaluating an equation

eval(x^2-8*x+x^3, x=2.718);

This command evaluates the equation when x is equal to 2.718.

 

Naming an object

tom :=3*x^2;

tom can now be substituted for the expression 3x2.

 

 

 

An example using many of the commands

 

eq1 :=y=c+i+g;

Maple will confirm that eq1  refers to the equation y=c+i+g

eq2 :=c=100+0.75*y;

Maple will confirm that eq1  refers to the equation c=100+0.75y

solve({eq1,eq2},{y,c});

Maple will solve the two equations for y and c.  Of course the solution will involve two equations, both equations involving i and g.

sally :=%;

Maple will confirm that the name of the set of the two solution equations is sally.

eval(sally,{I=50,g=150});

Maple will evaluate the two equations substituting 50 for i and 150 for g;

 

back to project 3