Math 2633
Fall 2015 Mini-Computer Project 5
DUE: 23/24 September 2015

http://calc.jjw3.com/math2633/Fa15Math2633MiniComputerProject05.htm

Technology (including Mathematica, TI calculators, Matlab, Python, Octave, R) are useful in Mathematics for at least three reasons:

  1. To check our work (e.g., verifying algebra work);
  2. To more quickly answer computation-extensive problems (e.g., Euler's method; constructing vector fields);
  3. To explore a problem to which we do not have a readily available procedure.

This project will help familiarize you with using Mathematica or Matlab to visualize the parametric space curves that result from the intersection of two surfaces. You can download the free student version of Mathematica from https://depts.gpc.edu/servicedesk/StuDownloads/.

Surfaces

A 3-dimensional surface is the set of all points $(x,y,z)$ that are solutions to a given equation.

Space Curves

A space curve is the set of all position vectors $\vec{r}(t)=\left\lt f(t), g(t), h(t) \right\gt$, where $t$ is a parameter.

Use of Mathematica Functions

Executing Mathematica Code

To execute Mathematica code (including comments), hold down the SHIFT key and press the ENTER key. Note: The cursor does NOT need to be at the end of the code!

Mathematica Comments

Comments MUST be enclosed by (* *). For example,

Use comments to label all parts of all questions AND annotate where needed. For example,

Mathematica Functions

For additional Mathematica code necessary for this project see:

Hyperbolic functions:

Parametrization of the Intersection of Space Curves

There are many ways to parametrize the space curve for the intersection of two surfaces. The common methods:

  1. Let one of the variables in the space curve be equal to the parameter
    1. Let $x=t$, or $y=t$, or $z=t$.
    2. Then use the equations for the surfaces to find the two remaining variables as functions of $t$.
    3. This method is easiest when there is at least one variable to the first power in the equations of a surface.
  2. Use $a\sin^2{(t)}+a\cos^2{(t)}=a^2$ if one of the surfaces is $x^2+z^2=a^2$, where $a$ is a constant:
    1. For example, $x^2+z^2=16$: Let $x=4\cos{(t)}$ and $z=4\sin{(t)}$.
    2. Then use the equations for the surfaces to find the the remaining variable as a function of $a\sin{(t)}$ and $a\cos{(t)}$.
    3. This method is easiest when at least one of the surfaces has traces that are circles.
  3. Use $a\sin^2{(t)}+a\cos^2{(t)}=a^2$ if one of the surfaces is $(y-b)^2+(z-c)^2=a^2$, where $a$, $b$, and $c$ are a constants:
    1. For example, $(y+2)^2+(z-3)^2=16$: Let $y+2=4\cos{(t)}$ and $z-3=4\sin{(t)}$.
    2. Then use the equations for the surfaces to find the the remaining variable as a function of $a\sin{(t)}$ and $a\cos{(t)}$.
    3. This method is easiest when at least one of the surfaces has traces that are circles.
  4. Use $a\sin^2{(t)}+b\cos^2{(t)}=c^2$ if one of the surfaces is $ax^2+by^2=c^2$, where $a$, $b$, and $c$ are a constants:
    1. For example, $4x^2+y^2=16$: Let $x=2\cos{(t)}$ [where $2=+\sqrt{c^2/a}=+\sqrt{16/4}$] and $y=4\sin{(t)}$ [where $4=+\sqrt{c^2/b}=+\sqrt{16/1}$].
    2. Then use the equations for the surfaces to find the the remaining variable as a function of $a\sin{(t)}$ and $b\cos{(t)}$.
    3. This method is easiest when at least one of the surfaces has traces that are ellipses.
  5. Use $a\sinh^2{(t)}-a\cosh^2{(t)}=a^2$ if one of the surfaces is $y^2-z^2=a^2$, where $a$ is a constant:
    1. For example, $x^2-y^2=9$: Let $x=3\cosh{(t)}$ and $y=3\sinh{(t)}$.
    2. Then use the equations for the surfaces to find the the remaining variable as a function of $a\sinh{(t)}$ and $a\cosh{(t)}$.
    3. You can employ the same methods to shift or scale hyperbolas as shown for circles and ellipses.
    4. This method is easiest when at least one of the surfaces has traces that are hyperbolas.

Project Requirements

Functions

Since the project will require the re-use of objects, you need to store the following objects into variables:

Example

  1. Graph both surfaces $x+y=3$ and $y^2=z$ on $-6\le t\le 6$ and graph the space curve, $\left<3-t,t,t^2\right>$, $t\in [-3,3]$, of the intersection of the surfaces.
    1. Store the graphs of the two surfaces into a non-function variable, $surfs$:
      surfs=ContourPlot3D[{x+y==3,y^2==z},{x,-6,6},{y,-6,6},{z,-6,6},AxesLabel->{x,y,z},ContourStyle->Directive[Opacity[0.4]],Mesh->None]
    2. Store the graph of the vector function into a non-function variable, $sc$:
      sc=ParametricPlot3D[{3-t,t,t^2},{t,-3,3}]
      • NOTE: You may need to write a piecewise-defined parametric function if you used $\sqrt{\text{ }}$ in solving for the remaining variable.
      • Store the plot for each piecewise function into its own variable, e.g., $sc1$, $sc2$, $sc3$, etc.
    3. Show both surfaces and the space curve on the same axes: Show[{surfs,sc}]
      • NOTE: If you used a piecewise-defined parametric function, e.g., $sc1$, $sc2$, $sc3$, and $sc4$, then you will need to use: Show[{surfs,sc1,sc2,sc3,sc4}]

Mathematica Documentation

Label Your Work

Any time that you use Mathematica, label the document with your name and the date:

Work

Answer the following question, using the appropriate code shown above (label each question with (* Question xx *) replacing the xx with the appropriate numbers).
Annotate all parts of questions using comment tags, e.g. (* Plot of vector function <3-t,t,t^2> *).

For each of the following pairs of surfaces:
  1. Find a parametrization of the intersection of the curves.
  2. Graph the surfaces and the space curve on the same axes, using appropriate values for domain.
  1. $z=x^3$ and $y=\sin{(x)}+z^2$
  2. $x^2+y^2=9$ and $y=x^2+z$
  3. $x^2+y^2+z^2=4$ and $x^2-y^2=2z$
  4. $x^2+y^2=9$ and $z=xy$
  5. Viviani's curve is the interection of $x^2+y^2+z^2=16$ and $(x-2)^2+y^2=4$
  6. Complete two more examples (one example cannot have any variable to the first power).

Submission (Make sure you read this section completely)

  1. Save the Mathematica as a notebook (.nb) file or Matlab as an (.m) file.
  2. Annotate/label all questions.
  3. The project is due no later than the starting time of your class on 23/24 September 2015. No late assignments will be graded.
  4. If the submission requirements are not met, then the project will not be graded.
  5. You may receive feedback on a project that is submitted at least $24$ hours, in advance.
  6. Use comments at the end of the project to verify that your submission is your own work and that you received no assistance from other individuals.
  7. The project is worth a total of 2 points.