Download Theory Questions

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts

Addition wikipedia , lookup

Algebra wikipedia , lookup

System of polynomial equations wikipedia , lookup

Partial differential equation wikipedia , lookup

Elementary mathematics wikipedia , lookup

Transcript
ELENA MAZLINDA MAZLAN 0434226
SECTION2
1. Computer Algebra System: What is computer algebra system (symbolic computing)?
Computer Algebra System is computation with symbols representing mathematical objects. For
example derivatives,polynomials.
2. What are the differences between symbolic computing and numerical computing?
Symbolic Computing
Use “*” as multiplication
Significant digits is 15 (Excel) and 10
(Casio)
Calculation with units
Numerical Computing
Use “x” as multiplication
Significant digits is 524279
Calculation without units
3. What are the advantages of symbolic computing compared to the numerical computing?
The word length is longer in symbolic computing. #digits=2^19=524279. Max number is
10^524279. Moreover, calculation with symbolic computing can involve units.
4. Hierarchy of arithmetic operations: Use your own 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 of equal priority, in which directions they are carried?
> 6+2*3+5+4^3;
81
The equation starts from left to right by solving (2*3) and (4^3).
> 9*9+3^2-5;
85
The equation starts from left to right by solving (9*9) and (3^2).
> 5+5^5+10;
3140
The equation starts from left to right by solving (5^5)
6/26/2017
3:13:31 PM
ELENA MAZLINDA MAZLAN 0434226
SECTION2
5. Using your own examples (one example each and execute them in maple) clearly bring out all
the differences between the following maple symbols and commands:
a); and :
Semicolon (;) will display the output. Example:
> 5*3+16^2;
271
Symbol (:) will suppress the output. Example:
> 5*3+16^2:
>
b) = and :=
:= is a syntax for naming. Assignment operator associates a function name with a function
operator.
Name:=expression Example: > numbers:={0,Pi/3,Pi/2,Pi};
= is equation for naming.
>eqn:=x=y+2 Example: > eqn1:=16*x+13*y-2*z=18;
c) ? and ???
(?) causes the topic to open with all of its sections contracted. Using (???) causes the
topic to open with the examples section expanded, all other sections contracted.
d) expression and function
Expression does not has arrow notation (->) Example : > 5*3+16^2;
Function has arrow notation (->) to evaluate a function when it appears in Mapple expression.
Example : > f:=x->x^2-6*X;
f := x x26 X
6/26/2017
3:13:31 PM
ELENA MAZLINDA MAZLAN 0434226
SECTION2
e) sum and add
sum command is for “symbolic” summation while add command is used to add up an explicit
sequence of value. Example:
> add('k^2', k=0..4);
5 k2
> sum('k^2', k=0..4);
30
6. Use of Help facilties in Maple: Use the help commands in Maple and explain the use of three
Maple commands (not discussed in the class) with your own examples.
Mapping-command often use on set. Mapping applies a function simultaneously to all the elements
of any structure. Example:
> numbers:={0,Pi/3,Pi/2,Pi};
numbers := { 0, ,
> map(g,numbers);
 
, }
3 2


{ g( 0 ), g(  ), g , g  }
3 2
> map(sin,numbers);
{ 0 , 1,
3
}
2
The nops and op command-breaking expressions into part and extracting subexpressions.
The nops command returns to the number of parts in an expression.
> nops(X^2);
2
> nops(x+y+z);
3
The op command allows excess to part of expression.
> op(1,x^2);
x
6/26/2017
3:13:31 PM
ELENA MAZLINDA MAZLAN 0434226
SECTION2
> op(2,x^2);
2
The numer and denom commands-take numerator and denominator of a rational expression.
> numer(3/4);
3
> denom(1/(1+x));
6/26/2017
1x
3:13:31 PM
ELENA MAZLINDA MAZLAN 0434226
SECTION2
7. Use of 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 problem fully and comment whether Maple gives the correct final answer
along with appropriate units. (Refer, but don’t reuse the examples discussed in the class or in
the help menu)
> restart;with (Units[Natural]);
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
[ *, +, -, /, <, <=, <>, =, , , Unit , ^, 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 ,
polar , root , round , sec, sech, seq, shake, signum , simplify, sin , sinh , sqrt , surd , tan,
tanh , trunc, type, verify]
> density:=mass/volume;
density :=
mass
volume
> eval(density,[mass=5*kg,volume=8*m^3]);
5  kg 


8  m 3 
> evalf(%);
kg
0.6250000000 3 
m 
> force:=mass/acceleration;
force :=
mass
acceleration
> eval(force,[mass=5*kg,acceleration=10*m/s^2]);
1  kg s 2 


2  m 
> evalf(%);
6/26/2017
3:13:31 PM
ELENA MAZLINDA MAZLAN 0434226
SECTION2
 kg s
0.5000000000
 m
2



> moment_of_inertia:=length^2*mass;
moment_of_inertia := length 2 mass
> eval(moment_of_inertia,[length=2*m,mass=9*kg]);
36 [ m2 kg ]
> evalf(%);
36. [ m 2 kg ]
6/26/2017
3:13:31 PM
ELENA MAZLINDA MAZLAN 0434226
SECTION2
8. Find out the dimensions of three different physical properties using Maple.
> with(Units);with(Units[Natural]);
[ AddBaseUnit , AddDimension , AddSystem, AddUnit, Converter, GetDimension ,
GetDimensions , GetSystem, GetSystems, GetUnit, GetUnits, HasDimension ,
HasSystem , HasUnit , Natural, RemoveDimension , RemoveSystem, Standard, Unit,
UseContexts, UseSystem, UsingContexts, UsingSystem ]
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
[ *, +, -, /, <, <=, <>, =,  , , Unit, ^, 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,
polar , root, round , sec, sech, seq, shake, signum , simplify, sin , sinh , sqrt, surd , tan,
tanh , trunc, type, verify ]
> GetDimension(angular_jerk);
length
length ( radius ) time3
> GetDimension(electric_displacement);
electric_current time
length2
> GetDimension(absorbed_dose);
length ( radiation ) 2 mass ( radiation )
time ( radiation ) 2 mass
>
6/26/2017
3:13:31 PM
ELENA MAZLINDA MAZLAN 0434226
SECTION2
9. 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 , HasElement , HasProperty,
ModifyConstant, ModifyElement ]
> GetElement(Hg,density);
g
80, density value13.5336, uncertaintyundefined, units 3 

cm 

> mass:=1*kg;
mass := kg
>
> density:=13.5336*kg/m^3;
kg
density := 13533.60000  3 
m 


>
> volume:=mass/density;
volume := 0.00007389016965 [ m3 ]
>
6/26/2017
3:13:31 PM
ELENA MAZLINDA MAZLAN 0434226
SECTION2
10. Use Maple to calculate the number of water molecules in 1 g of liquid water.
> H2OMole:=2*Element(H,atomicweight)+Element(O,atomicweight);
H2OMole := 2 Element ( H, atomicweight )Element ( O, atomicweight )
> evalf(H2OMole);
0.2991509666 10-25
> convert(%,units,kg,amu);
18.01528000
> 1./%;
0.05550843506
> restart;
> with(ScientificConstants);
[ AddConstant, AddElement, AddProperty, Constant, Element, GetConstant,
GetConstants, GetElement, GetElements, GetError, GetIsotopes, GetProperties,
GetProperty, GetUnit, GetValue, HasConstant , HasElement , HasProperty,
ModifyConstant, ModifyElement ]
> GetConstant(Avogadro_constant);
Avogadro_constant, symbolNA, value0.602214199 10 24, uncertainty0.47 10 17,
units
1
mol
> N[A]:=.602214199e24;
NA := 0.602214199 10 24
>
Error, (in ScientificConstants:-Constant) expecting a name for 1st argument,
but got .602214199e24
> molecule:=0.05550843506*N[A];
molecule := 0.3342796776 1023
>
6/26/2017
3:13:31 PM
ELENA MAZLINDA MAZLAN 0434226
11. Determine whether
SECTION2
y8
x6 is linear nor not? (Hint: solve for y, and comment)
x2
> restart;
> solve({(y+8)/(x-2)=x+6},y);
{ y20x24 x }
No, because it has x to the power of two which is quadratic equation.
12. Show that z=1, y=2, x=3 are the solutions for x+2y-3z = 4. (Hint: use subs)
> restart;
> p1:=x+2*y-3*z;
p1 := x2 y3 z
> subs(z=1,y=2,x=3,x+2*y-3*z=4);
44
13. 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;
> eq1:=x-y=-3;
> eq2:=x+2*y=3;
eq1 := xy-3
eq2 := x2 y3
> yeq1:=solve(eq1,y);
yeq1 := x3
> yeq2:=solve(eq2,y);
yeq2 := 
> solve({eq1,eq2},{x,y});
x 3

2 2
{ y2, x-1 }
> plot({yeq1,yeq2}, x=-5..5);
6/26/2017
3:13:31 PM
ELENA MAZLINDA MAZLAN 0434226
SECTION2
>
Point of intersection is when graph crossed each other. (-1,2) is coordinate of intersection.
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 equation?
> eq1:=y+x=-3;
> eq2:=y+x=2;
> yeq1:=solve(eq1,y);
> yeq2:=solve(eq2,y);
eq1 := yx-3
eq2 := yx2
yeq1 := x3
yeq2 := x2
> plot({yeq1,yeq2}, x=-5..5);
6/26/2017
3:13:31 PM
ELENA MAZLINDA MAZLAN 0434226
SECTION2
The graph is parallel is each other which means the slope is the same (m1=m2).
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?
> eq1:=x+y=1;
> eq2:= 2*x+2*y=2;
eq1 := yx1
eq2 := 2 x2 y2
> yeq1:=solve(eq1,y);
> yeq2:=solve(eq2,y);
yeq1 := x1
yeq2 := x1
> plot({yeq1,yeq2},x=-5..5);
6/26/2017
3:13:31 PM
ELENA MAZLINDA MAZLAN 0434226
SECTION2
Both equation have same slope.
14. Solve the equations: 2x + y – 2z = 8, 3x + 2y – 4z = 15 and 5x + 4y – z = 1.
> e1:=2*x+y-2*z=8;
> e2:=3*x+2*y-4*z=15;
> e3:=5*x+4*y-z=1;
e1 := 2 xy2 z8
e2 := 3 x2 y4 z15
e3 := 5 x4 yz1
> solve({e1,e2,e3},{x,y,z});
{ x1, y-2, z-4 }
6/26/2017
3:13:31 PM
ELENA MAZLINDA MAZLAN 0434226
SECTION2
15.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.
> p1:=(x^2+y+9)*(x^3+3*y+3)*(9*y+2)^3;
p1 := ( x2y9 ) ( x33 y3 ) ( 9 y2 )3
> expand(%);
2161782 x 2 y 2729 y 4 x 37047 y 3 x 34482 y 2 x 334587 y 32187 y 523328 y 4
348 x 2 y3156 y24 x 272 x 3980 y x 316386 y 2729 x 5 y 3486 x 5 y 2
108 x 5 y2187 x 2 y 43645 x 2 y 38 x 5
> factor(%);
( x2y9 ) ( x33 y3 ) ( 9 y2 )3
> simplify(%);
( x2y9 ) ( x33 y3 ) ( 9 y2 )3
16. Write any equation with three variables (x, y and z) and solve it using Maple.
> restart;
> eqns:=(x+2*y+3*z=15, 5*x+3*y-2*z=25, 5*x+2*y-3*z=15);
eqns := x2 y3 z15, 5 x3 y2 z25, 5 x2 y3 z15
> soln:=solve({eqns},{x,y,z});
soln := { z-2, y12, x-3 }
6/26/2017
3:13:31 PM
ELENA MAZLINDA MAZLAN 0434226
SECTION2
6/26/2017
3:13:31 PM