DOC PREVIEW
MSU PHY 102 - worksheet02

This preview shows page 1 out of 3 pages.

Save
View full document
View full document
Premium Document
Do you want full access? Go Premium and unlock all 3 pages.
Access to all documents
Download any document
Ad free experience
Premium Document
Do you want full access? Go Premium and unlock all 3 pages.
Access to all documents
Download any document
Ad free experience

Unformatted text preview:

Worksheet #2 - PHY102 (Spr. 2007)Formats and List operations (Vectors)FormatingFrom the toolbar do the following: “format” followed by “style”, thedropdown menu offers you lots of options. “input” is the default, and is the“format” in which you do calculations. However Mathematica also allowsvarious fonts and styles of text input. In this problem set you should includea text “cell” before each problem which identifies the problem (e.g. Problem1), and a text cell at the top of the page with your name and the number ofthe worksheet (e.g. “worksheet 2”).Last week we did derivatives and integrals using the full Mathemat-ica commands. However many of these commands may be entered from“palettes”. To activate a palette, from the toolbar do the following: “file”followed by “palettes”. You have several options: “basic input” is one I like.When you get into troubleSometimes you will try to use a variable in more than one way. Thiscan confuse Mathematica. There are several ways to clear a variable a, forexamplea = . which clears a numerical assignment to a, andClear[a[x]] which clears a function assignment to a[x].If you want to remove all of your prior definitions you can use,Remove[“Global‘ ∗ ”]At some point Mathematica will get really unhappy and start doing a re-ally long winded calculation which you did not think you asked it to do. Inthat case you can go to the “kernel” tab, and click on “abort evaluation”.Sometimes that does not work, in which case you can click on “quit kernel”.This stops the mathematica kernel and you loose the evaluations you havealready carried out. If neither of these works, scream and rant about stupidcomputer programs, which will probably get the TA’s attention.1Lists and VectorsBy now you must have read about vectors. A vector is a quantity which,unlike a scalar, can have many components. For example in Newton’s secondlaw of motion~F = md2~rdt2(1)the quantity m (mass) is a scalar. But the force~F and the acceleration~a =d2~rdt2are vectors. As you can see in Eq. (1), and which is true in general,multiplying a vector ~a with a scalar m, gives a vector~F . A vector is describedby its components in a chosen co-ordinate system. For example a vector~Ain cartesian co-ordinates is given by,~A = (Ax, Ay, Az).In Mathematica vectors are represented in the same way. In Mathematicathis object is called a list, because it can be used for more general objectssuch as matrices and tensors. In this worksheet we just work with vectors.Type “A = {Ax, Ay, Az}”. This means Mathematica associates theobject A with the list {Ax, Ay, Az}. Now type “B = {Bx, By, Bz}”. Type“Dot[A,B]”. This will give the dot product~A·~B=AxBx+AyBy+AzBz whichis the same as |A||B|cos(θ), where θ is the angle between the vectors~A and~B.Likewise, the cross product of two vectors (~A ×~B) yields another vec-tor~C = {AyBz-AzBy, AzBx-AxBz, AxBy-AyBx}. “Type Cross[A,B]” andverify that you indeed get the above expression in terms of the componentsof~A and~B. Unit vectors can be easily written with lists as: ˆx = {1,0,0},ˆy = {0,1,0}, ˆz = {0,0,1}. Check with Mathematica that ˆx·ˆy = ˆy·ˆz = ˆz·ˆx = 0.You can see that the elements in the list {Ax, Ay, Az} of the vector~A = ˆxAx+ ˆyAy+ ˆzAzare its x, y, and z components. How do we access theindividual components from A?.Type “A[[2]]” and check that this gives Ay. How would you get Mathe-matica to print out the second element of the cross product “Cross[A,B]”?Assignment 2. - Hand in by Thursday Jan. 25thProblem 1. Consider two vectors~A = (√32,12, 0), and~B = (12,√32, 0). UsingMathematica:(i) Check that they are both of unit magnitude.(ii) Find~A ·~B.2(iii) Find the angle between these two vectors.(iv) Find the cross pruduct of these two vectors.Problem 2. Consider the unit vectors along x, y, and z directions: ˆx ={1,0,0} ˆy = {0,1,0} ˆz = {0,0,1}. Verify: ˆx × ˆy = ˆz, ˆy × ˆz = ˆx, ˆz × ˆx = ˆy.Problem 3. Verify that for any three vectors~A,~B, and~C that~A×(~B×~C) =~B(~A ·~C) −~C(~A ·~B).Problem 4. The motion of a particle is given by ~r(t)=a(ˆxcos(ωt) + ˆysin(ωt))Find its velocity ~v. Calculate~Ω × ~r, where~Ω = (0, 0, ω), and verify that~v =~Ω × ~r. Do you recognise this motion? Plot the motion to confirm yourintuition (use the help menu to look up how to use the command “Paramet-ricPlot” for this problem - you will need to choose values for a and


View Full Document

MSU PHY 102 - worksheet02

Download worksheet02
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view worksheet02 and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view worksheet02 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?