+ All Categories
Home > Documents > Understanding Des Using Mathematica

Understanding Des Using Mathematica

Date post: 04-Jun-2018
Category:
Upload: flausen
View: 222 times
Download: 0 times
Share this document with a friend

of 20

Transcript
  • 8/13/2019 Understanding Des Using Mathematica

    1/20

    Understanding Differential Equations Using Mathematica

    and Interactive DemonstrationsParitosh Mokhasi, James Adduci and Devendra KapadiaWolfram Research, Inc., Champaign, IL.

    Keywords:Mathematica, Wolram Demonstrations Project

    Manuscript received on May , ; published on November , .

    Abstract: Te solution o differential equations using the sofware packageMathematicais discussed in this paper. We ocus on two unctions, DSolve andNDSolve, and give various examples o how one can obtain symbolic or numer-ical results using these unctions. An overview o the Wolram DemonstrationsProject is given, along with various novel user-contributed examples in the fieldo differential equations. Te use o these Demonstrations in a classroom settingis elaborated upon to emphasize their significance or education.

    1 Introduction

    Mathematicais a powerul sofware package used or all kinds o symbolic and numericalcomputations. It has been available or around 25years.Mathematicais sometimes viewedas a very sophisticated calculator useul or solving a variety o different problems, includingdifferential equations. However, the use o the term calculator is a misnomer in the caseoMathematica. As shown in Figure,Mathematicahas its own programming languageand has sophisticated graphics and visualization capability which, combined with the use o

    dynamic interactivity, makes it a valuable tool or many proessionals. One can access a largenumber o data sources rom withinMathematicathrough Wolram servers, ranging romreal-time financial data to country data. Te Mathematicaront end allows one to generateproessional-quality reports.

    Mathematicais a registered trademark o Wolram Research, which holds the copyright to theWolframMathematicasofware system.

    CODEE Journal Article Digital Library URL: http://www.codee.org/ref/CJ12-3093

    http://www.codee.org/ref/CJ12-3093http://www.codee.org/ref/CJ12-3093
  • 8/13/2019 Understanding Des Using Mathematica

    2/20

    2 ODEs,Mathematica and Demonstrations

    Figure :Mathematicaas a single integrated system

    Te power o perorming computations inMathematicacomes rom the seamless inte-gration between symbolic and numeric computations. Due to the integrated nature o thesystem,Mathematicaunctions tend to rely on each other to analyze and produce resultsin an efficient manner. Te current version oMathematica, Version8.0.4, has over3000different unctions. Figure gives an understanding o the evolution o the number ounctions inMathematicasince its inception back in the late s.

    Figure : Graph o number oMathematicaunctions as a unction o time

    Among the3000+ unctions inMathematica, there are two majorsuperfunctionsthatare used to solve differential equations: DSolve and NDSolve. Te term superunctionsis used here because these two unctions handle a large class o differential equations in a

    very unified way. Te unctions preprocess the differential equations, automatically decide

    Digital Library URL: http://www.codee.org/ref/CJ12-3093 CODEE Journal Article

    http://www.codee.org/ref/CJ12-3093http://www.codee.org/ref/CJ12-3093
  • 8/13/2019 Understanding Des Using Mathematica

    3/20

    Mokhasi, Adduci and Kapadia 3

    what algorithms would be best suited or solving the system, and solve it without any urtheruser interaction. TeMathematicaunction DSolve findssymbolicsolutions to differentialequations. Tis allows the user to obtain a closed-orm solution when possible. In theabsence o sufficient constraints, DSolve returns a amily o solutions. Te unction NDSolve,on the other hand, findsnumericsolutions to differential equations. Details o how DSolve

    and NDSolve work will be discussed in more detail in Section.Te Wolram Demonstrations Project (http://demonstrations.wolram.com ) was con-

    ceived by Stephen Wolram as a way to bring computational exploration to the widestpossible audience. It is an open-code resource that uses dynamic computation to illuminate

    concepts in science, technology, mathematics, art, finance, and a remarkable range o otherfields. Its daily growing collection o interactive illustrations is created byMathematicausersrom around the world who participate by contributing innovative Demonstrations. Tesubmissions undergo a review process beore being accepted as part o the Demonstrationproject.

    A Demonstration is an interactive visualization o a concept. Demonstrations can be

    about any topic. As you move a Demonstrations controls, you see a change in its output thathelps you understand the concept being shown. At its core, a Demonstration is a small pro-gram created with a standard copy oMathematica. Demonstration authors fill out an author-ing template and upload it to our site. Te Wolram servers convert the filled-in template toan interactive Computable Document Format (CDF) object (http://www.wolram.com/cd).Tere are in early over7500different Demonstrations that have been submitted by theuser community at large. Te authors come rom various backgrounds, ranging rom highschool students to research scientists.

    (a) (b)

    Figure : Workflow or understanding and studying differential equations

    CODEE Journal Article Digital Library URL: http://www.codee.org/ref/CJ12-3093

    http://demonstrations.wolfram.com/http://www.wolfram.com/cdfhttp://www.codee.org/ref/CJ12-3093http://www.codee.org/ref/CJ12-3093http://www.wolfram.com/cdfhttp://demonstrations.wolfram.com/
  • 8/13/2019 Understanding Des Using Mathematica

    4/20

    4 ODEs,Mathematica and Demonstrations

    Tere are essentially two general paths to understanding and studying differential equa-tions withMathematica. Figureshows these two paths. Te first approach is more handson, using DSolve and NDSolve to solve a differential equation and then using interactive

    elements oMathematicato obtain a dynamic representation o the solution. Tis approachis intensive. Te second approach is more suited i the objective is to teach, understand,

    and learn about ODEs in a classroom setting and not spend time coding the example. Tenyou can use pre-built interactive Demonstrations rom the Wolram Demonstrations site.Tese do not require a copy oMathematica; you only need to have the Wolram CDF pluginwhich can be downloaded rom (http://www.wolram.com/cd). In what ollows, we willdescribe each approach in more detail.

    2 Symbolic and Numerical Solutions to Differential Equations

    As noted in introduction, theMathematicaunction DSolve finds symbolic solutions todifferential equations. TeMathematicaunction NDSolve, on the other hand, is a general

    numerical differential equation solver. DSolve and NDSolve are equipped with a wide varietyo techniques or solving single ODEs as well as systems o ODEs. o compare and contrastthe syntax o these two solvers, consider the differential equation

    y(t) =y(t),

    y(0) =1,(2.1)

    whose solution isy(t) =e t. We use DSolve to analytically solve this equation as ollows:

    In[1]:= sol1 = DSolve[{y[t] == y[t], y[0] == 1}, y, t][[1]]

    Out[1]= {y -> Function[{t}, e^t]}.

    It is important or the reader to note that i you type the above equation verbatim in Mathe-matica, one should not include theIn[1] =statement. Tis is automatically generated byMathematica. Te solution is returned as aMathematica replacement rule. Tis rule canthen be used with expressions involving the solution yas ollows:

    In[2]:= y[t] /. sol1

    Out[2]= e^t

    In[3]:= y[1] /. sol1

    Out[3]= e

    Te replacement rule can be applied in conjunction with otherMathematicaoperations:

    In[5]:= Sin[y[t]] /. sol1

    Out[5]= Sin[e^t]

    In[6]:= D[Sin[y[t]], t] /. sol1

    Out[6]= e^t Cos[e^t]

    In[7]:= Integrate[y[t] /.sol, {t, 0, 1}]

    Out[7]= -1 + e

    Digital Library URL: http://www.codee.org/ref/CJ12-3093 CODEE Journal Article

    http://www.wolfram.com/cdfhttp://www.codee.org/ref/CJ12-3093http://www.codee.org/ref/CJ12-3093http://www.wolfram.com/cdf
  • 8/13/2019 Understanding Des Using Mathematica

    5/20

    Mokhasi, Adduci and Kapadia 5

    While the NDSolve syntax resembles that o DSolve, it returns a numerical Interpolat-ingFunction rather than an exact symbolic solution:

    In[8]:= sol2 = NDSolve[{y[t] == y[t], y[0] == 1}, y, {t, 0, 1}][[1]]

    Out[8]= {y -> InterpolatingFunction[{{0.,1.}},]}.

    Te interpolating unction is an internal object within Mathematicathat contains the nu-merical solution data. Te unction can be used as a black-box unction which can be usedor urther mathematical operations like taking derivatives, integrating, etc. in a unifiedmanner.

    Tis time, the replacement rule can be used to evaluateyat different numerical points.Note that the value ory(1)determined by NDSolve is a decimal approximation oexp, theexact value or y(1)which was returned by DSolve:

    In[11]:= y[1] /. sol2Out[11]=2.718281861392969

    Having given a brie introduction to theMathematicasyntax, we now look at a numbero different problems that can be solved using DSolve/NDSolve.

    2.1 Forced Vibrations

    Let us begin by considering an example o orced vibrations [] with initial conditions asgiven below:

    y(t) +y(t) =et5 cos(10t),

    y(0) =0

    y(0) =0.

    (2.2)

    For this problem, DSolve returns a solution in terms o exponential and trigonometricunctions. Te solution can be expressed in a more compact orm using the Simpliy unction,as shown in Figure.

    2.2 Logistic Equation

    Next, we consider the logistic equation that occurs in population dynamics:

    y(x) =y(x)(1 by(x)),

    y(0) =a(2.3)

    We can solve this equation and plot the solution or different values o the parameters asollows. TeMathematicaprogram and result are given in Figure.

    CODEE Journal Article Digital Library URL: http://www.codee.org/ref/CJ12-3093

    http://www.codee.org/ref/CJ12-3093http://www.codee.org/ref/CJ12-3093
  • 8/13/2019 Understanding Des Using Mathematica

    6/20

    6 ODEs,Mathematica and Demonstrations

    Figure : Solution to the orced vibration problem.

    Figure : Solution o the logistic equation

    Digital Library URL: http://www.codee.org/ref/CJ12-3093 CODEE Journal Article

    http://www.codee.org/ref/CJ12-3093http://www.codee.org/ref/CJ12-3093
  • 8/13/2019 Understanding Des Using Mathematica

    7/20

    Mokhasi, Adduci and Kapadia 7

    2.3 Cornu Spiral Problem

    As a final example or DSolve, we consider the ollowing equations, which define a Cornuspiral:

    x(s) =cos(t(s)) y(s) =sin(t(s)) t(s) =s

    x(0) =0 y(0) =0 t(0) =0.

    (2.4)

    Tis is a plane curve through the origin whose curvature is equal to the parameter value s atevery point. Te solution o the ODEs contains Fresnel unctions. Te Fresnel unctions [, ]are defined as

    FresnelC(z) = z

    0

    cost2

    2dt,

    FresnelS(z) = z

    0

    sint2

    2dt

    (2.5)

    and are widely used in the field o optics []. A graph o the curve in Figureclearly showsthat the curvature becomes large assapproaches infinity in the positive or negative direction.

    Figure : Solution o the Cornu spiral problem

    A brie overview o the unctionality or solving ODEs using DSolve is given in [ ]. Tetutorial [] gives urther details or finding symbolic solutions o differential equations andincludes a user guide with helpul tips or working with DSolve.

    CODEE Journal Article Digital Library URL: http://www.codee.org/ref/CJ12-3093

    http://www.codee.org/ref/CJ12-3093http://www.codee.org/ref/CJ12-3093
  • 8/13/2019 Understanding Des Using Mathematica

    8/20

    8 ODEs,Mathematica and Demonstrations

    We will now present two examples o ODEs or which symbolic solutions are not available.Tese problems can be handled by NDSolve, which also has a wide variety o options orprecision and step control, choice o solution method, etc.

    2.4 Lorenz Attractor

    First, we consider the Lorenz attractor rom chaotic dynamics [], which can be obtainedby solving the associated system o nonlinear ODEs using NDSolve. Te equations are

    x(t) = 3(x(t) y(t))

    y(t) = x(t)z(t) + 26.5x(t) y(t)

    z(t) =x(t)y(t) z(t)

    x(0) =z(0) =0

    y(0) =

    1.

    (2.6)

    Figureshows the program and a phase-space portrait o the solution. One can clearly seethe classical butterfly pattern describing the chaotic nature o the solution.

    Figure : Phase-space portrait o the D Lorenz model

    Digital Library URL: http://www.codee.org/ref/CJ12-3093 CODEE Journal Article

    http://www.codee.org/ref/CJ12-3093http://www.codee.org/ref/CJ12-3093
  • 8/13/2019 Understanding Des Using Mathematica

    9/20

    Mokhasi, Adduci and Kapadia 9

    2.5 More Complicated Spiral

    As a second example, we consider the differential equations or a spiral with curvatureunctiont(s) =s sin(s). the curvature unction measures the rate o turning or the tangent

    vector along the spiral curve.

    x(s) =cos(t(s))

    y(s) =sin(t(s))

    t(s) =s sin(t(s))

    x(0) =y(0) =t(0) =0

    (2.7)

    In this case, as opposed to the Cornu spiral, there is no closed orm available, but the problemcan be solved efficiently using NDSolve and is visualized in Figure.

    Figure : Parametric plot or a spiral with curvature unction s sin(s)

    Te tutorial [] gives urther details on numerical differential equation solving usingNDSolve, including the method plugin ramework or users who wish to extend the built-inalgorithms.

    All o the examples given in this section involve numerical parameters (e.g. the logisticequation) or unctional parameters (e.g. the spirals o curvature). Clearly, it would be

    CODEE Journal Article Digital Library URL: http://www.codee.org/ref/CJ12-3093

    http://www.codee.org/ref/CJ12-3093http://www.codee.org/ref/CJ12-3093
  • 8/13/2019 Understanding Des Using Mathematica

    10/20

    10 ODEs,Mathematica and Demonstrations

    very useul to have a unction that allows us to visualize the solutions o ODEs obtainedby varying the parameters that occur in them. Tis can be accomplished by using theManipulate unction [], which is a part o the system or incorporating dynamic objectsinMathematica. Te interested reader can also visit the website [] or some interestingexamples o using the Manipulate unction.

    While differential equations can be solved easily and efficiently with DSolve and ND-Solve, the use o dynamic interactivity to explore standard themes in undergraduate-leveldifferential equations and dynamical systems courses is a major ocus o the WolramDemonstrations Project website []. Te Wolram Demonstrations Project includes a broadcollection o examples involving linear and nonlinear ODEs that have been contributed byan international community o educators and experts in technical fields. Te next sectiondiscusses these Demonstrations in detail, in order to make it easy or ODE educators whowish to use the examples in a classroom setting.

    3 ODE Demonstrations

    Te Wolram Demonstrations site contains a vast collection o Demonstrations related todifferential equations. New Demonstrations are being added all the time. Te site can benavigated either by topic or through a convenient search eature. Te technical sophisticationo the Demonstrations varies rom introductory concepts to research topics. A search orthe term oscillation, or example, currently yields Demonstrations. Tese range rom

    visualizations o simple spring mass systems to more advanced nonlinear systems and evenPDEs rom mathematical physics. Some snapshots o the popular Demonstrations can beseen in Figure. All Demonstrations are highly interactive, so that even those dealingwith advanced mathematical concepts could be amusing or beginning students. Most

    Demonstrations provide sliders and buttons that allow the user to visualize the solutions orother properties o the system while varying parameters.Probably the easiest way or educators to incorporate the Demonstrations site into their

    curriculum is to recommend that students explore it independently. o an educator who hasstruggled to encourage students to keep up with the required textbook reading, this mayseem a bit like wishul thinking. However, the Wolram Demonstration site is not a textbookand does not replace a textbook. Te Demonstrations on the site are interesting and visuallyascinating in their own right. As we will show in the examples below, the site acilitatesan interactive approach to mathematics. Also, a student visiting the site or a differentialequations class may be delighted to find ascinating Demonstrations o optical illusions [],trebuchets [], and tsunamis [], as seen in Figure, in addition to differential equation

    Demonstrations.Encouraging students to visit the Demonstrations site could be accomplished by aug-

    menting homework sets with links to relevant Demonstrations. Te ollowing is a typicalexercise or a first year calculus student []:

    Te population o the world was about billion in . Using the exponentialmodel or population growth (...) with the recently observed rate o increase opopulation o2%per year in , find an expression or the population o theworld in the yeart.

    Digital Library URL: http://www.codee.org/ref/CJ12-3093 CODEE Journal Article

    http://www.codee.org/ref/CJ12-3093http://www.codee.org/ref/CJ12-3093
  • 8/13/2019 Understanding Des Using Mathematica

    11/20

    Mokhasi, Adduci and Kapadia 11

    (a) (b)

    (c) (d)

    Figure : Some Demonstrations returned by a search or the term oscillation: (a)orcedoscillations [], (b) harmonic oscillator [], (c) Duffing oscillator [], (d) oscillator withtwo masses []

    (a) (b) (c)

    Figure : Some amusing Demonstrations: (a) optical illusions [], (b) trebuchets [], (c)tsunamis []

    CODEE Journal Article Digital Library URL: http://www.codee.org/ref/CJ12-3093

    http://www.codee.org/ref/CJ12-3093http://www.codee.org/ref/CJ12-3093
  • 8/13/2019 Understanding Des Using Mathematica

    12/20

    12 ODEs,Mathematica and Demonstrations

    Figure : Demonstration o exponential growth []. Moving the sliders orrorNshowshow the curve reacts.

    A search or the term population growth presently returns 36results. Te first result(Continuous Exponential Growth) is o direct relevance to this problem (see Figure). Itis important to note that while the Demonstration does not solve the exercise or the student,it does provide a means by which the student can check his/her intuition. Other results(State Population Growth [], Predator-Prey Equations [], and Lily Pond []), whilenot directly related to the exercise, are tangentially related. It has been our experience thattypical textbook applications o calculus and differential equations problems have very goodcoverage on the Demonstrations site. Tis enables students to augment their homework setswith interactive visualizations o the problems they are solving or have solved.

    Another typical class o problems or introductory differential equations deals with the

    flow o water between (or out o) tanks. Searches or tank, orricellis law, two tankproblem, etc. all yield a rich collection o visualizations related to this class o problem. Anumber o these Demonstrations even directly reerence problems in standard differentialequations textbooks. A small sample o these Demonstrations appears in Figure.Tus,it is ofen possible or students with no programming background to quickly and easilyfind engaging visualizations related to assigned exercises. Tis could go a long way towardaddressing the common concern among mathematics educators that students do not takethe necessary time to digest a problem once they have ound the solution.

    Te Demonstrations Project is also an effective tool or in-class activities. Even educatorswithout computing experience can use the site to incorporate graphical Demonstrations

    into their lessons. Suppose, or example, an instructor has derived the equations o motiono a pendulum:

    (t) +g

    l sin((t)) =0

    ypically, the instructor would next explain to the students how the values o the parameterso the system affect the dynamics. A quick search or pendulum on the Demonstrationssite yields Demonstrations at this time. Several o these are immediately relevant to thislesson. For example, Animated Pendulum [] shows the relationship between length,maximum angle, mass, and gravity in an animated pendulum/bar chart (see Figure).

    Digital Library URL: http://www.codee.org/ref/CJ12-3093 CODEE Journal Article

    http://www.codee.org/ref/CJ12-3093http://www.codee.org/ref/CJ12-3093
  • 8/13/2019 Understanding Des Using Mathematica

    13/20

    Mokhasi, Adduci and Kapadia 13

    (a) (b)

    (c) (d)

    Figure : Some Demonstrations related to flow in a tank: (a) flow o fluid through a hole [],

    (b) mixing in two tanks [], (c) mixing salt in water [], (d) orricellis law []

    CODEE Journal Article Digital Library URL: http://www.codee.org/ref/CJ12-3093

    http://www.codee.org/ref/CJ12-3093http://www.codee.org/ref/CJ12-3093
  • 8/13/2019 Understanding Des Using Mathematica

    14/20

    14 ODEs,Mathematica and Demonstrations

    Figure : Animated pendulum with graphs []

    Tis could be ollowed by a series o related Demonstrations. For example, Pendulumwith Varying Length or How to Improve Your Next Swing Ride [] is a Demonstrationthat simulates a person sitting on a swing bouncing vertically to try to swing higher (seeFigure). Te problem parameters (amplitude and requency o the bouncing) can be

    varied to determine the optimal experience (i.e. swing as high as possible).

    Figure : Pendulum with varying length []

    For educators who wish to delve a little deeper into the world o Wolram DemonstrationsandMathematicaas a whole, it is also possible to customize existing Demonstrations or

    Digital Library URL: http://www.codee.org/ref/CJ12-3093 CODEE Journal Article

    http://www.codee.org/ref/CJ12-3093http://www.codee.org/ref/CJ12-3093
  • 8/13/2019 Understanding Des Using Mathematica

    15/20

    Mokhasi, Adduci and Kapadia 15

    to write and contribute completely new ones. All Demonstrations on the site include theMathematicaprogram that generated them. Tese programs are typically relatively shortand have been checked or quality and content beore being put on the site. Considerthe "Equationrekker" Demonstration [], which visualizes the solutions o a differentialequation, beginning at various user-determined starting points (see Figure).

    Figure : Te Equationrekker Demonstration []

    Tis Demonstration only works or ten predefined differential equations. Suppose aneducator wishes to visualize the solutions to an ODE not on the list, or example, x(t) =y(t),y(t) = x(t). Tis is easily accomplished by downloading the source code. In thisnotebook the equation list appears as:

    equationList = {

    {y[t] == -Sin[x[t]], x[t] == y[t]},

    {y[t] == -Cos[x[t]], x[t] == y[t]},

    {y[t] == -Tan[x[t]], x[t] == y[t]},

    {y[t] == y[t] - x[t], x[t] == y[t]},

    {y[t] == Sin[y[t]] - x[t], x[t] == y[t]},

    {y[t] == Cos[y[t]] - x[t], x[t] == y[t]},

    {y[t] == 4 x[t] + y[t], x[t] == x[t] + y[t]},

    {y[t] == Sqrt[2] x[t] - 2 y[t], x[t] == -3 x[t] + Sqrt[2] y[t]},

    {y[t] == -2 x[t] - y[t], x[t] == -x[t] + 2 y[t]},

    {y[t] == x[t] + 3 y[t], x[t] == x[t] - y[t]}};

    It is then simply a matter o adding the new equation:

    CODEE Journal Article Digital Library URL: http://www.codee.org/ref/CJ12-3093

    http://www.codee.org/ref/CJ12-3093http://www.codee.org/ref/CJ12-3093
  • 8/13/2019 Understanding Des Using Mathematica

    16/20

    16 ODEs,Mathematica and Demonstrations

    Figure : Solution in Equationrekker using modified equations

    {y[t]==x[t], x[t]==-y[t]}

    to the list and running the notebook (see Figure ).

    One can ofen build on the ideas obtained rom the demonstrations to develop andwrite custom code or use in the classroom. As an example, we can improve on the idea oEquationrekker and develop a unction that plots the vector fields associated with the di-

    erential equations while interactively moving the initial point/condition. TeMathematicacode is given below:

    EquationVisualizer[eqns_, vars_, {t_, tmin_, tmax_}] :=

    Module[{splot, vt, vo, neweqns},

    {vt, vo} = Map[Through[vars[#]] &, {t, tmin}];

    neweqns = First[Solve[eqns, D[vt, t]]] /. Rule :> Equal ;

    splot = StreamPlot[ neweqns[[All, 2]] /. Thread[vt -> vars],

    {x, -4, 4}, {y, -3, 3}, StreamScale -> Large,

    StreamColorFunction -> "Rainbow"];

    Manipulate[

    Show[splot,

    ParametricPlot[

    Evaluate[First[vt /. NDSolve[{eqns,

    Thread[vo == point]},vars, {t, tmin, tmax}]]],

    {t, tmin, T},PlotStyle -> {Red, Thick}

    Digital Library URL: http://www.codee.org/ref/CJ12-3093 CODEE Journal Article

    http://www.codee.org/ref/CJ12-3093http://www.codee.org/ref/CJ12-3093
  • 8/13/2019 Understanding Des Using Mathematica

    17/20

    Mokhasi, Adduci and Kapadia 17

    ]

    ],

    {{T, tmax/10}, 1,tmax}, {{point, {1, 0}}, Locator},

    SaveDefinitions -> True]

    ]

    Figureshows the use o the above custom unction and the resulting output.

    Figure : Use and output or the unction EquationVisualizer. Te interactive point(indicated by circle with cross hairs) represents the initial condition. Solution is updatedwhen point is moved.

    4 Conclusion

    In this paper we have explored various ways that researchers and educators can use Mathe-maticaand the Wolram Demonstrations Project to study and solve differential equations.Particular attention was ocused on the unctions DSolve and NDSolve or solving differen-tial equations. o summarize, DSolve and NDSolve are versatile unctions with a vast arrayo powerul methods or solving a broad range o linear and nonlinear differential equations.Once a solution has been obtained, it can be plotted or used in later computations. o thisend, the examples that were presented in Sectiongive a general overview o how theseunctions are to be used and how one can analyze the results. It should be noted that the userofen does not have to make any drastic change to syntax when moving rom one problem tothe other. Te unified ramework o the unction call makes using these unctions very easy.

    CODEE Journal Article Digital Library URL: http://www.codee.org/ref/CJ12-3093

    http://www.codee.org/ref/CJ12-3093http://www.codee.org/ref/CJ12-3093
  • 8/13/2019 Understanding Des Using Mathematica

    18/20

    18 ODEs,Mathematica and Demonstrations

    It is also very convenient to have ready-made examples such as those provided by theDemonstrations Project, which typically suppress computational details in avor o appealinggraphics, dynamic interactivity, and visualization o the actual physical models (e.g. the

    vibrations o a spring) and have the potential to improve the quality o learning in a typicalundergraduate differential equations course.

    Te ocus o Sectionwas to elaborate on the various pre-built Demonstrations thatone can use rom the Wolram Demonstrations Project site. Te interactive nature o theseDemonstrations makes them a very valuable tool when trying to understand differentproperties o differential equations. We ocused on practical examples that one encountersofen. A detailed explanation o how you can take these Demonstrations and modiy themto a specific setting was discussed. Tis is very important i you want to avoid building aDemonstration rom scratch.

    A combination o both the above paradigms appears to be the most ruitul approachor usingMathematicain an educational setting.

    References

    [1] FresnelC unction page.Wolfram Research, Inc., . URL http://reference.wolfram.com/mathematica/ref/FresnelC.html .

    [2] FresnelSunction page. Wolfram Research, Inc., . URL http://reference.wolfram.com/mathematica/ref/FresnelS.html .

    [3] Introduction to Manipulate. Wolfram Research, Inc. URL, http://reference.wolfram.com/mathematica/tutorial/IntroductionToManipulate.html .

    [4] Fresnel integrals. URL http://en.wikipedia.org/wiki/Fresnel_integral.

    [5] Wolram DemonstrationsProject. URL http://demonstrations.wolfram.com.

    [6] W.E. Boyce and R.C. DiPrima. Elementary Differential Equations and Boundary ValueProblems. New York: John Wiley and Sons Inc., .

    [7] S.J. Chandler. State population growth. Te Wolfram Demonstrations Project. URLhttp://demonstrations.wolfram.com/StatePopulationGrowth/ .

    [8] Y.S. Chang, R. Knapp, and R. Germundsson. Mathematics o tsunamis. Te

    Wolfram Demonstrations Project. URL http://demonstrations.wolfram.com/MathematicsOfTsunamis/ .

    [9] G. Craven. Phase plane trajectories o the unorced Duffing oscillator. TeWolfram Demonstrations Project. URL http://demonstrations.wolfram.com/PhasePlaneTrajectoriesOfTheUnforcedDuffingOscillator/ .

    [10] J. Frederico and R. Morris. Animated pendulum. Te Wolfram Demonstrations Project.URL http://demonstrations.wolfram.com/AnimatedPendulum/.

    Digital Library URL: http://www.codee.org/ref/CJ12-3093 CODEE Journal Article

    http://reference.wolfram.com/mathematica/ref/FresnelC.htmlhttp://reference.wolfram.com/mathematica/ref/FresnelC.htmlhttp://reference.wolfram.com/mathematica/ref/FresnelC.htmlhttp://reference.wolfram.com/mathematica/ref/FresnelS.htmlhttp://reference.wolfram.com/mathematica/ref/FresnelS.htmlhttp://reference.wolfram.com/mathematica/ref/FresnelS.htmlhttp://reference.wolfram.com/mathematica/tutorial/IntroductionToManipulate.htmlhttp://reference.wolfram.com/mathematica/tutorial/IntroductionToManipulate.htmlhttp://reference.wolfram.com/mathematica/tutorial/IntroductionToManipulate.htmlhttp://en.wikipedia.org/wiki/Fresnel_integralhttp://en.wikipedia.org/wiki/Fresnel_integralhttp://demonstrations.wolfram.com/http://demonstrations.wolfram.com/StatePopulationGrowth/http://demonstrations.wolfram.com/StatePopulationGrowth/http://demonstrations.wolfram.com/MathematicsOfTsunamis/http://demonstrations.wolfram.com/MathematicsOfTsunamis/http://demonstrations.wolfram.com/PhasePlaneTrajectoriesOfTheUnforcedDuffingOscillator/http://demonstrations.wolfram.com/PhasePlaneTrajectoriesOfTheUnforcedDuffingOscillator/http://demonstrations.wolfram.com/PhasePlaneTrajectoriesOfTheUnforcedDuffingOscillator/http://demonstrations.wolfram.com/AnimatedPendulum/http://www.codee.org/ref/CJ12-3093http://www.codee.org/ref/CJ12-3093http://demonstrations.wolfram.com/AnimatedPendulum/http://demonstrations.wolfram.com/PhasePlaneTrajectoriesOfTheUnforcedDuffingOscillator/http://demonstrations.wolfram.com/PhasePlaneTrajectoriesOfTheUnforcedDuffingOscillator/http://demonstrations.wolfram.com/MathematicsOfTsunamis/http://demonstrations.wolfram.com/MathematicsOfTsunamis/http://demonstrations.wolfram.com/StatePopulationGrowth/http://demonstrations.wolfram.com/http://en.wikipedia.org/wiki/Fresnel_integralhttp://reference.wolfram.com/mathematica/tutorial/IntroductionToManipulate.htmlhttp://reference.wolfram.com/mathematica/tutorial/IntroductionToManipulate.htmlhttp://reference.wolfram.com/mathematica/ref/FresnelS.htmlhttp://reference.wolfram.com/mathematica/ref/FresnelS.htmlhttp://reference.wolfram.com/mathematica/ref/FresnelC.htmlhttp://reference.wolfram.com/mathematica/ref/FresnelC.html
  • 8/13/2019 Understanding Des Using Mathematica

    19/20

    Mokhasi, Adduci and Kapadia 19

    [11] J. Gordji and S. Gordji. Flow o fluid through a hole in a tank. Te Wol-fram Demonstrations Project. URL http://demonstrations.wolfram.com/FlowOfFluidThroughAHoleInATank/ .

    [12] . Gray. Parallel lines optical illusion. Te Wolfram Demonstrations Project. URL

    http://demonstrations.wolfram.com/ParallelLinesOpticalIllusion/ .

    [13] D.A. Kapadia. Exploring differential equations with Mathematica.Proceedings of theICCM, Boston, . URL http://archives.math.utk.edu/ICTCM/i/19/S024.html.

    [14] D.A. Kapadia. Differential equation solving with DSolve. Wolfram Re-search Inc. URL http://reference.wolfram.com/mathematica/tutorial/DSolveOverview.html.

    [15] R. Knapp and . Gray. EquationTrekker.Te Wolfram Demonstrations Project. URLhttp://demonstrations.wolfram.com/EquationTrekker/ .

    [16] E. Mahieu. Optimizing the counterweight trebuchet. Te WolframDemonstrations Project, . URL http://demonstrations.wolfram.com/OptimizingTheCounterweightTrebuchet/ .

    [17] E. Mahieu. Pendulum with varying length or how to improve your next swing ride.TeWolfram Demonstrations Project, . URL http://demonstrations.wolfram.com/PendulumWithVaryingLengthOrHowToImproveYourNextSwingRide .

    [18] M. McGuff.Mathematica material or differential equations.Austin Community College,. URL http://www.austincc.edu/mmcguff/mathematica/diffeq/.

    [19] G. Russell. Continuous exponential growth.Te Wolfram Demonstrations Project. URLhttp://demonstrations.wolfram.com/ContinuousExponentialGrowth/ .

    [20] M. Schreiber. Lily pond. Te Wolfram Demonstrations Project. URL http://demonstrations.wolfram.com/LilyPond/ .

    [21] M. Soroniou and R. Knapp. Advanced numerical differential equation solving inMathematica. Wolfram Research Inc. URL http://reference.wolfram.com/mathematica/tutorial/NDSolveOverview.html.

    [22] James Stewart. Calculus. Pacific Grove, CA: Brooks-Cole, rd edition, .

    [23] S.H. Strogatz. Nonlinear Dynamics and Chaos. Cambridge, MA: Westview, .

    [24] M. rott. Harmonic oscillator eigenunctions. Te Wolfram Demon-strations Project. URL http://demonstrations.wolfram.com/HarmonicOscillatorEigenfunctions/ .

    [25] E.W. Weisstein. Predator-prey equations.Te Wolfram Demonstrations Project. URLhttp://demonstrations.wolfram.com/PredatorPreyEquations/ .

    CODEE Journal Article Digital Library URL: http://www.codee.org/ref/CJ12-3093

    http://demonstrations.wolfram.com/FlowOfFluidThroughAHoleInATank/http://demonstrations.wolfram.com/FlowOfFluidThroughAHoleInATank/http://demonstrations.wolfram.com/FlowOfFluidThroughAHoleInATank/http://demonstrations.wolfram.com/ParallelLinesOpticalIllusion/http://demonstrations.wolfram.com/ParallelLinesOpticalIllusion/http://archives.math.utk.edu/ICTCM/i/19/S024.htmlhttp://archives.math.utk.edu/ICTCM/i/19/S024.htmlhttp://archives.math.utk.edu/ICTCM/i/19/S024.htmlhttp://reference.wolfram.com/mathematica/tutorial/DSolveOverview.htmlhttp://reference.wolfram.com/mathematica/tutorial/DSolveOverview.htmlhttp://reference.wolfram.com/mathematica/tutorial/DSolveOverview.htmlhttp://demonstrations.wolfram.com/EquationTrekker/http://demonstrations.wolfram.com/EquationTrekker/http://demonstrations.wolfram.com/OptimizingTheCounterweightTrebuchet/http://demonstrations.wolfram.com/OptimizingTheCounterweightTrebuchet/http://demonstrations.wolfram.com/PendulumWithVaryingLengthOrHowToImproveYourNextSwingRidehttp://demonstrations.wolfram.com/PendulumWithVaryingLengthOrHowToImproveYourNextSwingRidehttp://demonstrations.wolfram.com/PendulumWithVaryingLengthOrHowToImproveYourNextSwingRidehttp://www.austincc.edu/mmcguff/mathematica/diffeq/http://www.austincc.edu/mmcguff/mathematica/diffeq/http://demonstrations.wolfram.com/ContinuousExponentialGrowth/http://demonstrations.wolfram.com/LilyPond/http://demonstrations.wolfram.com/LilyPond/http://reference.wolfram.com/mathematica/tutorial/NDSolveOverview.htmlhttp://reference.wolfram.com/mathematica/tutorial/NDSolveOverview.htmlhttp://demonstrations.wolfram.com/HarmonicOscillatorEigenfunctions/http://demonstrations.wolfram.com/HarmonicOscillatorEigenfunctions/http://demonstrations.wolfram.com/HarmonicOscillatorEigenfunctions/http://demonstrations.wolfram.com/PredatorPreyEquations/http://demonstrations.wolfram.com/PredatorPreyEquations/http://www.codee.org/ref/CJ12-3093http://www.codee.org/ref/CJ12-3093http://demonstrations.wolfram.com/PredatorPreyEquations/http://demonstrations.wolfram.com/HarmonicOscillatorEigenfunctions/http://demonstrations.wolfram.com/HarmonicOscillatorEigenfunctions/http://reference.wolfram.com/mathematica/tutorial/NDSolveOverview.htmlhttp://reference.wolfram.com/mathematica/tutorial/NDSolveOverview.htmlhttp://demonstrations.wolfram.com/LilyPond/http://demonstrations.wolfram.com/LilyPond/http://demonstrations.wolfram.com/ContinuousExponentialGrowth/http://www.austincc.edu/mmcguff/mathematica/diffeq/http://demonstrations.wolfram.com/PendulumWithVaryingLengthOrHowToImproveYourNextSwingRidehttp://demonstrations.wolfram.com/PendulumWithVaryingLengthOrHowToImproveYourNextSwingRidehttp://demonstrations.wolfram.com/OptimizingTheCounterweightTrebuchet/http://demonstrations.wolfram.com/OptimizingTheCounterweightTrebuchet/http://demonstrations.wolfram.com/EquationTrekker/http://reference.wolfram.com/mathematica/tutorial/DSolveOverview.htmlhttp://reference.wolfram.com/mathematica/tutorial/DSolveOverview.htmlhttp://archives.math.utk.edu/ICTCM/i/19/S024.htmlhttp://archives.math.utk.edu/ICTCM/i/19/S024.htmlhttp://demonstrations.wolfram.com/ParallelLinesOpticalIllusion/http://demonstrations.wolfram.com/FlowOfFluidThroughAHoleInATank/http://demonstrations.wolfram.com/FlowOfFluidThroughAHoleInATank/
  • 8/13/2019 Understanding Des Using Mathematica

    20/20

    20 ODEs,Mathematica and Demonstrations

    [26] S. Wilkerson. Mixing salt in water in one tank.Te Wolfram Demonstrations Project.URL http://demonstrations.wolfram.com/MixingSaltInWaterInOneTank/.

    [27] S. Wilkerson. Mixing in two connected tanks. Te Wolfram Demonstrations Project.URL http://demonstrations.wolfram.com/MixingInTwoConnectedTanks/.

    [28] S. Wilkerson. wo masses with orcing unctions oscillating between three springs.TeWolfram Demonstrations Project. URL http://demonstrations.wolfram.com/TwoMassesWithForcingFunctionsOscillatingBetweenThreeSprings/ .

    [29] S. Wilkerson and M. Evans. orricellis law or tank draining. TeWolfram Demonstrations Project. URL http://demonstrations.wolfram.com/TorricellisLawForTankDraining/ .

    [30] S. Wilkerson and M. Evans. Forced oscillations. Te Wolfram Demonstrations Project.URL http://demonstrations.wolfram.com/ForcedOscillations/.

    Di i l Lib URL h // d / f/CJ 2 3093 CODEE J l A i l

    http://demonstrations.wolfram.com/MixingSaltInWaterInOneTank/http://demonstrations.wolfram.com/MixingSaltInWaterInOneTank/http://demonstrations.wolfram.com/MixingInTwoConnectedTanks/http://demonstrations.wolfram.com/MixingInTwoConnectedTanks/http://demonstrations.wolfram.com/TwoMassesWithForcingFunctionsOscillatingBetweenThreeSprings/http://demonstrations.wolfram.com/TwoMassesWithForcingFunctionsOscillatingBetweenThreeSprings/http://demonstrations.wolfram.com/TwoMassesWithForcingFunctionsOscillatingBetweenThreeSprings/http://demonstrations.wolfram.com/TorricellisLawForTankDraining/http://demonstrations.wolfram.com/TorricellisLawForTankDraining/http://demonstrations.wolfram.com/ForcedOscillations/http://www.codee.org/ref/CJ12-3093http://www.codee.org/ref/CJ12-3093http://demonstrations.wolfram.com/ForcedOscillations/http://demonstrations.wolfram.com/TorricellisLawForTankDraining/http://demonstrations.wolfram.com/TorricellisLawForTankDraining/http://demonstrations.wolfram.com/TwoMassesWithForcingFunctionsOscillatingBetweenThreeSprings/http://demonstrations.wolfram.com/TwoMassesWithForcingFunctionsOscillatingBetweenThreeSprings/http://demonstrations.wolfram.com/MixingInTwoConnectedTanks/http://demonstrations.wolfram.com/MixingSaltInWaterInOneTank/

Recommended