MathGroup Archive 2011

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

Search the Archive

Table NDSolve Plot

I know this is a basic question, but I am having a hard time figuring
this out on my own.

I would like to numerically solve an ordinary differential equation
with a parameter which varies over a range of numbers and plot all the
solutions with different values of the parameter on the same plot.
Also, I would like to be able to then over-plot another solution on
the same plot.

For instance:

s = NDSolve[{(h - k^2 n (1 + n) z^2) w[z] -
     z (1 + k^2 - 2 k^2 z^2) Derivative[1][w][
       z] + (1 - z^2) (1 - k^2 z^2) (w^\[Prime]\[Prime])[z] == 0,
   w[2] == 1, w'[2] == -1}, w, {z, 1.1, 3.0}]
Plot[Evaluate[w[z] /. s], {z, 1.1, 3.0}, PlotStyle -> Automatic]
Plot[1/2 Log[(z + 1)/(z - 1)], {z, 1.1, 3.0}, PlotStyle -> Automatic]
I would like to do this for instance 10 increments of k from 0 to 1,
and also the Log plot, all on the same plot.


  • Prev by Date: Re: can't find info about & /@ %
  • Next by Date: Setting parameters via Manipulate?
  • Previous by thread: Table NDSolve Plot
  • Next by thread: Re: Table NDSolve Plot