| > |
LESSON 0 - BASIC MAPLE COMMANDS
Dr. K.P.Satagopan
To define a function:
Method I
| > | f:= x-> x^2+1; |
To evaluate the function :
| > | f(2); |
| > | f(a); |
| > | f(-3); |
| > | f(a+h)-f(a); |
| > | simplify(f(a+h)-f(a))/h; |
| > | simplify(%); |
The percent sign in the above command denotes the latest output in MAPLE, which in this case is 2a+h
| > |
Method II
| > | f(x):= x^2+1; |
| > | f(2); |
| > | f(a); |
| > |
To factor an expression:
| > | factor(x^2-3*x+2); |
| > | expand((x-1)*(x-2)); |
| > |
To solve an equation:
| > | solve(x^2-3*x+2=0,x); |
| > | solve(x^2+3*x+3=0,x); |
| > |
Notice the roots are imaginary.
| > | solve(x^2+3*y+2*x*y-5=0,y); |
| > |
Notice it has solved for 'y' in terms of the other variable 'x'.