MathGroup Archive 1998

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: How do you form a direction field (slope field) in Mathematica?

  • To:
  • Subject: [mg10705] Re: How do you form a direction field (slope field) in Mathematica?
  • From: Paul Abbott <>
  • Date: Fri, 30 Jan 1998 04:24:40 -0500
  • Organization: University of Western Australia
  • References: <6ahq40$>

Thomas D'Silva wrote:

> Can anyone please tell me how to create a direction field (slope field)
> using Mathematica. Is there a way? I would think there is for it is a
> well known software. Please help me. I really need to know. Please
> help!

In the standard AddOn Packages there is Graphics`PlotField` and
Graphics`PlotField3D`.  These can be used to show a slope field.  Also,
it is very easy to write your own function:

  SlopeField[f_, {x_, x0_, x1_, dx_}, {y_, y0_, y1_, dy_}] := 
     Show[Graphics[{Hue[1],  Table[a = 1/(2 Sqrt[1 + f^2]); 
        Line[{{x - a dx, y - a dx f}, {x + a dx, y + a dx f}}], 
	   {x, x0, x1, dx},  {y, y0, y1, dy}]}], Axes -> True]; 

  SlopeField[(2y^2 - x^2)/(3x y), {x, 0.1, 2, 0.1}, {y, -0.05, 1.2,

There are a number of good Mathematica books on differential equations,
especially the visualization of differential equations:

- Introduction to Ordinary Differential Equations via Mathematica

This book/CD-ROM package provides a traditional treatment of elementary
ordinary differential equations while introducing computer assisted
methods through Mathematica. Models are developed from classical
physics, population biology, electrical circuits, and elementary
mechanics. Instructor's manual available. 

Alfred Gray, University of Maryland
Mike Mezzino, University of Houston at Clear Lake Mark Pinsky,
Northwestern University

- VisualDSolve: Visualizing Differential Equations with Mathematica

VisualDSolve is a Mathematica package that provides a wide variety of
tools for the visualization of solutions to differential equations. It
consists of a Mathematica package, a reference manual, and 12
lab/notebooks that can be used as a supplement to an existing
differential equations course.

Dan Schwalbe, Macalester College
Stan Wagon, Macalester College 


Paul Abbott                                   Phone: +61-8-9380-2734
Department of Physics                           Fax: +61-8-9380-1014
The University of Western Australia            Nedlands WA  6907  AUSTRALIA                   

            God IS a weakly left-handed dice player

  • Prev by Date: Importing and printing graphics files with Mathematica 3.0 ?
  • Next by Date: Re: Symbolic Orthogonalisation of Function spaces
  • Prev by thread: How do you form a direction field (slope field) in Mathematica?
  • Next by thread: weird eqns