MathGroup Archive 2008

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

Search the Archive

Re: Ploting integral curves

  • To: mathgroup at smc.vnet.net
  • Subject: [mg89992] Re: Ploting integral curves
  • From: Jean-Marc Gulliet <jeanmarc.gulliet at gmail.com>
  • Date: Thu, 26 Jun 2008 04:40:02 -0400 (EDT)
  • Organization: The Open University, Milton Keynes, UK
  • References: <g3t6p6$ihk$1@smc.vnet.net>

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....

(* First, we write the differential equation with correct Mathematica 
syntax. *)

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

(* Then, we solve it thanks to the DSolve[] function. *)

sols = DSolve[de, y[x], x];

(* Since we have two solutions -- one family of functions below the 
x-axis and the other one above the x-axis, we build two expressions to 
be plotted. *)

f1 = y[x] /. sols[[1]] /. C[1] -> C1;

f2 = y[x] /. sols[[2]] /. C[1] -> C1;

(* Finally, we plot a sample of the family of functions. *)

Plot[Table[{f1, f2}, {C1, -2, 2}], {x, -3, 2}, ImageSize -> 500,
  PlotStyle -> Thick]


Regards,
-- Jean-Marc


  • Prev by Date: Re: does not work properly
  • Next by Date: Re: Speech synthesis in Mathematica 6
  • Previous by thread: Re: Ploting integral curves
  • Next by thread: Re: Ploting integral curves