MathGroup Archive 2012

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

Search the Archive

Re: Varying a constant in an ODE to Manipulate solution set


Manipulate[
 tmax = 2 Pi;
 sol = NDSolve[{
     y''[t] + c Sin[y[t]/c] == 0,
     y[0] == c/(1 + c), y'[0] == 0},
    y, {t, 0, tmax}][[1]];
 Plot[y[t] /. sol, {t, 0, tmax},
  PlotRange -> {-0.75, 0.75}],
 {{c, 1}, 0.5, 2, 0.01,
  Appearance -> "Labeled"}]


Bob Hanlon

On Sun, Apr 8, 2012 at 4:16 AM, Narasimham <mathma18 at hotmail.com> wrote:
> y''[t]+ c  Sin[ y[t]/c ] ==0 needs to be NDSolved with Boundary
> conditions y'[0] == 0, y[0] == c/(1+c).
>
> How to Manipulate or Animate the y[t] plots with say 0.5 < c < 2 ?
>
> Regards
> Narasimham
>



  • Prev by Date: Re: Text["x=" x] reverses order of terms producing the string: 1.2 x=
  • Next by Date: Re: reverses order of terms producing the string: 1.2 x=
  • Previous by thread: Varying a constant in an ODE to Manipulate solution set
  • Next by thread: Re: Varying a constant in an ODE to Manipulate solution