mathematica tutorial project 1 - wordpress.com...mathematica tutorial project 1.nb 9. 10 mathematica...
TRANSCRIPT
In[45]:= Mathematica TutorialIn[46]:= 1. Plot the graph of the function f Hx, yL = x2 + y2 on the region @-3, 3D�@-3, 3DIn[46]:= Plot3DAx2 + y2, 8x, -3, 3<, 8y, -3, 3<E
Out[46]=
-2
0
2 -2
0
2
0
5
10
15
2 Mathematica tutorial project 1.nb
In[47]:= 2. Plot the graph of the functions f Hx, yL =
x2 + y2 and g Hx, yL = x3 - y3 on the region @-3, 3D�@-3, 3D on the same graph
In[47]:= Plot3D@8x^2 + y^2, x^3 - y^3<, 8x, -3, 3<, 8y, -3, 3<D
Out[47]=
-2
0
2
-20
2
-20
0
20
Mathematica tutorial project 1.nb 3
4 Mathematica tutorial project 1.nb
In[48]:= 3. Plot the contour plot of the x2 + y2 = 1
Set::write : Tag Times in 3. Icontour of plot Plot the2
x2
+ y2M is Protected. �
Out[48]= 1
In[49]:= ContourPlot@x^2 + y^2 � 1, 8x, -3, 3<, 8y, -3, 3<D
Out[49]=
-3 -2 -1 0 1 2 3
-3
-2
-1
0
1
2
3
Mathematica tutorial project 1.nb 5
6 Mathematica tutorial project 1.nb
In[50]:= 3. Plot the graph of the curve r® HtL = < cos H3 tL, sin H3 tL, sin H2 tL > without the axis
In[50]:= ParametricPlot3D@8Cos@3 tD, Sin@3 tD, Sin@2 tD<, 8t, 0, 2 Pi<, Boxed ® False, Axes ® NoneD
Out[50]=
Mathematica tutorial project 1.nb 7
8 Mathematica tutorial project 1.nb
In[51]:= 4. Find the velocity and acceleration vectors for the r® HtL = < cos H3 tL, sin H3 tL, sin H2 tL >
In[51]:= r = 8Cos@3 tD, Sin@3 tD, Sin@2 tD<velocity = D@r, tDacceleration = D@velocity, tD
Out[51]= 8Cos@3 tD, Sin@3 tD, Sin@2 tD<
Out[52]= 8-3 Sin@3 tD, 3 Cos@3 tD, 2 Cos@2 tD<
Out[53]= 8-9 Cos@3 tD, -9 Sin@3 tD, -4 Sin@2 tD<
Mathematica tutorial project 1.nb 9
10 Mathematica tutorial project 1.nb
5. Find the unit tangent and the normal vectors for the r® HtL = < cos H3 tL, sin H3 tL, sin H2 tL >
In[54]:= T = SimplifyB velocity
velocity.velocity
F
NormalVector = SimplifyB D@T, tDD@T, tD.D@T, tD
F
Out[54]= :-
3 Sin@3 tD
11 + 2 Cos@4 tD,
3 Cos@3 tD
11 + 2 Cos@4 tD,
2 Cos@2 tD
11 + 2 Cos@4 tD>
Out[55]= :-
5 Cos@tD + 33 Cos@3 tD + Cos@7 tD
H11 + 2 Cos@4 tDL3�2 107+10 Cos@4 tDH11+2 Cos@4 tDL2
,
-
-5 Sin@tD + 33 Sin@3 tD + Sin@7 tD
H11 + 2 Cos@4 tDL3�2 107+10 Cos@4 tDH11+2 Cos@4 tDL2
, -
12 Sin@2 tD
H11 + 2 Cos@4 tDL3�2 107+10 Cos@4 tDH11+2 Cos@4 tDL2
>
In[56]:=
Mathematica tutorial project 1.nb 11
12 Mathematica tutorial project 1.nb
6. Find the curvature of the curve r® HtL = < cos H3 tL, sin H3 tL, sin H2 tL >
In[57]:= Κ =1
velocity.velocity
K D@T, tD.D@T, tD O �� Simplify
Out[57]=
3107+10 Cos@4 tDH11+2 Cos@4 tDL2
11 + 2 Cos@4 tD
Mathematica tutorial project 1.nb 13
14 Mathematica tutorial project 1.nb
7. Compute the curvature at t =
3 and approximate it value to 10 digits after the decimal point
Out[58]= 30 after and approximate decimal digits it point the to value
In[59]:= curv@t_D :=
3107+10 Cos@4 tDH11+2 Cos@4 tDL2
11 + 2 Cos@4 tDcurv@3DN@curv@3D, 10D
Out[60]=3 107 + 10 Cos@12DH11 + 2 Cos@12DL3�2
Out[61]= 0.7132173645
Mathematica tutorial project 1.nb 15
16 Mathematica tutorial project 1.nb
8. Find the length of the curve r® HtL = < cos H3 tL, sin H3 tL, sin H2 tL > from t = 0 to t = 1
In[67]:= l = NBà0
1
velocity.velocity âtFOut[67]= 3.25162
Mathematica tutorial project 1.nb 17
18 Mathematica tutorial project 1.nb
9. Find the arclength parametrization of the curve r® HtL = < t, t4 >
In[94]:= c = 83 t, 5 t<v = D@c, tDv.v �� Simplify
s = à0
u
34 ât
Clear@sDOut[94]= 83 t, 5 t<
Out[95]= 83, 5<
Out[96]= 34
Out[97]= 34 u
In[99]:= SolveBs == 34 u, uFOut[99]= ::u ®
s
34>>
Mathematica tutorial project 1.nb 19