MathGroup Archive 1998

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

Search the Archive

Re: graphing implicit function

  • To: mathgroup at smc.vnet.net
  • Subject: [mg14244] Re: graphing implicit function
  • From: Paul Abbott <paul at physics.uwa.edu.au>
  • Date: Mon, 12 Oct 1998 13:51:29 -0400
  • Organization: University of Western Australia
  • References: <6vf60d$dil@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

David Ridley wrote:

> I have a differential equation about which I'm trying to get some
> intuition.
> 
> y'[x] = 1/2 + ((1-Z)(A-2x+B) / 2Z(A-2x+y[x]))
> 
> I'd like to be able to graph it.

Some comments:

[1] Writing your differential equation as 

  de = y'[x] == ((a + b - 2*x)*(1 - z))/(2*z*(a - 2*x + y[x])) + 1/2; 

DSolve can go some way towards solving this, i.e.,

  DSolve[de, y[x], x]

[2] For fixed a, b, and z, you can use NDSolve:

  NDSolve[{de /. {a->1, b->1, z->1/2}, y[0] == 5}, y, {x, 0, 3}];

and then 

  Plot[Evaluate[y[x] /. %], {x, 0, 3}]; 

> I used a linear transformation and then integrated over X to obtain:
> 
> Y = 2 X Log[Y] / (4 Z Log [Y] - (1-Z) Log [2 X])
> 
> Is it possible to graph an implicit function like this using
> Mathematica?

You can use ImplicitPlot in Graphics`Graphics`.  Alternatively, you can
use ContourPlot for fixed z, e.g.,

 ContourPlot[Evaluate[y - 
      (2*x*Log[y])/(4*z*Log[y] - (1 - z)*Log[2*x]) /. 
     z -> 1/2], {x, 0.1, 4}, {y, 0.1, 4}, Contours -> {0}, 
   PlotPoints -> 200, ContourShading -> None]; 

or ContourPlot3D (also in Graphics`Graphics`).

Cheers,
	Paul
 
____________________________________________________________________ 
Paul Abbott                                   Phone: +61-8-9380-2734
Department of Physics                           Fax: +61-8-9380-1014
The University of Western Australia            Nedlands WA  6907       
mailto:paul at physics.uwa.edu.au  AUSTRALIA                       
http://www.physics.uwa.edu.au/~paul

            God IS a weakly left-handed dice player
____________________________________________________________________


  • Prev by Date: Re: Unexpected results
  • Next by Date: Re: Subscripting Matrices (Syntax Question ?)
  • Previous by thread: Re: graphing implicit function
  • Next by thread: Re: graphing implicit function