mapledemo1.mws

Using Maple commands for OPMT 5701.

Choose Maple 14 CLASSIC from programs menu before starting this sheet

This sheet gives you the basics for 1) entering equations and commands 2) taking the derivative, 3) solving, 4) plotting graphs

On this sheet, maple INPUT will be RED . Maple OUTPUT will be BLUE , text will be BLACK

In order to enter math, you need to be in MATH MODE. Math intput lines will have [> at the beginning

VERY important: First: ALL maple commands MUST end with ; (Semi-colon) Second, use the : (colon) before the = (equal) to define a function.

[1] Typing and defining a function, Enter

>    y:=6*x^2-2*x^3+4;

y := 6*x^2-2*x^3+4

Note the use of * for multiply and ^ for powers

Now y is defined as a function of x. Every time you refer to y in an expression it will give you y := 6*x^2-2*x^3+4

 try typing y by itself

>    y;

6*x^2-2*x^3+4

The derivative command is diff(y,x)  This will differentiate y with respect to x. you will need to give it a name like "dy" or "y_prime" NOTE: you can't use spaces in names!!!

ALSO maple is CASE sensitive y  and Y  are two different variables

>    y_prime:=diff(y,x);

y_prime := 12*x-6*x^2

Now we have the derivative function. To solve for the critical points, use the solve(y_prime=0, x) command

>    solve(y_prime=0,x);

0, 2

To get the Y-Values, we need to substitute the x solutions into the original y equation

>    y1:=subs(x=0,y);

y1 := 4

>    y2:=subs(x=2,y);

y2 := 12

Now you can try plotting the expression using the plot command. Note the range for x is set by [starting value]..[ending value] use two periods between the numbers

>    plot(y,x=-1..3);

>