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 |
> |
f2:=x^2-1: Note the colon |
> |
f2; We can still list f2 |
> |
x:=3; Now we assign x a value |
> |
f1; Notice f1 is still defined but x has been replaced by 3 |
> |
f2; Again x is replaced by 3 but the expression has been evaluated in f2 |
> |
evalf(f1); Used to evaluate and obtain a numeric value for sin(3) |
> |
x:=2.1; Define x as a real number and not an integer |
> |
f2; f2 evaluates to become a real number: 2.1^2-1 |
> |
f1; sin(2.1) evaluates as well. |
> |