If you use a semicolon then the result of the command will be displayed.
If you use a colon then the
result will not be displayed.
sqrt(16);
sqrt(30);
evalf(sqrt(30));
> 64^(1/3);
( 1/ 3 )
64
> evalf(%);
4.000000000
> (2^(1/2))^(3^(1/2));
( 3)
( 2)
> evalf(%);
1.822634654
π is a constant in Mathematics and is recognized by maple and typed as Pi (Note the capitalization of “p”
but not “i’).
Note that the second parameter normally represents the number of non-zero digits in the answer. >
evalf(1/7,100);
0.14285714285714285714285714285714285714285714285714285714285714285\
71428571428571428571428571428571429
> evalf(29/3,5);
Here, if you want to calculate the answer for 4 decimal places the command should be evalf(29/3,5) and
if you want the answer to be 5 decimal places the command should be evalf(29/3,6).
> evalf(1/15,5);
0.066667
> evalf(11/19,5);
0.57895
you square ‘I’ you will get -1, not 𝑰 )
In Maple, complex arithmetic is normally done automatically with ‘I’ standing for √−𝟏 (for example, if
03. Check whether the followings are rational numbers or not
i. 1 49 ii. π ii. √2 04.
How many digits are repeating in 1 /212 ?
But Maple does not always automatically evaluate an expression involving complex numbers. For
example, it may leave an expression as the product of some complex numbers or as an expression
involving a root of a complex number.
> (-2*I)^(1/2);
The function evalc to force Maple to evaluate as a complex number
> evalc((-2*I)^(1/2));
Note that evalc does not give you both the square roots of -2*I it only gives the `principal value' of the
root. If you want to find the roots, use solve command as follows.
> solve(z^2=-2*I);
> solve(z^2=-2*I);
1I, -1
I
> solve(z^3=-2*I);
( 1/ 3 ) ( 1/ 3 )
( 1/ 3 ) ( -2 I ) 1 ( 1/ 3 ) ( -2 I ) 1 ( 1/ 3 )
( -2 I ) , I 3 ( -2 I ) , I 3 ( -2 I )
2 2 2 2
> solve(z^4=-2*I);
-1
I , -1
I , 1I , 1I
>
multiply the following and obtain the answer in standard
form: (2 − √−100)(1 + √−36)??
Assigning
> assign(y,5);
> y^2;
25
> x:=5;
x := 5
> x^2;
25
25
> Age:=21;
Age := 21
> age;
age
> Age;
21
> New_Age := Age+4;
New_Age := 25
There should not be any blank spaces when giving a name for the variable
> assign(z,5);
> z;
5
> unassign('z');
> z+20;
z
20
> assign(expr,(2*x+1)/(5-3*x));
> subs(x=3,expr);
-7
4
> expr:=(2*x+1)/(5-3*x);
2 x1
expr :=
53 x
> subs(x=a,expr);
2 a1
53 a
> subs({x=a-2,y=a+2},expr);
4 a20
( a2 ) 2( a
2 )2
> ifactor(525);
( 3 ) ( 5 )2 ( 7 )
> ifactor(2^8-1);
( 3 ) ( 5 ) ( 17 )
> expr2:=(a^4*b^7/C^3)+(b^6/a^4*C^2);
a 4 b 7 b 6 C2
expr2 := 4
C3 a
> expr2:=factor(%);
b 6 ( a 8 b
C5 )
expr2 :=
C3 a 4
> factor(expr2);
b 6 ( a 8 b
C5 )
C3 a 4
> new_expr:=x^2-x+5;
new_expr := x2x
5
> new_expr:=factor(%);
new_expr := x2x
5
> factor(expr2);
b 6 ( a 8 b
C5 )
C3 a 4
> factor(new_expr,complex);
( x0.5000000000
2.179449472 I ) ( x0.5000000000 2.179449472 I )
> x+3)^10;
3 ) 10
( x
> expand(%);
x 10
30 x 9
405 x 8
3240 x 7
17010 x 6
61236 x 5
153090 x 4
262440 x 3
295245 x 2
196830 x
59049
> expand(p);
x5
25 x4
250 x3
1250 x2
3125 x
3125
> degree(p,x);
5
> ldegree(p,x);
0
> coeff(p,x^5);
1
> > 3*(x-1)+7*(x+2)-5*(x+11);
5 x44
> 3*(x-1)^2+7*(x+2)^3-5*(x+11)^4;
3 ( x1 ) 2 2 ) 35 ( x
7 ( x 11 ) 4
> simplify(%);
3585 x226542 x73146213 x35 x4 //simplify nowena ewata simplify Gahanna
ona(powes ekka awoth)
>