MathGroup Archive 2012

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

Search the Archive

Re: Varying a constant in an ODE to Manipulate solution

  • To: mathgroup at smc.vnet.net
  • Subject: [mg125958] Re: Varying a constant in an ODE to Manipulate solution
  • From: Murray Eisenberg <murray at math.umass.edu>
  • Date: Mon, 9 Apr 2012 05:36:01 -0400 (EDT)
  • Delivered-to: l-mathgroup@mail-archive0.wolfram.com
  • References: <201204080816.EAA15103@smc.vnet.net>
  • Reply-to: murray at math.umass.edu

soln[c_] := y[t] /. First[
    NDSolve[{y''[t] + c Sin[y[t]/c] == 0, y'[0] == 0,
      y[0] == c/(1 + c)}, y[t], {t, 0, 1}]
    ]

Manipulate[
   Plot[Evaluate[soln[c]], {t, 0, 1}, PlotRange -> {0, 0.8}],
   {c, 0.5, 2, 0.1}]


On 4/8/12 4:16 AM, Narasimham 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
>

-- 
Murray Eisenberg                     murray at math.umass.edu
Mathematics & Statistics Dept.
Lederle Graduate Research Tower      phone 413 549-1020 (H)
University of Massachusetts                413 545-2859 (W)
710 North Pleasant Street            fax   413 545-1801
Amherst, MA 01003-9305



  • Prev by Date: Re: reverses order of terms producing the string: 1.2 x=
  • Next by Date: Re: evaluate to True?
  • Previous by thread: Re: Varying a constant in an ODE to Manipulate solution set
  • Next by thread: Incorrect parallel computation