MathGroup Archive 2000

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

Search the Archive

When ploting a differential equation, sigularities cause big ugly vertical lines on the graph - how can I get rid of them? By some magic mathematica incantaion?

  • To: mathgroup at smc.vnet.net
  • Subject: [mg25173] When ploting a differential equation, sigularities cause big ugly vertical lines on the graph - how can I get rid of them? By some magic mathematica incantaion?
  • From: ejh at idcomm.com (Ed)
  • Date: Tue, 12 Sep 2000 02:58:59 -0400 (EDT)
  • Sender: owner-wri-mathgroup at wolfram.com

Howdy All!

When ploting a differential equation, sigularities cause big ugly
vertical lines on the graph.

For example if I am graphing a family of solutions curves, each of
which decreases exponentially, at least some of them will be treated
as signularities by mathematica, and the place where they become too
funky for mathematica, there is an ugly vertical line.

I would like to plot a function only within a certain range, and when
it leaves that range I would like mathematica to stop computing the
function.

Alternatively I could use any possible advice on how to turn off these
vertical lines. Here's an example function with these singularities:

In[2]:=
Table[NDSolve[{y'[t] == y[t]-y[t]^2/12-4, y[0] == i}, y, {t,
0,8}],{i,4,20,4}]

NDSolve::"ndsz": 
    "At \!\(t\) == \!\(3.62756604743090482`\), step size is
effectively zero; \
singularity suspected."
NDSolve::"ndsz": 
    "At \!\(t\) == \!\(7.25517865610478196`\), step size is
effectively zero; \
singularity suspected."
Out[2]=
{{{y\[Rule]InterpolatingFunction[{{0.,3.62757}},"<>"]}},{{
      y\[Rule]InterpolatingFunction[{{0.,7.25518}},"<>"]}},{{
      y\[Rule]InterpolatingFunction[{{0.,8.}},"<>"]}},{{
      y\[Rule]InterpolatingFunction[{{0.,8.}},"<>"]}},{{
      y\[Rule]InterpolatingFunction[{{0.,8.}},"<>"]}}}


Here's the plotting command I am using:

In[3]:=
Plot[Evaluate[ y[t] /. %2], {t, 0,
8},AspectRatio->1,PlotRange->{0,20},
  FrameLabel->{"Fish Population - Fixed Harvesting",
      y'[t] == y[t]-y[t]^2/12-4}, Frame->True,ImageSize->300]
InterpolatingFunction::"dmval": 
    "Input value \!\({3.65410229958301835`}\) lies outside the range
of data \
in the interpolating function. Extrapolation will be used."
InterpolatingFunction::"dmval": 
    "Input value \!\({3.63388315790337124`}\) lies outside the range
of data \
in the interpolating function. Extrapolation will be used."
InterpolatingFunction::"dmval": 
    "Input value \!\({3.62853932022043901`}\) lies outside the range
of data \
in the interpolating function. Extrapolation will be used."
General::"stop": 
    "Further output of \!\(InterpolatingFunction :: \"dmval\"\) will
be \
suppressed during this calculation."





  • Prev by Date: Random spherical troubles
  • Next by Date: Re: Manipulating Equations
  • Previous by thread: Re: Random spherical troubles
  • Next by thread: Re: When ploting a differential equation, sigularities cause big ugly vertical lines on the graph - how can I get rid of them? By some magic mathematica incantaion?