This preview shows pages 1–2. Sign up to view the full content.
This preview has intentionally blurred sections. Sign up to view the full version.
View Full Document
Unformatted text preview: Growth Authors: Bill Davis, Horacio Porta and Jerry Uhl 19962007 Publisher: Math Everywhere, Inc. Version 6.0 1.08 More Differential Equations BASICS B.1) Euler's faker and Mathematica's faker There is only one new tool in this lesson, but quite a tool it is. Programmed into Mathematica is an instruction called NDSolve that will accomplish for you everything that Euler's method did for faking the plot of a solution of a differential equation. And there's an added plus: You don't have to screw around with setting the number of iterations. Here's the NDSolve instruction working to get an excellent fake plot for 0 x 6 of the differential equation y' @ x D = 3.2 Sin @ y @ x DD 0.3 x 2 with y @ D = 0.2: a = 0; b = 4; starter = 0.2; Clear @ solution, x, y, fakey D ; solution = NDSolve A9 y' @ x D == 3.2 Sin @ y @ x DD 0.3 x 2 , y @ D == starter = , y @ x D , 8 x, a, b <E ; fakey @ x _ D = y @ x D . solution @@ 1 DD ; masterfakeplot = Plot @ fakey @ x D , 8 x, a, b < , PlotStyle> 88 Blue, Thickness @ 0.01 D<< , AxesLabel> 8 "x" , "y @ x D " < , AxesOrigin> 8 a, starter < , PlotRange> All, PlotLabel> "Master forgery" D 1 2 3 4 x 0.5 1.0 1.5 2.0 2.5 y @ x D Master forgery The NDSolve instruction is just waiting for you to use it. B.1.a) Discuss the mathematical principles behind the NDSolve instruction. Answer: The mathematical principles behind the NDSolve instruction are the same as the mathematical principles behind Euler's method. Except in the case of the NDSolve instruction, extra features typical of professionally written software are included. You'll hear more about these extra features later in Calculus& Mathematica . B.1.b) Look at this: a = 0; b = 4; starter = 0.2; Clear @ solution, x, y, fakey D ; solution = NDSolve A9 y' @ x D == 3.2 Sin @ y @ x DD 0.3 x 2 , y @ D == starter = , y @ x D , 8 x, a, b <E ; fakey @ x _ D = y @ x D . solution @@ 1 DD InterpolatingFunction @88 0., 4. << , <> D@ x D What does the output mean? Answer: This output reflects the fact that NDSolve first produces a bunch of points and then strings them together with an interpolating function  just as Euler's method does. The formula for this interpolating function is not available, but you can plot it: masterfakeplot = Plot @ fakey @ x D , 8 x, a, b < , PlotStyle> 88 Blue, Thickness @ 0.01 D<< , AxesLabel> 8 "x" , "y @ x D " < , AxesOrigin> 8 a, starter < , PlotRange> All, PlotLabel> "Master forgery" D 1 2 3 4 x 0.5 1.0 1.5 2.0 2.5 y @ x D Master forgery B.1.c) But isn't the actual formula always better than a fake? Answer: It all depends on what you want to do. If what you want is a plot of the solution, then the fake should be as good as the actual formula....
View
Full
Document
 Spring '08
 Staff
 The American

Click to edit the document details