MathGroup Archive 2008

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

Search the Archive

Re: Ploting integral curves

  • To: mathgroup at smc.vnet.net
  • Subject: [mg90003] Re: [mg89960] Ploting integral curves
  • From: Murray Eisenberg <murray at math.umass.edu>
  • Date: Thu, 26 Jun 2008 04:42:07 -0400 (EDT)
  • Organization: Mathematics & Statistics, Univ. of Mass./Amherst
  • References: <200806251027.GAA18749@smc.vnet.net>
  • Reply-to: murray at math.umass.edu

The way you phrase your questions, it appears that you are a Mathematica 
newbie.  I must ask whether you attempted to read the documentation?  I 
notice you didn't even tell us what you tried!

To begin, you need to use correct Mathematica syntax for your 
differential equation:

   4 x^2 + 2 y[x]y'[x] == 0

Notice the explicit mention of dependence of y upon x in the DE and the 
doubled equal sign to form an equation.

Now if you go to the Documentation Center and search for "differential 
equation", sooner or later you'll get to the reference page for DSolve. 
  (This is with Mathematica 6; in earlier versions, you'll need to use 
the Help Browser.)

Then the way to solve this is:

   DSolve[{4 x^2 + 2 y[x] y'[x] == 0, y[0] == y0}, y, x]

Since you want to plot solutions, it's a good idea to name the result 
from the above, so you won't have to refer to it as % in the next step, 
or %% in the step after that, etc.

   solns=DSolve[{4x^2+2y[x]y'[x]==0,y[0]==y0},y,x]

If you look at the output from this, you'll see that there are actually 
TWO solutions for the given (so far, arbitrary) initial condition y0. 
Perhaps that was the source of your problem (aside from incorrect syntax).

How to plot these solutions?  For a start, examine the examples in the 
DSolve reference page.  In the Examples section, under Applications, 
you'll find one such example.  You could apply it here as follows:

     Plot[Evaluate[y[x]/.solns/.y0->Range[0.1,2,0.2]],{x,0,1.5}]

Or, to see how the solution curves change as you vary the initial 
condition (if you are using Mathematica 6):

   Manipulate[
     Plot[Evaluate[y[x]/.solns/.y0->a], {x,0,1.5},PlotRange->{-2,2}],
   {a,0.1,2,0.1}]


noxon wrote:
> if anybody can give me some examples of ploting some integral curves, i
> would be very gracious... for example: 4x^2+2yy'=0   ....how can i plot
> that, i've tried everything but there is no curve....

-- 
Murray Eisenberg                     murray at math.umass.edu
Mathematics & Statistics Dept.
Lederle Graduate Research Tower      phone 413 549-1020 (H)
University of Massachusetts                413 545-2859 (W)
710 North Pleasant Street            fax   413 545-1801
Amherst, MA 01003-9305


  • Prev by Date: Re: VectorAngle
  • Next by Date: Problem with NMaximize
  • Previous by thread: Re: Ploting integral curves
  • Next by thread: Inequality not documented in 6.0