5 Pages

polarGraphs

Course: M 162, Spring 2007
School: Calvin
Rating:
 
 
 
 
 

Word Count: 1185

Document Preview

162 MATH Calculus II Computer Laboratory Topic: Intro to Mathematica, Part II, & Intersections of Polar Functions Goals of the lab: To re-familiarize students with some basic operations in Mathematica, such as how to define a function, and the basic structure to plotting commands. To understand polar coordinates better and how polar functions work. 1 1.1 Review and Extensions A Summary of Previous...

Register Now

Unformatted Document Excerpt

Coursehero >> Michigan >> Calvin >> M 162

Course Hero has millions of student submitted documents similar to the one
below including study guides, practice problems, reference materials, practice exams, textbook help and tutor support.

Course Hero has millions of student submitted documents similar to the one below including study guides, practice problems, reference materials, practice exams, textbook help and tutor support.
162 MATH Calculus II Computer Laboratory Topic: Intro to Mathematica, Part II, & Intersections of Polar Functions Goals of the lab: To re-familiarize students with some basic operations in Mathematica, such as how to define a function, and the basic structure to plotting commands. To understand polar coordinates better and how polar functions work. 1 1.1 Review and Extensions A Summary of Previous Experience During our last lab, we learned the basic structure of commands in Mathematica. The built-in commands are always capitalized, and their arguments go inside square brackets [ ]. used a few of these basic commands, including several that produce plots: in the plane: Plot, ContourPlot, ParametricPlot in 3D-space: Plot3D, ParametricPlot3D The basic inputs to these commands included the thing (function or vector function) to be plotted as well as a range, enclosed in curly brackets { }, of values for the input variable(s). Two examples are Plot[Sin[x], {x, 0, 2*Pi}] ParametricPlot3D[{Sin[t], Cos[t], t/5}, {t, 0, 20}] Start Mathematica and try out each of the above commands. Notice that the purpose of Plot is to graph functions of one variable (here sin x), while ParametricPlot3D is used, in this example, to plot the vector function r(t) = (sin t)i + (cos t)j + (t/5)k. Mathematica Lab, MATH 162 Polar Graphs Recall, also, that these represent minimal inputs to the two commands. Switches, like ones affecting how axes are labeled, the "viewing window", etc., may be added. several that carry out calculations and/or algebraic operations. These include: Together (used to combine fractions) and D (used to find derivatives or partial derivatives). How to define a function of your own. The syntax involves naming the function, indicating (in square brackets) what its inputs will be (each followed by an underscore character), using "colon equals" (`:=') instead of "equals", and then giving how the function should behave. For a function of two variables like f (x, y) = sin(xy - y 2 ), this is accomplished by f[x_, y_] := Sin[x*y - y^2] 1.2 Plotting More than One Thing Often we wish to look at several graphs together. Let's say we wish to have the sine and cosine functions appear together. A graphing calculator can do it, so it would be a severe deficiency not to be able to do it in Mathematica. The key is to place the things you want plotted, separated by commas, into curly brackets. Try out the following modifications to the two plotting commands you entered earlier. Plot[{Sin[x], Cos[x]}, {x, 0, 2*Pi}] ParametricPlot3D[{ {Sin[t], Cos[t], t/5}, {1-t/10, Cos[t], t/5} }, {t, 0, 20}] Of course, when plotting two vector functions in Mathematica with ParametricPlot3D, the syntax for each vector function itself requires a pair of curly brackets, which explains why the second command above has as many such brackets as it has. 2 Mathematica Lab, MATH 162 Polar Graphs 2 2.1 Several New Commands PolarPlot Two commands we will use to accomplish further tasks in this lab are PolarPlot and Solve. PolarPlot is not among the core list of commands available to Mathematica at startup, and must be imported via the command (execute it yourself) <<Graphics`Graphics` From this point on, we will be able to use the command as if it had been available from the start. This command does not do a whole lot more than what your graphing calculator can do. In particular, you can plot polar functions like r = 5 - 3 cos(2) in your graphing calculator by placing your calculator in polar mode, or in Mathematica with the command PolarPlot[5 3*Cos[2*t], - {t, 0, Pi}] Of course, there are options which may be tacked onto the base command above. For a list of the options PolarPlot will accept, type Options[PolarPlot] In particular, this modification of the above command PolarPlot[5 - 3*Cos[2*t], {t, 0, Pi}, AspectRatio -> 1] skews the tick-marks on the axes so that the figure has an exaggerated width in comparison to its height. Exercise 1: The figure at right was produced in Mathematica. Write a single Mathematica command that reproduces it. (Hint: we converted the equation for a similar circle to polar form yesterday.) 3 Mathematica Lab, MATH 162 Polar Graphs 2.2 Solve and NSolve By itself, PolarPlot does not offer much that most graphing calculators cannot do. Perhaps, at least for some calculators, the same may be said of the Solve command. Its basic syntax is Solve[equation, variableName], where the equation should be written with a double-equals "==" instead of a single one. Building on this, the commands Solve[x^2 - 5*x + 3 == 0, x] Solve[x^3 - 5*x^2 + x == 1, x] Solve[x^4 - 5*x^2 + x == 1, x] Solve[x^5 - 5*x^2 + x == 1, x] Solve[{3*x - 5*y == 1, 2*x + y == Solve[Sin[x] == 1/2, x] 11}, {x, y}] all attempt to solve equations. Enter them one by one to see the results. (Note that the 2nd-to-last one puts several equations in curly brackets, as well as several variables to solve for. What kinds of problems have we done recently in which that kind of functionality would be useful?) Which would you say result in no answer at all? Which would you say give "usable" answers? Now, put a capital `N' in front of each of the commands, as in NSolve[x^2 NSolve[x^3 NSolve[x^4 NSolve[x^5 5*x + 5*x^2 5*x^2 5*x^2 3 + + + == 0, x] x == 1, x] x == 1, x] x == 1, x] etc. The upshot is that Solve is uncompromising about seeking only exact answers, whereas NSolve, whose inputs are identical, looks for decimal approximations (approximations even to the non-real answers). 3 Intersections of Polar Functions A familiar idea is that, when we want to know where two functions of x intersect, we may determine this by setting them equal and solving. For 4 Mathema...

Find millions of documents on Course Hero - Study Guides, Lecture Notes, Reference Materials, Practice Exams and more. Course Hero has millions of course specific materials providing students with the best way to expand their education.

Below is a small sample set of documents:

Calvin - M - 162
MATH 162: Calculus II, Sections B/CInformation for Exam 3 to take place on Apr. 5, 2007General Information. The exam focuses on material covered in frameworks for the dates Feb. 27 Mar. 30. Problems during this time have been assigned from section
Calvin - M - 162
MATH 162: Calculus II, Sections B/CInformation for Exam 2 to take place on Mar. 7, 2007General Information. 1. The exam focuses on material from the frameworks for the dates Feb. 13Mar. 1, 2007. This roughly corresponds to material found in Section
Calvin - M - 162
MATH 162: Calculus IIFramework for Tues., Feb. 27 Functions of Multiple VariablesDenition: A function (or function of n variables) f is a rule that assigns to each ordered n-tuple of real numbers (x1 , x2 , . . . , xn ) in a certain set D a real nu
Calvin - M - 162
Mathematics 162: Final Exam InformationTime and Location: 9:00 am-noon pm on Thursday, December 16, NH 251 Exam Syllabus: The final exam will cover the following sections: Chapter 7: Sections 1-4, 6, 7 Chapter 8: Material from `substitute chapter',
Calvin - M - 231
1Gaussian Elimination: A New Spin on the Solution of n Linear Equations in n UnknownsBy now systems of two equations in two variables are quite familiar to us. We have studied them in practically every mathematics course prior to the Calculus. We
Calvin - M - 243
MATH 143 Inference practice problems 1. An automobile manufacturer wants to know what percentage of its customers are dissatisfiedwith the performance of their newly-purchased vehicle. (a) Name the procedure we have learned best suited for determini
Calvin - M - 231
MATH 231A Runge-Kutta Notes: for a 2-equation, 1st-order systemFor our (general) problem from class dx/dt = f (t, x, y), dy/dt = g(t, x, y), x(t0 ) = x0 y(t0 ) = y0we get our approximate solution (xn , yn ) at time tn , n = 1, 2, . . . via the ite
Calvin - M - 232
Current Errata1 p. 118: About a third of the way up from the bottom there is a line containing &quot;A1 , A2 , dots, An &quot;. It should read &quot;A1 , A2 , . . . , An &quot;. [D. Moelker] p. 119: In about the middle of the page there appears the matrix B1 B2
Calvin - M - 231
MATH 231, Worksheet Finding inverse Laplace transforms Solutions1. Using partial fraction expansion, we have 1 s2 (s2 + 4) = A B Cs + D + 2+ 2 . s s s +4Multiplying through by the lowest commond denominator s 2 (s2 + 4), we get 1 = As(s2 + 4) + B(
Calvin - M - 232
Linear Algebra FormulasAngle between vectors u, v satisfies: Normal equations for Ax = b: cos =u,v |u|v|(AT A)x = AT bStatistics FormulasMeans and Variances Mean 1 xi x= niSample (of size n) Random variable X discrete X GeneralVariance
Calvin - M - 256
1Eigenvalues and EigenvectorsThe product Ax of a matrix A Mnn (R) and an n-vector x is itself an n-vector. Of particular interest in many settings (of which differential equations is one) is the following question: For a given matrix A, what are
Calvin - M - 333
MATH 333: Partial Differential EquationsProblem Set 1, Final version Due Date: Wed., Sept. 13, 2006Note: Certain of these &quot;problems&quot; do not require write-ups. 1. Look over the course webpage. In particular, read through the course syllabus, get acc
Calvin - M - 333
MATH 333: Partial Differential EquationsProject 7, Due Date: Mon., Oct. 30, 2006Let m be the mass of the electron in orbit around the proton of a hydrogen atom, e its charge, and h Planck's constant divided by 2. If (0, 0, 0) represents the positio
Calvin - M - 333
MATH 333: Partial Dierential EquationsProblem Set 9, Final version Due Date: Wed., Nov. 8, 20061. If we combine our assertion (made without proof) in class that the collection S = {1, cos(x), sin(x), cos(2x), sin(2x), . . .} is a complete orthogon
Calvin - M - 333
MATH 333: Partial Differential EquationsProject 9, Due Date: Mon., Nov. 13, 2006Because we have placed greater emphasis than in past semesters upon the numerical solution of PDEs, we have correspondingly placed less emphasis upon the eigenfunctions
Calvin - M - 333
MATH 333: Partial Dierential EquationsProblem Set 11, Final version Due Date: Wed., Nov. 22, 20061. We have, up until now, been dealing almost exclusively with what are called real-valued functions, functions whose outputs are real numbers (usuall
Calvin - M - 333
MATH 333: Partial Dierential EquationsProject 10, Due Date: Mon., Nov. 17, 2006(a) Under the usual inner product of L2 (a, b), the family S = {xn | n = 0, 1, 2, . . .} of monomials is not mutually orthogonal. Show that this is so in the particular
Calvin - M - 333
MATH 333: Partial Dierential EquationsProject 3, Due Date: Fri., Sept. 29, 2006Solve the following problem using Laplace transforms. utt = c2 uxx g, u(0, t) = 0, u(x, 0) = 0, ut (x, 0) = 0, x &gt; 0, t &gt; 0, t &gt; 0, x &gt; 0, x &gt; 0.According to my sourc
Calvin - M - 333
MATH 333: Partial Differential EquationsProject 1, Due Date: Fri., Oct. 20, 2006In this project you will study in greater depth some of the phenomena which can arise in first-order PDEs. In particular, you will study quasilinear PDEs (i.e., the coe
Calvin - M - 333
MATH 333: Partial Dierential EquationsProblem Set 12, Final version Due Date: Wed., Nov. 29, 20061. Do Exercise 4.22. For part (a), the explicit nite dierence scheme is the one from Exercise 4.20, part (c). 2. Do Exercise 6.2. 3. Compare and contr
Calvin - M - 333
MATH 333: Partial Differential EquationsProblem Set 13, Final version Due Date: Wed., Dec. 6, 20061. Chapter 7 of our book is devoted to the Dirichlet problem for Poisson's equation in two spatial dimensions -u = f, in R2 , u = g, in . Section 7.
Calvin - M - 333
MATH 333: Partial Differential EquationsProblem Set 2, Final version Due Date: Wed., Sept. 20, 20061. Do as much of Exercise 1.5 as you have time for, but hand in parts (b) and (c). 2. Do Exercise 1.6. 3. Consider the Cauchy problem for the wave eq
Calvin - M - 333
Table of Laplace Transforms function f (t) tn eat sin at cos at sinh at cosh at u(t)eat H(t - a)u(t - a) 1 - erf a/ 4t e-a /(4t) t ae-a /(4t) 4t3 u(n) (t) (u v)(t) tu(t) u(t)/ts2 2transform F (s) n!/sn+1 1/(s - a) a 2 + s2 a s 2 + s2 a a 2 -
Calvin - M - 333
MATH 333: Partial Dierential EquationsProblem Set 3, Final version Due Date: Wed., Sept. 27, 20061. Do Exercise 1.10. Here are some suggestions. A similar heat problem, one with = 1, is stated in equations (1.48), (1.49) of your text, and its solut
Calvin - M - 333
MATH 333: Partial Differential EquationsProblem Set 10, Final version Due Date: Wed., Nov. 15, 20061. Note: This is a scaled-back version of parts (a)(c) from Project 10. I feel secure including this problem here since no one has expressed an inte
Calvin - M - 333
MATH 333: Partial Dierential EquationsProject 5, Due Date: Fri., Oct. 13, 2006Consider the ordinary dierential equation d2 y xy = 0, dx2 &lt; x &lt; .Use Fourier transforms to show solutions of this ODE are scalar multiples of the Airy function Ai(x)
Calvin - M - 333
MATH 333: Partial Differential EquationsProblem Set 6, Final version Due Date: Wed., Oct. 18, 20061. Consider the derivative operator A = d4 /dx4 acting on some subset of functions in L2 (0, 1) which satisfy (0) = (0) = 0 = (1) = (1). This oper
Calvin - M - 333
MATH 333: Partial Dierential EquationsProject 4, Due Date: Fri., Oct. 13, 2006Find a resource that denes the two-dimensional Fourier transform (in an analogous way to how the 1-dimensional Fourier transform is dened in our text). There are certain
Calvin - M - 333
MATH 333: Partial Dierential EquationsProject 2, Due Date: Fri., Sept. 29, 2006Consider the vibrations of an innitely long thin string (one extending from position x = 0 up to x = +). The PDE model for this problem is utt = c2 uxx , u(0, t) = 0, u(
Calvin - M - 333
MATH 333: Partial Differential EquationsProblem Set 5, Final version Due Date: Wed., Oct. 11, 20061. Let , denote the usual inner product on Rn . Prove the following statement: An n-by-n matrix A is symmetric if and only if Ax, y = x, Ay for all
Calvin - M - 333
MATH 333: Partial Differential EquationsProblem Set 4, Final version Due Date: Wed., Oct. 4, 20061. Do Exercise 12.2(a). 2. Do Exercise 12.7. 3. Solve the boundary value problem uxx + uyy = 0, u(x, 0) = 1, where &gt; 0 is a constant. x R, y &gt; 0 u(x,