MAT 201- CALCULUS-I 

Dr. K.P. Satagopan 

 

CHAPTER 0 - Some Basic MAPLE commands and examples. 

 

In this chapter you will learn some basic MAPLE commands and see some examples of these. Try the problems in the Exercise at the end of the chapter. 

Each MAPLE command is typed after the MAPLE prompt, which looks like >. 

Each command should be followed by a ; ( a semi-colon) if you want it to be executed and the output shown. 

If you dont want to see the output, but still want the command to be executed use a  :  ( a colon) after the command. 

 

The following is a list of commands and what MAPLE will do after the command: 

 

 

> restart;              This will clear MAPLE's memory
 

 

 

> expand ( any expression)        Expands an expression.
 

 

Example  : 

 

 

> expand((x-3)*(x^2+1));
 

x^3+x-3*x^2-3 

 

Notice that the expression is not in order of decreasing powers. To put it in order  

 

> sort(%);
 

x^3-3*x^2+x-3 

>
 

The % sign in the above command refers to the immediately preceding output, which in this case is our expression. 

 

 

> factor(an expression);               Factors the expression
 

 

Example: 

 

 

> factor(x^3-3*x^2+x-3);
 

(x-3)*(x^2+1) 

> solve(equation, variable)             Solves the equation for that variable exactly
 

 

> fsolve(equation, variable)           Solves the equation numerically
 

 

Example: 

 

 

> solve(x^3-x^2+x-3=0,x);
 

1/3*(37+9*sqrt(17))^(1/3)-2/3*1/((37+9*sqrt(17))^(1/3))+1/3, -1/6*(37+9*sqrt(17))^(1/3)+1/3/(37+9*sqrt(17))^(1/3)+1/3+1/2*I*sqrt(3)*(1/3*(37+9*sqrt(17))^(1/3)+2/3/(37+9*sqrt(17))^(1/3)), -1/6*(37+9*sq...
1/3*(37+9*sqrt(17))^(1/3)-2/3*1/((37+9*sqrt(17))^(1/3))+1/3, -1/6*(37+9*sqrt(17))^(1/3)+1/3/(37+9*sqrt(17))^(1/3)+1/3+1/2*I*sqrt(3)*(1/3*(37+9*sqrt(17))^(1/3)+2/3/(37+9*sqrt(17))^(1/3)), -1/6*(37+9*sq...
1/3*(37+9*sqrt(17))^(1/3)-2/3*1/((37+9*sqrt(17))^(1/3))+1/3, -1/6*(37+9*sqrt(17))^(1/3)+1/3/(37+9*sqrt(17))^(1/3)+1/3+1/2*I*sqrt(3)*(1/3*(37+9*sqrt(17))^(1/3)+2/3/(37+9*sqrt(17))^(1/3)), -1/6*(37+9*sq...
1/3*(37+9*sqrt(17))^(1/3)-2/3*1/((37+9*sqrt(17))^(1/3))+1/3, -1/6*(37+9*sqrt(17))^(1/3)+1/3/(37+9*sqrt(17))^(1/3)+1/3+1/2*I*sqrt(3)*(1/3*(37+9*sqrt(17))^(1/3)+2/3/(37+9*sqrt(17))^(1/3)), -1/6*(37+9*sq...
 

Notice the solutions are exact solutions with cube roots etc.and the also complex roots. 

 

 

> fsolve(x^3-x^2+x-3=0,x);
 

1.574743074 

Notice that for the same equation MAPLE gave only one solution and no complex roots. MAPLE solved this numerically and its going to give only real number solutions. 

 

> solve(x^2+x*y+y=x,y);
 

-x*(x-1)/(x+1) 

 

How to define a function in MAPLE ?  Functions can be defined as expressions or as an assignment. Its a lot easier to define functions as assignments for further calculations as the commands are natural. Suppose we want to define f(x)=x^2-x+1 

we do the following: 

 

> f:=x->x^2-x+1;
 

f := proc (x) options operator, arrow; x^2-x+1 end proc 

 

This says 'x' is assigned to x^2-x+1. 

> f(-5);
 

31 

This is a natural command of evaluating functions at any point. 

> f(t);
 

t^2-t+1 

> plot(function (name or expression),variable=lower boundary..upper boundary)      Will draw the graph of the function in the specified interval.
 

>
 

> with(plots);
 

Warning, the name changecoords has been redefined
 

[animate, animate3d, animatecurve, arrow, changecoords, complexplot, complexplot3d, conformal, conformal3d, contourplot, contourplot3d, coordplot, coordplot3d, cylinderplot, densityplot, display, disp...
[animate, animate3d, animatecurve, arrow, changecoords, complexplot, complexplot3d, conformal, conformal3d, contourplot, contourplot3d, coordplot, coordplot3d, cylinderplot, densityplot, display, disp...
[animate, animate3d, animatecurve, arrow, changecoords, complexplot, complexplot3d, conformal, conformal3d, contourplot, contourplot3d, coordplot, coordplot3d, cylinderplot, densityplot, display, disp...
[animate, animate3d, animatecurve, arrow, changecoords, complexplot, complexplot3d, conformal, conformal3d, contourplot, contourplot3d, coordplot, coordplot3d, cylinderplot, densityplot, display, disp...
[animate, animate3d, animatecurve, arrow, changecoords, complexplot, complexplot3d, conformal, conformal3d, contourplot, contourplot3d, coordplot, coordplot3d, cylinderplot, densityplot, display, disp...
[animate, animate3d, animatecurve, arrow, changecoords, complexplot, complexplot3d, conformal, conformal3d, contourplot, contourplot3d, coordplot, coordplot3d, cylinderplot, densityplot, display, disp...
[animate, animate3d, animatecurve, arrow, changecoords, complexplot, complexplot3d, conformal, conformal3d, contourplot, contourplot3d, coordplot, coordplot3d, cylinderplot, densityplot, display, disp...
[animate, animate3d, animatecurve, arrow, changecoords, complexplot, complexplot3d, conformal, conformal3d, contourplot, contourplot3d, coordplot, coordplot3d, cylinderplot, densityplot, display, disp...
[animate, animate3d, animatecurve, arrow, changecoords, complexplot, complexplot3d, conformal, conformal3d, contourplot, contourplot3d, coordplot, coordplot3d, cylinderplot, densityplot, display, disp...
 

> plot(f(x),x=-2..2);
 

Plot 

> plot(x^2,x=-10..10);
 

Plot 

>