The name of the session shown here is: ch1_5.mw . Open it in the directory: /home/ceng303/maple/sessions


Section 1.5 Maple Session: defining expressions

>

restart;   This removes any defined functions from previous sessions

>

f1:=sin(x); Note the semicolon

f1 := sin(x)

>

f2:=x^2-1: Note the colon

>

f2; We can still list f2

x^2-1

>

x:=3; Now we assign x a value

x := 3

>

f1; Notice f1 is still defined but x has  been replaced by 3

        

sin(3)

>

f2; Again x is replaced by 3 but the  expression has been evaluated in f2

8

>

evalf(f1); Used to evaluate  and obtain a numeric value for sin(3)

.1411200081

>

x:=2.1; Define x as a real number and not an integer

x := 2.1

>

f2;  f2 evaluates to become a real number: 2.1^2-1

3.41

>

f1;   sin(2.1) evaluates as well.

.8632093666

>