Investigating Parametric Curves with MATLAB



Similar documents
x 2 + y 2 = 1 y 1 = x 2 + 2x y = x 2 + 2x + 1

GRAPHING IN POLAR COORDINATES SYMMETRY

Math 241, Exam 1 Information.

Solutions to Practice Problems for Test 4

Readings this week. 1 Parametric Equations Supplement. 2 Section Sections Professor Christopher Hoffman Math 124

10 Polar Coordinates, Parametric Equations

Exam 1 Sample Question SOLUTIONS. y = 2x

Numerical Solution of Differential Equations

Differentiation of vectors

This unit will lay the groundwork for later units where the students will extend this knowledge to quadratic and exponential functions.

3 Contour integrals and Cauchy s Theorem

Scientific Programming

Graphs of Polar Equations

PYTHAGOREAN TRIPLES KEITH CONRAD

Review of Fundamental Mathematics

Copyrighted Material. Chapter 1 DEGREE OF A CURVE

Fundamental Theorems of Vector Calculus

Mark Howell Gonzaga High School, Washington, D.C.

The Math in Laser Light Math

What are the place values to the left of the decimal point and their associated powers of ten?

By Clicking on the Worksheet you are in an active Math Region. In order to insert a text region either go to INSERT -TEXT REGION or simply

ab = c a If the coefficients a,b and c are real then either α and β are real or α and β are complex conjugates

Math Assignment 6

Zero: If P is a polynomial and if c is a number such that P (c) = 0 then c is a zero of P.

GRE Prep: Precalculus

Scalar Valued Functions of Several Variables; the Gradient Vector

Calculus with Parametric Curves

2008 AP Calculus AB Multiple Choice Exam

MATH 52: MATLAB HOMEWORK 2

MATLAB Workshop 3 - Vectors in MATLAB

1.2 GRAPHS OF EQUATIONS. Copyright Cengage Learning. All rights reserved.

Algebra. Exponents. Absolute Value. Simplify each of the following as much as possible. 2x y x + y y. xxx 3. x x x xx x. 1. Evaluate 5 and 123

Homework 2 Solutions

RADIUS OF CURVATURE AND EVOLUTE OF THE FUNCTION y=f(x)

COMPLEX NUMBERS AND SERIES. Contents

Worksheet 1. What You Need to Know About Motion Along the x-axis (Part 1)

Experiment 9. The Pendulum

Beginner s Matlab Tutorial

Irrational Numbers. A. Rational Numbers 1. Before we discuss irrational numbers, it would probably be a good idea to define rational numbers.

Microeconomics Sept. 16, 2010 NOTES ON CALCULUS AND UTILITY FUNCTIONS

6.1. The Exponential Function. Introduction. Prerequisites. Learning Outcomes. Learning Style

SAT Math Facts & Formulas Review Quiz

Determine If An Equation Represents a Function

How To Draw A Circle Of Radius 1 On A Computer (For A Computer)

Biggar High School Mathematics Department. National 5 Learning Intentions & Success Criteria: Assessing My Progress

CIRCLE COORDINATE GEOMETRY

12.6 Logarithmic and Exponential Equations PREPARING FOR THIS SECTION Before getting started, review the following:

2.2 Derivative as a Function

An Introduction to Calculus. Jackie Nicholas

Compute the derivative by definition: The four step procedure

ANALYTICAL METHODS FOR ENGINEERS

Euler s Method and Functions

MATH 221 FIRST SEMESTER CALCULUS. fall 2007

Zeros of Polynomial Functions

y cos 3 x dx y cos 2 x cos x dx y 1 sin 2 x cos x dx

88 CHAPTER 2. VECTOR FUNCTIONS. . First, we need to compute T (s). a By definition, r (s) T (s) = 1 a sin s a. sin s a, cos s a

Lateral Acceleration. Chris Garner

3.2. Solving quadratic equations. Introduction. Prerequisites. Learning Outcomes. Learning Style

2013 MBA Jump Start Program

AP Calculus BC 2001 Free-Response Questions

PRACTICE FINAL. Problem 1. Find the dimensions of the isosceles triangle with largest area that can be inscribed in a circle of radius 10cm.

Trigonometry Review with the Unit Circle: All the trig. you ll ever need to know in Calculus

Find the Square Root

1.7 Graphs of Functions

Solving Rational Equations

Notice numbers may change randomly in your assignments and you may have to recalculate solutions for your specific case.

FSMQ Additional Mathematics. OCR Report to Centres June Unit 6993: Paper 1. Free Standing Mathematics Qualification

Application of Function Composition

MA107 Precalculus Algebra Exam 2 Review Solutions

The Method of Least Squares. Lectures INF2320 p. 1/80

MAT12X Intermediate Algebra

DERIVATIVES AS MATRICES; CHAIN RULE

Geometry in architecture and building

Chapter 2. Parameterized Curves in R 3

Week 1: Functions and Equations

Supplemental Worksheet Problems To Accompany: The Pre-Algebra Tutor: Volume 1 Section 1 Real Numbers

1.(6pts) Find symmetric equations of the line L passing through the point (2, 5, 1) and perpendicular to the plane x + 3y z = 9.

Electrical Resonance

POLYNOMIAL FUNCTIONS

A QUICK GUIDE TO THE FORMULAS OF MULTIVARIABLE CALCULUS

Year 9 set 1 Mathematics notes, to accompany the 9H book.

AP Calculus AB 2010 Free-Response Questions Form B

THE COMPLEX EXPONENTIAL FUNCTION

Contents. 2 Lines and Circles Cartesian Coordinates Distance and Midpoint Formulas Lines Circles...

Visualizing Differential Equations Slope Fields. by Lin McMullin

Week 13 Trigonometric Form of Complex Numbers

Calculus 1st Semester Final Review

TWO-DIMENSIONAL TRANSFORMATION

M Polynomial Functions 1

x = + x 2 + x

The University of the State of New York REGENTS HIGH SCHOOL EXAMINATION MATHEMATICS B. Thursday, January 29, :15 a.m. to 12:15 p.m.

Chapter 3 RANDOM VARIATE GENERATION

L 2 : x = s + 1, y = s, z = 4s Suppose that C has coordinates (x, y, z). Then from the vector equality AC = BD, one has

SOLVING TRIGONOMETRIC INEQUALITIES (CONCEPT, METHODS, AND STEPS) By Nghi H. Nguyen

Higher Order Equations

Georgia Department of Education Kathy Cox, State Superintendent of Schools 7/19/2005 All Rights Reserved 1

Microeconomic Theory: Basic Math Concepts

Solutions for Review Problems

Transcription:

MTHH229 Fall 2006 The College of Staten Island Department of Mathematics Investigating Parametric Curves with MATLAB 1 Introduction In this project we investigate curves in the plane. Specifically, we want to think about graphs of curves that are not necessarily given by simple functions y = f(x). Such things fascinated ancient Greeks, confounded Enlightenment scholars, and often annoy students in Calculus 2 or 3. They are, however, very easy to visualize in Matlab. 1.1 New Math/MATLAB Topics a. Defining parametric curves, C : (x(t), y(t)) b. Plotting parametric curves. c. Exploring the calculus of curves 2 A parametric curve. We are used to thinking about graphs of functions in the Cartesian plane (x, y) where y = f(x). We all know that a function is a rule that assigns one and only one output value (y) for any allowable input value (x). While one can spend one s entire life stuing such things, there is an whole different world of graceful, curious and important objects (curves) defined by collections of points (x, y) which do NOT fit the catagory of functions. For example, let s consider the circle. This object is defined by the algebraic equation: x 2 + y 2 = r 2 for some value of the constant r which is the radius of the circle. How can we get Matlab to plot such a thing? Well, one way would be to solve for y as a function of x and use what we alrea know about plotting graphs. Try to do this and we immediately run into trouble! y 2 = r 2 x 2 y = ± r 2 x 2 What to do with the ±? What to do with the limited domain of the function defined above? If we wanted to plot the circle, we would need to carefully define the input values http://www.math.csi.cuny.edu/matlab proj 11 page 1

of x and then plot BOTH the y values of the positive square root and the negative square root. Try doing this in Matlab for some convenient value of r. For example, for r = 2 >> x=linspace(-2,2);plot(x,sqrt(4 - x.^2)) >> hold on >> plot(x,-sqrt(4-x.^2)); Yuck! That is an ugly looking circle and a lot of work. The reason the graph looks like an egg instead of a circle is because Matlab choses its own aspect ratio for the plot. (x is longer than y, for aesthetic reasons.) This is easily fixed with the axis command. Try typing: >> axis( equal ) Better looking circle, but there is something unnatural about forcing our elegant curve which is NOT a function into being a function so we may plot it. The way around this is to define x and y in terms of a third variable, t. This is what we mean by parameterizing the curve (x, y) by t. Knowing something about trigonemtry and the unit circle, we should recognize that a easy parameterization of the circle of radius r is given by: x(t) = r cos t y(t) = r sin t 0 < t < 2π Now this is elegant and also convenient to enter into Matlab should we wish to look at the curve. For a circle of radius 2: >> r = 2; >> t=linspace(0,2*pi); >> x = r*cos(t); >> y = r*sin(t); >> plot(x,y) >> axis( equal ) Voila, the same circle. Note that the parameterization of the curve is not unique. What would happen if you redefined x and y but left t as it is? What would happen if you left x and y alone, but changed the definition of t? Exercise 1: Consider the curve defined by: x(t) = r sin t y(t) = r cos t 0 < t < 2π a. Use Matlab to plot this curve for some value of r. http://www.math.csi.cuny.edu/matlab proj 11 page 2

b. Where does the curve start? In other words, what is the value of (x(0), y(0))? Compare this to the more standard parameterization given above. Exercise 2: Consider the curve defined by: x(t) = r cos t y(t) = r sin t π < t < π a. Use Matlab to plot this curve for some value of r. b. Compare this curve to the others. Are they different? c. Where does the curve start? 3 Some interesting curves What happens if we let the radius of the circle grow (or shrink) depending upon the value of t? Try this out. Consider the following curve: x(t) = t cos t y(t) = t sin t 0 < t What will the shape of this be? Thinking in terms of the circle, we see that now the radius is increasing linearly with time. Exercise 3: Use Matlab to plot the curve defined above. a. What is this curve? b. What happens to the curve as t increases? Look at different definitions of t, ie: t = linspace(0,2*pi), t = linspace(0,8*pi,1000) Exercise 4: Consider the following curve: x(t) = t cos t y(t) = r sin t 0 < t where r = constant What will the shape of this curve be? Think about it before asking Matlab. http://www.math.csi.cuny.edu/matlab proj 11 page 3

a. Use Matlab to plot the curve for 0 t 10π. Do not use the >> axis( equal ) command. b. Describe the curve Exercise 5: A Lissajous Curve (sometimes called a Bowditch Curve, if you are an Anglophile) is a parametric curve defined by: for constants a, b, n. x(t) = a sin(nt) y(t) = b sin(t) a. For n = 1, predict what the curve will look like. In this case, it easy to solve for y = f(x). What is f(x)? What effect do a and b have on the curve? b. Use Matlab to plot the curve for n = 2. Start with a = b = 1. What happens when you change these? c. If t starts at 0, at what value of t does the curve begin to repeat itself? (In other words, what is the period of the curve?) d. What will change when n = 1/2? e. Experiment with different values of n Try n = 4, 6 Try an odd value of n. What happens? What is the period of the curve for these integer values? f. Try n = 3/2, 2/3, 3/4 etc. EXTRA CREDIT: Can you figure out a general formula for the period of the curve? g. What happens when n is irrational? Try n = π (or n = e, or n = 2) and use a very large range of t, say 0 < t < 200π). What happens? Any idea why? If we want to think of the parameter t as time, then we can visualize our curve as the line traced out by a point that moves along the position (x(t), y(t)). In Matlab, it is easy to make a movie of the moving point using the movie command. For example, let us take the Lissajous curve defined above, with a = b = 1 and n = 7/2. >> a = 1; b = 1; >> t=linspace(0,4*pi,500); >> x = a*sin(n*t); >> y = b*sin(t); >> plot(x,y) >> axis( equal ) http://www.math.csi.cuny.edu/matlab proj 11 page 4

If we wanted to watch the curve evolve, we could now try: >> M = moviein(50); % Set up movie in M >> for i =1:50 % Make 50 frames of a Movie >> plot(x(1:10*i),y(1:10*i)); % Plot the first 10*i points of x,y >> hold on >> plot(x(10*i),y(10*i), r* ); % plot the last point so far with a red star >> axis([-a,a,-b,b]) >> M(:,i) = getframe; >> hold off >> end Whew... that may take a moment or ten, but now we have an animation of our curve. To view the animation, try: >> movie(m,2) %% View the movie two times. or >> movie(m,-2) %% View the movie, forward and backward, two times. Exercise 6: Make a movie of one of your other curves. Or make up a curve and make a movie of it. Back to calculus, given the parametric curve, we can now ask and answer reasonable questions about the speed and acceleration of our moving point. We can also easily ask, and answer, questions about the shape of the curve, such as the slope of the curve at any point. For example, let us consider the simple paramterized form of the circle: x(t) = r cos(t) y(t) = r sin(t) for 0 t < 2 π. Where is the slope of the tangent to this curve identically equal to zero? Well, we know that the slope is given by the derivative, /dx. But the rate of change of y with respect to x is nothing but the ratio of the rate of change of y with respect to t to the rate of change of x with respect to t. In other words: dx = dt dx dt In this example: dx = dt = dx dt r cos(t) r sin t = cos(t) sin t So, /dx = 0 whenever cos t = 0, namely at t = π/2 and t = 3π/2. Does this make sense? Check it. x(π/2) = 0, y(π/2) = r. The slope of the circle is zero there and at (0, r). It works. http://www.math.csi.cuny.edu/matlab proj 11 page 5

Exercise 7: Consider Talbot s curve : x(t) = (sin 2 (t) + 1) cos(t) y(t) = (sin 2 (t) 1) sin(t) for 0 t < 2π. a. Analytically, find all the points where the slope of the tangent to the curve is equal to 0. b. Graph the curve. On the curve, mark the point(s) where the slope of the tangent line is zero. Where are the points where the slope of the tangent line tends to or is not defined. How many such points are there? Mark these points with red * s on the graph. If any of this is of any interest, go check out the Web Repository of groovy curves located at: http://www-groups.dcs.st-and.ac.uk/ history/curves Also, if you ever played with SPRIROGRAPH, you may be curious about cycloids, regular cycliods, epicycloids and hypocycloids. There is some simple Matlab code for investigating these creatures available at: www.math.csi.cuny.edu/ poje/cycloids Download the two Matlab functions epicycloid.m and hypocycloid.m to the folder where Matlab saves your m-files. To run the demos, type >> epicycloid(a,b,rev) % put in values for a b and rev! or >> hypocycloid(a,b,rev) % put in values for a b and rev! where a is the radius of the wheel, b is the radius of the point of interest, rev is the number of revolutions you would like to see displayed. http://www.math.csi.cuny.edu/matlab proj 11 page 6