Computational tools beyond handled calculators are now a necessary part of any physicists repertoire. There are a wide variety of available tools including computer codes that are written to solve specific problems, mainstream software tools (such as spreadsheets and databases) which can be applied to physics problems and finally mathematical tools (such as Mathematica, Matlab, Maple, Mathcad, et cetera). We will make use of tools of all of these types in this course. The purpose of this exercise is to introduce you to one of these mathematical tools, Mathematica. Mathematica distinguishes itself from its competitors with its abilities to do exact symbolic, as well as numerical, calculations. These abilities allow Mathematica to, for example, give the solution of
In this exercise, you will first work through a Mathematica tutorial to get an idea of Mathematics’s abilities. Then you will use Mathematica to work a more complicated physics problems.
Start up Mathematica and open up the “Ten Minute Tutorial.” Carefully work through this tutorial - it should take you much longer than 10 minutes. (Note that you shouldn’t have NumLock activated while using Mathematica.) As you are working through the tutorial feel free to change things in the examples. Try out different numbers, functions, et cetera so that you have a better idea of how Mathematica works. Save a copy of the the tutorial in your home directory so that you can keep track of the changes you make while working through the tutorial.
Complete the following exercises based on the tutorial. Where appropriate print out plots and segments of Mathematica code showing your answers and tape them into your lab notebooks. Also answer the questions in your lab notebook.
In deriving the motion of a simple pendulum (as seen on the right), using torques (or forces) leads to the equation of motion:
In order to get this equation in the form of the simple harmonic oscillator equation, we typically assume that the angle is small so that sin , which results in:
In this exercise you will explore how justified this approximation is. In some parts of this exercise you may have to force Mathematica to make more precise calculations. You may have to use the Accuracy, WorkingPrecision, AccuracyGoal, and PrecisionGoal statements to get useful results.