# class14 - PHYS 5900 Class 14 (9/25/2008Fri) Zi-Wei Lin...

This preview shows pages 1–7. Sign up to view the full content.

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: PHYS 5900 Class 14 (9/25/2008Fri) Zi-Wei Lin Example 2.4.13 Plot the x-y trajectory of a plane pendulum with a radius r by choosing a proper unit for time; the pendulum starts from the angle of 12 degrees at rest at time 0. Θ r Force Looking at the force and its direction at angle theta , the equation of motion is m r d 2 theta d tt 2 = - m * g * sin H theta L i.e. d 2 theta d tt 2 = - g r * sin H theta L where tt represents time, g is the gravitational acceleration of the Earth. Mathematica cannot solve it analytically : In[1]:= DSolve @8 theta '' @ tt D- g r * Sin @ theta @ tt DD , theta @ D 12 * Degree, theta ' @ D == < , theta @ tt D , tt D Out[1]= 8< Now we solve it numerically. In the above equations, I tt 2 * g r M is dimensionless and can be defined as a new variable t 2 , i.e., we choose the unit of tt as r g and then get d 2 theta dt 2 = - sin H theta L In[2]:= DSolve @8 theta '' @ t D- Sin @ theta @ t DD , theta @ D 12 * Degree, theta ' @ D == < , theta, t D Out[2]= 8< In[3]:= NDSolve @8 theta '' @ t D- Sin @ theta @ t DD , theta @ D 12 * Degree, theta ' @ D == < , theta, 8 t, 0, Pi <D Out[3]= 88 theta fi InterpolatingFunction @88 0., 3.14159 << , <> D<< In[4]:= sol = theta . First @ % D Out[4]= InterpolatingFunction @88 0., 3.14159 << , <> D In[5]:= xyList = 8 Sin @ sol @ t DD ,- Cos @ sol @ t DD< ; In[6]:= Plot @ xyList, 8 t, 0, Pi <D Out[6]= 0.5 1.0 1.5 2.0 2.5 3.0- 1.0- 0.8- 0.6- 0.4- 0.2 0.2 In[7]:= traj = Table @ xyList, 8 t, 0, Pi, Pi 8 <D Out[7]= 88 0.207912,- 0.978148 < , 8 0.192402,- 0.981316 < , 8 0.147937,- 0.988997 < , 8 0.0807484,- 0.996735 < , 8 0.000902549 ,- 1. < , 8- 0.079086,- 0.996868 < , 8- 0.146674,- 0.989185 < , 8- 0.19172,- 0.98145 < , 8- 0.207904,- 0.978149 << 2 class14.nb In[8]:= ListPlot @ traj, AxesLabel-> 8 " x H r L ", "y H r L " <D Out[8]=- 0.2- 0.1 0.1 0.2 x H r L- 0.995- 0.990- 0.985- 0.980 y H r L In[9]:= ListPlot @ traj, AxesLabel-> 8 " x H r L ", " y H r L " < , AspectRatio-> Automatic, PlotRange-> 8 0,- 1.1 <D Out[9]=- 0.2- 0.1 0.1 0.2 x H r L- 1.0- 0.8- 0.6- 0.4- 0.2 y H r L class14.nb 3 We can also use ParametricPlot : In[10]:= ParametricPlot @ xyList, 8 t, 0, Pi < , PlotRange fi 8 Automatic, 8 0,- 1.1 <<D 4 class14.nb Out[10]=- 0.2- 0.1 0.1 0.2- 1.0- 0.8- 0.6- 0.4- 0.2 In[11]:= Clear @ sol, traj D class14.nb 5 Example 2.4.14 1) Prove the following Jacobi identity: [A×(B×C)]+[B×(C×A)]+[C×(A×B)]=0. Vector analysis: the package is "VectorAnalysis`". Functions include: CoordinateSystem, Coordinates, SetCoordinates, DotProduct, CrossProduct, Curl, Div, Grad,Laplacian, . (for DotProduct) In[12]:= Needs @ "VectorAnalysis`" D In[13]:= CoordinateSystem Out[13]= Cartesian In[14]:= Coordinates @D Out[14]= 8 Xx, Yy, Zz < In[15]:= Div @8 Xx^2, Yy^2, Zz^2 <D Out[15]= 2 Xx + 2 Yy + 2 Zz In[16]:= SetCoordinates @ Cartesian @ x, y, z DD Out[16]= Cartesian @ x, y, z D In[17]:= Coordinates @D Out[17]= 8 x, y, z < A vector can be represented by a 3-element list : In[18]:= a = 8 ax @ x, y, z D , ay @ x, y, z D...
View Full Document

## This note was uploaded on 04/25/2010 for the course PHYS 5900 taught by Professor Lin during the Fall '09 term at East Carolina University .

### Page1 / 17

class14 - PHYS 5900 Class 14 (9/25/2008Fri) Zi-Wei Lin...

This preview shows document pages 1 - 7. Sign up to view the full document.

View Full Document
Ask a homework question - tutors are online