MathGroup Archive 2007

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

Search the Archive

Re: help plot log[f[t]] vs a parameter using an ODE

  • To: mathgroup at smc.vnet.net
  • Subject: [mg81110] Re: help plot log[f[t]] vs a parameter using an ODE
  • From: Chris Chiasson <chris.chiasson at gmail.com>
  • Date: Thu, 13 Sep 2007 06:19:47 -0400 (EDT)
  • References: <fc85qt$liu$1@smc.vnet.net>

On Sep 12, 2:51 am, john <johnboy98... at yahoo.com> wrote:
> I've solved the following equation for y[t].
>
> eqn = y'[t] == a (y[t]/((y[t])^2 + b )) - c y[t] + d
>
> keqn = eqn /. {a -> 10 , d -> 0.1 , c -> 1 , b -> 10 }
>
> ksol = NDSolve[{keqn, y[0] == 0}, y, {t, 0, 200}]
>
> Plot[y[t] /. ksol, {t, 0, 200}, PlotRange -> All];
>
> Now I would like to plot the log of y[t] while varying a over a range
> of values ( 0-40)
>
> How will I accomplish this?  It seems like I would have to solve the
> DE while varying a a little at a time then take the log of it?
>
> At first I thought the following will do the trick, but it didn't. I
> was trygin to make varying parameter a into a function x[t] by using
> interpolation.
>
> {{x -> Interpolation[Range[0, 40]]}}
>
> then
>
> ParametricPlot[y[t], x[t], {t, 0, 200}]
>
> generates
>
> ParametricPlot::pllim: Range specification x[t] is not of the form {x,
> xmin, xmax}
>
> I'm trying to find the value of y[t] as a parameter a incerases from
> 0  to 40.
>
> When the Log[y[t]] is plotted against parameter over the range of 0 to
> 40, that should show bistability.
>
> Except y[t] will change as you vary a. and Log[y[t]] will change along
> with it.
>
> Thanks for any input.

NDSolve[{D[y[t,a],t]==a (y[t,a]/((y[t,a])^2+b))-c y[t,a]
+d,y[0,a]==0}/.
{d->0.1,c->1,b->10},y,{t,0,200},{a,1,40}]

??



  • Prev by Date: Re: Dt "gradient" (dumb title, sorry)
  • Next by Date: FrameTicks lengths
  • Previous by thread: help plot log[f[t]] vs a parameter using an ODE
  • Next by thread: Re: help plot log[f[t]] vs a parameter using an ODE