Math 261 Fall 2015, Homework 1 help
General sage math cloud information
One option you can use for your computer homework is Sage math cloud, and online interactive notebook server for Sage, a free symbolic mathematics system. You can sign up for free sage math cloud account at
When registering, please use your full name and your SVSU email address. It will make it easier for me to communicate with you, and for you to submit your work to me.
After registering and logging in, you have to create a new project. I suggest you give it a name like "Calc 3" or something similar. After opening the new project, go to settings (a "wrench" icon) and add me as a collaborator, so you can ask me for help and submit your notebooks to me online. To add me, you open the settings (the "wrench" icon), scroll down to find the "Collaborators" box, type my name (Jan Hlavacek) or my email ([email protected]) into the search box, press enter, and a list of users matching your search will show below. At the moment I seem to be the only Jan Hlavacek using the server, but I added "(SVSU)" to my last name so you can easily identify me. Select my name from the list and click "Add selected". I will now be able to see your work on this project, type comments in your worksheets, and you can ask me questions using the chat.
Starting a Sage notebook
When you first open a project, it will be empty. You will need to create a new Sage worksheet. Click on the large "Create or upload files" button and you will be presented with a file creation dialog. There are number of different file types you can create. You want a "SageMath worksheet" for this homework.
You probably want to edit the filename, the default is based on current date and time, and in my experience it is really painful when you have 20 files all named something like "2015-12-07-132321" and you try to figure out what is in them and which one is the one you need. Then you click the "SageMath Worksheet" button, and you new empty worksheet will open.
Now you are ready to do the math.
Getting help
You can click in the "Help" button in the upper right corner of the page, and it will open a list of various links to bunch of help materials. There is a lot of information, you may want to start with the link to general Sage Math help and support pages, or scroll down to get to the "Getting Started" section.
Just some basic stuff:
Some examples what you can do are below. Let me know if you have any questions.
Defining a vector function
First define a vector function [\mathbf{r}(t) = \left\langle t\cos(t)/2, t, t\sin(t)/2\right\rangle] Notice that since it is the first time we are using the letter t
as symbolic variable, we have to declare it, so sage will know it is a symbolic variable and will not try to find an object named t
and complain it cannot find it. The line starting with the % sign will do that.
What is the value of the function when ? We can evaluate the vector function like this (I am going to first save the value to a variable pt
, for "point", so we can use it later, and then display the value of pt
):
To find an approximate numerical value, we use the .n()
method:
Derivatives of vector functions
To find a derivative of the vector function, use the diff
method:
Given a vector, we can find its norm using the .norm()
method. For example, to find the norm of the vector rp
, and therefore the speed of the motion described by the vector function , we use
Note that this is pretty messy. Sage does not know that our vectors are real, and uses a more general complex vector norm. It also does not simplify the result. We can specifically ask to simplify. We have to simplify two ways: first using the simplify
function, which will perform algebraic simplification, then the .simplify_trig()
method, which simplify the result using trigonometric identities:
TNB Frame
The unit tangent vector can be found by dividing the tangent vector , or rp
, by the speed. An easier way is to "normalize" the vector rp
.
In similar way we can get the unit normal vector N
:
You see that the N
vector is very complicated, even after simplification. Since for further calculation we do not need to take derivatives, we can simplify things by evaluating these vector function at :
The binormal vector is the crossproduct of and :
Plotting
To plot a vector from a point to point , use arrow(P,Q)
. So to plot a vector T1
positioned at a point pt
, do arrow(pt,pt+T1)
.
The following will plot the curve defined by the function for , as well as the TNB frame at the point pt
corresponding to :
Note that you can manipulate the plot with your mouse, or your finger or stylus on a touch screen.
Curvature and osculating circle
To find the equation of the osculating circle we need to first find the radius. The radius of the osculating circle is where is the curvature. There are several ways how to find the curvature, one is [\kappa = \frac{\left\vert T'(t)\right\vert}{\left\vert r'(t)\right\vert}]
The osculating circle touches the curve at the point pt
, has radius radius
and its center is directly in the normal direction from pt
. Since the normal vector N1
has norm 1, the vector radius*N1
will be normal to the curve at pt
, and when we place it to pt
, the center of the osculating circle will be at its tip:
The osculating circle will be inside the plane defined by the vectors and , which is called the osculating plane of the curve at the point pt
. The vectors are orthogonal and unit, just like the standard basis vectors and . This means that you can use them to create a local cartesian coordinate system in the osculating plane, with horizontal axis pointing in the direction of and vertical axis pointing in the direction of , and center at the point pt
.
In the standard coordinate system in the -plane, the vector equation of a circle with center at the origin and radius is [\mathbf{c}(t) = r\cos(t)\mathbf{i} + r\sin(t)\mathbf{j}, \quad 0 \le t \le 2\pi] Moving the center to another point means just adding the positin vector of the point.
In the osculating plane, all you need to do is replace the vectors and by and .
With that, you should be able to create the vector equation of the circle in the osculating plane, with radius radius
, and center center
.
Once you have the vector expression for the circle, you can use parametric_plot3d
to plot the circle. You can then "add" this plot to the plots of the curve and the TNB frame to get the combined plot you are supposed to produce.