My Maple Assignment on Web

1. Hierarchy of arithmetic operations: Use your examples (at least three examples and execute them in maple) to prove which arithmetic operations are carried out first in Maple and if they are equal priority, in which directions they are carried?

>    8/4/2;

1

Maple always starts from the division on the left to the right.In this expression , the calculation is done by (8/4)/2 meaning that (8/4) is done first and then the result is divided by 2.Thus (8/4)/2=2/2=1.

>    8/(4/2);

4

Maple gives priority to the parentheses first  than other arithmetical operators.In this expression,the order of evaluation is 8/(4/2),meaning that (4/2) is done first then 8 is divided by it.Thus 8/(4/2)=8/2=4.

>    8+4/2;

10

Maple gives priority to the multiplication or division first followed by addition or subtraction.In this expression,the calculation is done by 8+(/4/2) .This meaning that 4 is divided by 2 first and then added to 8.Thus,8+4/2=8+ 2=10.

2.Using your own examples ( one examples each and execute them in Maple)clearly bring out all the differences between the following Maple symbols and commands:

a); and :

>    3*x^2-5*x+1=0;

3*x^2-5*x+1 = 0

>    3*x^2-5*x+1=0:

b)= and :=

>    x=3;

3 = 3

>    x:=3;

x := 3

c)? and ???

>    ?spacecurve;

Description

Examples

>    with(plots):
spacecurve([cos(t),sin(t),t],t=0..4*Pi);
spacecurve({[sin(t),0,cos(t),t=0..2*Pi],[cos(t)+1,sin(t),0,numpoints=10]},
                t=-Pi..Pi,axes=FRAME);
spacecurve({[t*sin(t),t,t*cos(t)],[4*cos(t),4*sin(t),0]},t=-Pi..2*Pi);
knot:= [ -10*cos(t) - 2*cos(5*t) + 15*sin(2*t),
         -15*cos(2*t) + 10*sin(t) - 2*sin(5*t), 10*cos(3*t), t= 0..2*Pi]:
spacecurve(knot);
helix_points := [seq([10*cos(r/30),10*sin(r/30),r/3],r=0..240)]:
spacecurve(helix_points);
spacecurve({helix_points,knot});

See Also

read , save , plots[tubeplot] , plot3d[option] , plot3d[structure]   

>    ???spacecurve;

Description

Examples

>    with(plots):
spacecurve([cos(t),sin(t),t],t=0..4*Pi);
spacecurve({[sin(t),0,cos(t),t=0..2*Pi],[cos(t)+1,sin(t),0,numpoints=10]},
                t=-Pi..Pi,axes=FRAME);
spacecurve({[t*sin(t),t,t*cos(t)],[4*cos(t),4*sin(t),0]},t=-Pi..2*Pi);
knot:= [ -10*cos(t) - 2*cos(5*t) + 15*sin(2*t),
         -15*cos(2*t) + 10*sin(t) - 2*sin(5*t), 10*cos(3*t), t= 0..2*Pi]:
spacecurve(knot);
helix_points := [seq([10*cos(r/30),10*sin(r/30),r/3],r=0..240)]:
spacecurve(helix_points);
spacecurve({helix_points,knot});

See Also

d)expression and function.

>    f:=(x+1)/x;

f := 4/3

>    f:=x->(x+1)/x;

f := proc (x) options operator, arrow; (x+1)/x end proc

Sum and add

>    restart;

>    sum(cube(k),k=1.100);

cube(1.100)

>    add(cube(k),k=1.100);

cube(1100)+cube(-3)

3.Use of the Help facilities in Maple  :Use of the help commands in Maple and explain the use of the three Maple commands (not discussed in the class)with your own examples.

1) vector commands

>    v1:=vector([a,b,c]);

v1 := vector([a, b, c])

2) logplots

>    restart;

>    with(plots);

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

>    logplot({exp(x),exp(x^2),exp(2*x)},
x=0.1..10,1..10^6);

[Maple Plot]

logplots is semi-logarithmic plot of functions where the vertical axis is in logarithmic scale

Calling Sequence

     logplot( f , h , v ,...)

Parameters

      f - function(s) to be plotted

      h - horizontal range

      v - (optional) vertical range

Description

 

rootlocus

>    with(plots,rootlocus):
rootlocus( (s^3-1)/s, s, -5..5 );

[Maple Plot]

Description

          1 + k f(s) = 0

4. Use of the units and Scientific Constants :Select any three problems involving different types of units from your textbooks and carry out the complete calculations including the units using Maple.State the problems fully and comments whether Maple gives the corrects final anser along with approriate units.(Refer the eaxmples discussed in the class.)

>   

>    restart;with(Units):with(Units[Natural]);

>   

Warning, the name Unit has been rebound

Warning, the assigned name polar now has a global binding

Warning, these protected names have been redefined and unprotected: *, +, -, /, <, <=, <>, =, Im, Re, ^, abs, add, arccos, arccosh, arccot, arccoth, arccsc, arccsch, arcsec, arcsech, arcsin, arcsinh, arctan, arctanh, argument, ceil, collect, combine, conjugate, convert, cos, cosh, cot, coth, csc, csch, csgn, diff, eval, evalc, evalr, exp, expand, factor, floor, frac, int, ln, log, log10, max, min, mul, normal, root, round, sec, sech, seq, shake, signum, simplify, sin, sinh, sqrt, surd, tan, tanh, trunc, type, verify

[`*`, `+`, `-`, `/`, `<`, `<=`, `<>`, `=`, Im, Re, Unit, `^`, abs, add, arccos, arccosh, arccot, arccoth, arccsc, arccsch, arcsec, arcsech, arcsin, arcsinh, arctan, arctanh, argument, ceil, collect, co...
[`*`, `+`, `-`, `/`, `<`, `<=`, `<>`, `=`, Im, Re, Unit, `^`, abs, add, arccos, arccosh, arccot, arccoth, arccsc, arccsch, arcsec, arcsech, arcsin, arcsinh, arctan, arctanh, argument, ceil, collect, co...
[`*`, `+`, `-`, `/`, `<`, `<=`, `<>`, `=`, Im, Re, Unit, `^`, abs, add, arccos, arccosh, arccot, arccoth, arccsc, arccsch, arcsec, arcsech, arcsin, arcsinh, arctan, arctanh, argument, ceil, collect, co...

>   

>   

>   

>   

>   

>   

>   

>   

>   

>   

>   

>   

>   

>   

>   

>   

>   

5.Find out the dimensions of three different physiacal properties using Maple.

>    restart;with(Units);

[AddBaseUnit, AddDimension, AddSystem, AddUnit, Converter, GetDimension, GetDimensions, GetSystem, GetSystems, GetUnit, GetUnits, HasDimension, HasSystem, HasUnit, Natural, RemoveDimension, RemoveSyste...
[AddBaseUnit, AddDimension, AddSystem, AddUnit, Converter, GetDimension, GetDimensions, GetSystem, GetSystems, GetUnit, GetUnits, HasDimension, HasSystem, HasUnit, Natural, RemoveDimension, RemoveSyste...
[AddBaseUnit, AddDimension, AddSystem, AddUnit, Converter, GetDimension, GetDimensions, GetSystem, GetSystems, GetUnit, GetUnits, HasDimension, HasSystem, HasUnit, Natural, RemoveDimension, RemoveSyste...

>   

>    GetDimensions();

absorbed_dose, acceleration, action, amount_of_information, amount_of_substance, angular_acceleration, angular_jerk, angular_speed, area, currency, dose_equivalent, dynamic_viscosity, electric_capacita...
absorbed_dose, acceleration, action, amount_of_information, amount_of_substance, angular_acceleration, angular_jerk, angular_speed, area, currency, dose_equivalent, dynamic_viscosity, electric_capacita...
absorbed_dose, acceleration, action, amount_of_information, amount_of_substance, angular_acceleration, angular_jerk, angular_speed, area, currency, dose_equivalent, dynamic_viscosity, electric_capacita...
absorbed_dose, acceleration, action, amount_of_information, amount_of_substance, angular_acceleration, angular_jerk, angular_speed, area, currency, dose_equivalent, dynamic_viscosity, electric_capacita...
absorbed_dose, acceleration, action, amount_of_information, amount_of_substance, angular_acceleration, angular_jerk, angular_speed, area, currency, dose_equivalent, dynamic_viscosity, electric_capacita...
absorbed_dose, acceleration, action, amount_of_information, amount_of_substance, angular_acceleration, angular_jerk, angular_speed, area, currency, dose_equivalent, dynamic_viscosity, electric_capacita...
absorbed_dose, acceleration, action, amount_of_information, amount_of_substance, angular_acceleration, angular_jerk, angular_speed, area, currency, dose_equivalent, dynamic_viscosity, electric_capacita...
absorbed_dose, acceleration, action, amount_of_information, amount_of_substance, angular_acceleration, angular_jerk, angular_speed, area, currency, dose_equivalent, dynamic_viscosity, electric_capacita...

>    GetDimension(moment_of_inertia);

length^2*mass

>    GetDimension(magnetic_flux_density);

mass/time^2/electric_current

>    GetDimension(thermodynamic_temperature);

thermodynamic_temperature

6.Calculate the volume occupied by 1 kg of mercury at 25 C.

>    restart;

>    with(ScientificConstants);

[AddConstant, AddElement, AddProperty, Constant, Element, GetConstant, GetConstants, GetElement, GetElements, GetError, GetIsotopes, GetProperties, GetProperty, GetUnit, GetValue, HasConstant, HasEleme...
[AddConstant, AddElement, AddProperty, Constant, Element, GetConstant, GetConstants, GetElement, GetElements, GetError, GetIsotopes, GetProperties, GetProperty, GetUnit, GetValue, HasConstant, HasEleme...

>    GetElement(Hg,density);

80, density = [value = 13.5336, uncertainty = undefined, units = g/cm^3]

>    mass:=1000*g;T=25*degC;

mass := 1000*g

T = 25*degC

>    density:=13.5336*g/cm^3;

density := 13.5336*g/cm^3

>    volume:=mass/density;

volume := 73.89016965*cm^3

7.Use Maple to calculate the number of water molecules in 1 g of water.

>    mass:=1*g;

mass := g

>    GetElement(H,atomicweight);

1, atomicweight = [value = 1.00794, uncertainty = .7e-4, units = u]

>    GetElement(O,atomicweight);

8, atomicweight = [value = 15.9994, uncertainty = .3e-3, units = u]

>    mH2O:=(2*1.00794+15.9994)*g;

mH2O := 18.01528*g

>    mol:=mass/mH2O;

mol := .5550843506e-1

>    GetConstant(Avogadro_constant);

Avogadro_constant, symbol = N[A], value = .602214199e24, uncertainty = .47e17, units = 1/mol

>    N[A]:=0.602214199e24;

N[A] := .602214199e24

>    molecules:=mol*N[A];

molecules := mol*N[A]

8.What is the computer algebra systems and what are its advantages?

Computer algebra system is Symbolic Computation .Symbolic computation is computation with symbols representing mathematical objects,including
-integers,real, and complex
-polynomials

-derivatives and integrals

-systems of equations,series expansions of functions.

-objectve is to obtain closed form,exact numbers.

The advantages of this system is

-Thousand of built in functions

-many options for simplifying expressions.

9.Determine whether y+8/x-2=x+6 is linear nor not?(Hint:solve for y and comments) .

>    restart;

>    solve((y+8)/(x-2)=x+6,y);

-20+x^2+4*x

This equation is not linear as it has highest power which is 2.

10.Show that z=1,y=2,z=3 are the solutions for x+2y-3z=4.(Hint:use subs)

>    restart;

>    subs(z=1,y=2,x=3,x+2*y-3*z=4);

4 = 4

Yes,the value of x,y z are the solutions for x+2y-3z=4 as both sides are same.

11.A)Solve the equations :x-y=-3 and x+2y=3.Plot these equations in the same graph .Do these graphs cross each other?What is the meaning of the point of intersection?

>    restart;

>    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, displ...
[animate, animate3d, animatecurve, arrow, changecoords, complexplot, complexplot3d, conformal, conformal3d, contourplot, contourplot3d, coordplot, coordplot3d, cylinderplot, densityplot, display, displ...
[animate, animate3d, animatecurve, arrow, changecoords, complexplot, complexplot3d, conformal, conformal3d, contourplot, contourplot3d, coordplot, coordplot3d, cylinderplot, densityplot, display, displ...
[animate, animate3d, animatecurve, arrow, changecoords, complexplot, complexplot3d, conformal, conformal3d, contourplot, contourplot3d, coordplot, coordplot3d, cylinderplot, densityplot, display, displ...
[animate, animate3d, animatecurve, arrow, changecoords, complexplot, complexplot3d, conformal, conformal3d, contourplot, contourplot3d, coordplot, coordplot3d, cylinderplot, densityplot, display, displ...

>    e1:=x-y=-3;

e1 := x-y = -3

>    solve(%,y);

x+3

>    y1:=%;

y1 := x+3

>    e2:=x+2*y=3;

e2 := x+2*y = 3

>    solve(%,y);

-1/2*x+3/2

>    y2:=%;

y2 := -1/2*x+3/2

>    solve({e1,e2},{x,y});

{y = 2, x = -1}

>    plot({y1,y2},x=-infinity..infinity);

[Maple Plot]

Yes ,this graph cross each other and the meaning of the point of intersection is where the graph is cross each other.The point of intersection is (-1,2).

B)Plot the equations :y=-x-3 and y=-x+2.From the graphs what  can you say about the existence of solutions for this set of equations?

>    restart;

>    y1:=-x-3;y2:=-x+2;

y1 := -x-3

y2 := -x+2

>    plot({y1,y2},x=-infinity..infinity);

[Maple Plot]

           From this graph ,both equations has the same slope which is -1 and got only 1 solution.They are likely same to each others.   

  C) Plot the equations: x + y = 1 and 2x + 2y = 2.  From the graphs what can you say about the existence of solutions for this set of equation?

>    restart;

>    solve(x+y=1,x);

-y+1

>    x1:=%;

x1 := -y+1

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

-y+1

>    x2:=%;

x2 := -y+1

>    plot({x1,x2},y=-infinity..infinity);

[Maple Plot]

The graph obtained is the same as the slope is -1.

12.Solve the equations: 2x + y - 2z = 8, 3x + 2y - 4z = 15 and 5x + 4y - z = 1.

>    restart;

>    eqns:=(2*x+y-2*z=8,3*x+2*y-4*z=15,5*x+4*y-z=1);

eqns := 2*x+y-2*z = 8, 3*x+2*y-4*z = 15, 5*x+4*y-z = 1

>    sol:=solve({eqns},{x,y,z});

sol := {x = 1, z = -4, y = -2}

13.Write any equation of your own and expand it using Maple.  Factorize and simply the result and show that it gives back the starting equation.

>    restart;

>    p:=(x+1)*(x^2+2*x+1);

p := (x+1)*(x^2+2*x+1)

>    expand(p);

x^3+3*x^2+3*x+1

>    factor(p);

(x+1)^3

>    simplify(p);

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

14.Write any equation in with three variables (x, y and z) and solve it using Maple.

>    restart;

>    e1:=(2*x+5*y-z=11,x*2-6*y+2*z=22,x+y+z=22);

e1 := 2*x+5*y-z = 11, 2*x-6*y+2*z = 22, x+y+z = 22

>    sol:=solve({e1},{x,y,z});

sol := {x = 11/2, y = 11/4, z = 55/4}

>   

Hosted by www.Geocities.ws

1