MATH 162 Calculus II Computer Laboratory Topic: Introduction to Mathematica & Parametrizations

Similar documents
A plane. Or, with more details, NotebookDirectory. C:\Dropbox\Work\myweb\Courses\Math_pages\Math_225\

Lab 2B Parametrizing Surfaces Math 2374 University of Minnesota Questions to:

Introduction to Mathematica and Graphing in 3-Space

CurvesGraphics. A free package for Advanced Calculus illustrations. Gianluca Gorni. Arrows on 2D curves. Motivation

A Mathematica Tutorial

Parametric Curves, Polar Plots and 2D Graphics

Lecture 34: Curves defined by Parametric equations

Updated: August 24, 2016 Calculus III Section Math 232. Calculus III. Brian Veitch Fall 2015 Northern Illinois University

1. How Mathematica works

Calculus III. 1 Getting started - the basics

Mathematics Computer Laboratory - Math Version 11 Lab 7 - Graphics c

Mathematica Assignment 1

Ph3 Mathematica Homework: Week 1

You can drag the graphs using your mouse to rotate the surface.

Goals: Course Unit: Describing Moving Objects Different Ways of Representing Functions Vector-valued Functions, or Parametric Curves

REPRESENTATION OF CURVES IN PARAMETRIC FORM

Lecture 15. Lecturer: Prof. Sergei Fedotov Calculus and Vectors. Length of a Curve and Parametric Equations

Maple Commands for Surfaces and Partial Derivatives

An Introduction to Maple and Maplets for Calculus

GRAPHICAL REPRESENTATION OF SURFACES

Use Parametric notation. Interpret the effect that T has on the graph as motion.

Parametric Surfaces and Surface Area

Dynamical Systems - Math 3280 Mathematica: From Algebra to Dynamical Systems c

MATH11007 NOTES 15: PARAMETRIC CURVES, ARCLENGTH ETC.

Functions of Several Variables, Limits and Derivatives

Assignment 1. Prolog to Problem 1. Two cylinders. ü Visualization. Problems by Branko Curgus

OffPlot::"plnr"; OffGraphics::"gptn"; OffParametricPlot3D::"plld" Needs"Graphics`Arrow`" Needs"VisualLA`"

MATH11007 NOTES 12: PARAMETRIC CURVES, ARCLENGTH ETC.

Functions and Graphs. The METRIC Project, Imperial College. Imperial College of Science Technology and Medicine, 1996.

ü 12.1 Vectors Students should read Sections of Rogawski's Calculus [1] for a detailed discussion of the material presented in this section.

Math 348 Differential Geometry of Curves and Surfaces

MAT 275 Laboratory 1 Introduction to MATLAB

16.6. Parametric Surfaces. Parametric Surfaces. Parametric Surfaces. Vector Calculus. Parametric Surfaces and Their Areas

Curves Dr Richard Kenderdine

6.8 Sine ing and Cosine ing It

Continuity and Tangent Lines for functions of two variables

Math 32, August 20: Review & Parametric Equations

PARAMETRIC EQUATIONS AND POLAR COORDINATES

INTRODUCTION TO LINE INTEGRALS

0 Graphical Analysis Use of Excel

PROBLEMS INVOLVING PARAMETERIZED SURFACES AND SURFACES OF REVOLUTION

Worksheet 3.5: Triple Integrals in Spherical Coordinates. Warm-Up: Spherical Coordinates (ρ, φ, θ)

9.1 POLAR COORDINATES

True/False. MATH 1C: SAMPLE EXAM 1 c Jeffrey A. Anderson ANSWER KEY

Functions of Several Variables

Math (Spring 2009): Lecture 5 Planes. Parametric equations of curves and lines

Calculus II - Math 1220 Mathematica Commands: From Basics To Calculus II - Version 11 c

MATH 1020 WORKSHEET 10.1 Parametric Equations

To graph the point (r, θ), simply go out r units along the initial ray, then rotate through the angle θ. The point (1, 5π 6. ) is graphed below:

t dt ds Then, in the last class, we showed that F(s) = <2s/3, 1 2s/3, s/3> is arclength parametrization. Therefore,

ü 1.1 Getting Started

Grade 6 Math Circles October 16 & Non-Euclidean Geometry and the Globe

Introduction to Geogebra

form are graphed in Cartesian coordinates, and are graphed in Cartesian coordinates.

Curves: We always parameterize a curve with a single variable, for example r(t) =

3. The domain of a function of 2 or 3 variables is a set of pts in the plane or space respectively.

GETTING STARTED WITH MATHEMATICA

A Brief Introduction to Mathematica

Parametric and Polar Curves

Parametric and Polar Curves

Functions of Several Variables

Chapter 10 Homework: Parametric Equations and Polar Coordinates

Math 206 First Midterm October 5, 2012

January 30, 2019 LECTURE 2: FUNCTIONS OF SEVERAL VARIABLES.

Polar Coordinates. Chapter 10: Parametric Equations and Polar coordinates, Section 10.3: Polar coordinates 27 / 45

Digging deeper using GeoGebra: An exploration of quadratics and more.

LIGHTS, CAMERA, CALCULUS

10.1 Curves Defined by Parametric Equations

Drawing curves automatically: procedures as arguments

Topics in Analytic Geometry Part II

Polar Coordinates. Chapter 10: Parametric Equations and Polar coordinates, Section 10.3: Polar coordinates 28 / 46

Math 213 Calculus III Practice Exam 2 Solutions Fall 2002

Grade 6 Math Circles October 16 & Non-Euclidean Geometry and the Globe

Getting Started With Mathematica

Find the specific function values. Complete parts (a) through (d) below. f (x,y,z) = x y y 2 + z = (Simplify your answer.) ID: 14.1.

CALCULUS II. Parametric Equations and Polar Coordinates. Paul Dawkins

Precalculus 4.1 Notes Angle Measures, Arc Length, and Sector Area

Parametric and Polar Curves

Mathematical Experiments with Mathematica

: = Curves Defined by Parametric Equations. Ex: Consider the unit circle from Trigonometry. What is the equation of that circle?

Chapter 11. Parametric Equations And Polar Coordinates

10 Polar Coordinates, Parametric Equations

12 Polar Coordinates, Parametric Equations

Plot f, x, x min, x max generates a plot of f as a function of x from x min to x max. Plot f 1, f 2,, x, x min, x max plots several functions f i.

An interesting related problem is Buffon s Needle which was first proposed in the mid-1700 s.

Math 231E, Lecture 34. Polar Coordinates and Polar Parametric Equations

Math 21a Homework 22 Solutions Spring, 2014

Getting Started With Mathematica

Calculus III. Math 233 Spring In-term exam April 11th. Suggested solutions

Surfaces and Integral Curves

MTH 122 Calculus II Essex County College Division of Mathematics and Physics 1 Lecture Notes #11 Sakai Web Project Material

Problem #130 Ant On Cylinders

MATH 2023 Multivariable Calculus

UNIVERSIDAD CARLOS III DE MADRID MATHEMATICS II EXERCISES (SOLUTIONS ) CHAPTER 3: Partial derivatives and differentiation

To sketch the graph we need to evaluate the parameter t within the given interval to create our x and y values.

d f(g(t), h(t)) = x dt + f ( y dt = 0. Notice that we can rewrite the relationship on the left hand side of the equality using the dot product: ( f

Volumes of Solids of Revolution Lecture #6 a

PARAMETRIC EQUATIONS AND POLAR COORDINATES

To graph the point (r, θ), simply go out r units along the initial ray, then rotate through the angle θ. The point (1, 5π 6

Math Parametric Surfaces

Transcription:

MATH 162 Calculus II Computer Laboratory Topic: Introduction to Mathematica & Goals of the lab: To learn some basic operations in Mathematica, such as how to define a function, and how to produce various types of plots in 2 and 3 dimensions. To get an introduction to parametrizations of curves and surfaces. 1 A Simple Introduction 1.1 Starting up Start Mathematica (located on the dock). A blank notebook will appear. The things you type will go into a cell. While a blank notebook does not contain any cells, the moment you type, one will open up. As you continue to type, the cell grows as well. If you place the cursor somewhere else in the notebook where there is no cell then, upon typing, a different cell will be created. 1.2 Commands Mathematica has many built-in commands and functions, which may be entered and executed in a cell. The interpreter is case-sensitive (one of many possible syntactical pitfalls), and all built-in Mathematica commands begin with a capital letter. The arguments (inputs) to a command or function must be enclosed in square brackets. Parentheses are used in Mathematica exclusively for grouping expressions. Type the commands just as they appear below into a new cell. Note the underscore character that appears after the x, and the colon before the equals sign. f[x_] := Sin[x]/x Plot[f[x], {x,-3*pi,3*pi}] To execute these commands, which define a function f and then produce a graph in the viewing window 3π x 3π, hit the key marked Enter (or,

alternatively, hit Shift- Return ). Several new output cells will open up underneath your input cell. Many commands in Mathematica have a minimal syntax (like the Plot[ ] command above), but allow a number of switches so as to tailor the results. If you execute the command Options[Plot] you will see a list of switches which may be added inside Plot[ ]. They generally take the form OptionName -> Setting. Type and execute this command to see the effect of a couple of switches. Plot[f[x], {x,-10, 10}, PlotRange->{-1,2}, PlotStyle->Hue[1]] Commands for graphing functions of 2 variables are not much different than the one above. Say we want the graph of f(x, y) = cos x sin y. We may get it directly without naming the function first (i.e., calling it f), as in Plot3D[Cos[x]*Sin[y], {x,0,2*pi}, {y,0,2*pi}] or we may give it a name. When we do that, we can call the input variables x and y, or whatever names we like. f[doris_, Harold_] := Cos[Doris]*Sin[Harold] Plot3D[f[x,y], {x,0,2*pi}, {y,0,2*pi}, ColorOutput->GrayLevel] Without too much modification from the previous two plotting commands (only the name of the plotting function has been changed), we can produce a contour plot (i.e., a collection of level sets) for this same function f. ContourPlot[f[x,y],{x,0,2*Pi},{y,0,2*Pi}] Mathematica can do symbolic manipulations as well as make plots. For instance, to get f/ x and 2 f/ x 2 for the function f(x, y) = 4xy/(x 2 + y 2 ) we may use the commands f[x_,y_] := 4*x*y/(x^2 + y^2) D[f[x,y], x] D[f[x,y], {x, 2}] respectively. If we want f x expressed as a single fraction (that is, for Mathematica to find a common denominator between the two terms and combine them), we might type instead. Together[D[f[x,y], x]] 2

1.3 A little practice You may recall that we considered in class the function f(x, y) = 4xy/(x 2 + y 2 ). We found that, along every straight-line path to the origin, the function was constant, but that the constant changed for different lines. Hence, lim (x,y) (0,0) f(x, y) does not exist. Use the Mathematica commands you ve learned so far (modify as needed) to view both surface and contour plots of this function in a region of the domain surrounding the point (0, 0). Do these look anything like you expect? View these same two plots for the function g(x, y) = 4xy 2 /(x 2 + y 2 ). From what you see, would you expect the limit lim (x,y) (0,0) g(x, y) to exist? 2 2.1 Parametrized curves In MATH 161 you learn about parametric equations of the form x = f(t), y = g(t), a t b. If x and y vary continuously with t (i.e., if f and g are continuous functions of t), then the set of points (x(t), y(t)) for a t b form a curve C in the plane, traced out as t varies from a to b. The functions f and g, along with the interval [a, b], are said to be a parametrization of the curve C. The variable t is said to be the parameter. A parametrization of the unit circle (the circle centered at (0, 0) of radius 1) is provided by x = cos(s), y = sin(s), 0 s 2π. Type the command ParametricPlot[{Cos[s], Sin[s]}, {s, 0, 2*Pi}, AspectRatio -> Automatic] To get a better idea of what is going on, type these commands just as you see them here. << Graphics Animation 3

Animate[ GraphicsArray[{{ ParametricPlot[{Cos[s], Sin[s]}, {s, 0, T}, AspectRatio -> Automatic, PlotRange -> {{-1, 1}, {-1, 1}}, AxesLabel -> {"x", "y"}], Show[Graphics[{Hue[1], Line[{{0, 0}, {T, 0}}]}, PlotRange -> {{0, 2*Pi}, {-0.1, 0.1}}, Axes -> {True, False}, AxesLabel -> {"s", ""}]] }}], {T, 0, 2*Pi, 0.2}] The result will be some 30 frames or so. Once all frames have been generated, you may double-click any one of them to see them played (repeatedly) like a movie. What the movie should reveal is that, as s goes from 0 to 2π, the circle is traced out counterclockwise, starting and ending at the point (1, 0). The points (x, y) from a particular parametrization can always be produced by many other parametrizations. For instance, one can go clockwise, starting from (0, 1), around the unit circle with the parametrization x = sin(s), y = cos(s), 0 s 2π. and go around twice by letting s go through the larger interval 0 s 4π. Most any curve you can think of can be parametrized. For any continuous function y = f(x), a x b, this expression parametrizes the graph. (If one feels a separate parameter is required, then you could think of it as x = t, y = f(t), a t b, where the parameter t has been artificially introduced, and is no different than x.) But many interesting curves that do not correspond to functions y = f(x) (i.e., they fail the vertical line test) may be parametrized as well. Try out the one generated by ParametricPlot[{Cos[5*t], Sin[3*t]}, {t, 0, 20}, AspectRatio -> Automatic] 4

William Dickinson, of the mathematics department at Grand Valley State University, runs an annual parametric curve contest. You can view some of the clever artwork produced by freshman calculus students at the webpage http://faculty.gvsu.edu/dickinsw/parametricentries.html Parametrized curves do not have to lie in the plane. The simplest parametrized curves in space are lines, which take the form x(t) = a 1 t + b 1, y(t) = a 2 t + b 2, z(t) = a 3 t + b 3, < t <, where the a j, b j are constants. The first command below produces such a line in 3-space. It is followed by a more interesting-looking curve, called a helix, where the x and y coordinates are specified in the same way as they were for circles above, but the z coordinate changes: x(t) = cos(t), y(t) = sin t, z = t/6, < t <. The commands are ParametricPlot3D[{2*t-1, 1-t, 5-3*t}, {t,-5,5}] ParametricPlot3D[{Cos[t], Sin[t], t/6}, {t,-10,10}] 2.2 Parametrized surfaces Parametrization is something humans seem to do very naturally. As you enter a new state, an interstate highway will begin having mile-markers at 1 and count up each mile; the parameter here is arc length, and by knowing the value of your parameter, you can pinpoint where a vehicle is located on that interstate. (You may have noticed that our parametrizations of the unit circle had arc length as parameters as well.) The postal addresses of buildings along roads running north-south in Grand Rapids serve similarly as parameter-values indicating location relative to Fulton St. (the nearer to Fulton, the smaller the numbers). We do it naturally for surfaces as well as curves. In this case, two parameters are necessary instead of one. Consider the global-positioning system 5

afforded by latitude and longitude. Lines of longitude run from 0 to 360 (i.e., 0 to 2π radians), while lines of latitude run from π/2 to π/2, with latitude 0 being the equator. Mathematically, a more convenient parametrization would be to have latitudes running from 0 (at the north pole) to π (at the south). On a perfectly spherical globe of radius R, this translates into x = R sin u cos v y = R sin u sin v z = R cos u, { 0 u 2π, 0 v π. (Here the parameters are u and v.) Type the command ParametricPlot3D[{Sin[u]*Cos[v], Sin[u]*Sin[v], Cos[u]}, {u,0,2*pi}, {v,0,pi}] to see the sphere of radius 1. Below are two more commands that plot parametrized surfaces. Enter them and see what they are. ParametricPlot3D[ {(2 + Cos[v])*Cos[u], (2 + Cos[v])*Sin[u], Sin[v]}, {u, 0, 2*Pi}, {v, 0, 2*Pi}] ParametricPlot3D[{u*Cos[v], u*sin[v], 2*u}, {u, 0, 3}, {v, 0, 2*Pi}] Then try out the applet found at http://www.math.umn.edu/ rogness/multivar/parametrizedtorus.html to get a more precise idea of the relationship between the parameters u, v and the surface obtained by the first of these commands. 6