[Date Index]
[Thread Index]
[Author Index]
Re: Varying a constant in an ODE to Manipulate solution
*To*: mathgroup at smc.vnet.net
*Subject*: [mg126907] Re: Varying a constant in an ODE to Manipulate solution
*From*: Narasimham <mathma18 at hotmail.com>
*Date*: Sun, 17 Jun 2012 03:56:16 -0400 (EDT)
*Delivered-to*: l-mathgroup@mail-archive0.wolfram.com
*References*: <201206130857.EAA03730@smc.vnet.net> <jreout$nqu$1@smc.vnet.net>
On Jun 15, 12:41 pm, Murray Eisenberg <mur... at math.umass.edu> wrote:
> It's not clear to me what you want to do.
I hope this reply clarifies, and my broader question too.
> Do you want to create 3D-parametric plot of the trajectory in space --
> possibly as a dynamic with the time t as dynamic parameter?
Yes. I can get this plot OK simply as:
Manipulate[ParametricPlot3D[Evaluate[sol[c][[1]]], {t, -3, 3},
PlotStyle -> {Red, Thick},
AspectRatio -> Automatic, PlotRange -> {{-3, 3}, {-10, 10}}], {c,
-0.5, 2, 0.2}]
Also I have asked in a separate but related question now under
clearance by moderators
regarding Clairaut's Equation_
How to include traces of these lines in the plot and not have them
flying in the 3space
on the Manipulate command. Call them t parameter lines as t is
continuous and c is discrete.
> And/or do one of those same things but do it just in 2D, selecting some
> pair of the 3 components of the solution function?
Yes, that was my query. Bob Hanlon pointed out my error. (Evaluating
together was needed).
> Or a 3D-parametric plot of the trajectory over a fixed-duration time in=
terval, but dynamic
> with c as control variable?
Yes, in fact that is going to be my next question now, and thanks that
you have foreseen it !
Call these lines c parameter lines as c would be the continuous
control variable and t's would be discrete.
In this case, each time dot is extruded or curvilinearly dragged
across the surface, cutting the
t lines. Bringing together action of control variables t and c, we
have a surface sol[c_,t_] which
can be computed and plotted. t and c are two parameters for this
patch.
How can this be done? I am almost sure this is doable. I shall try for
Clairaut's 2D problem and send result when done.
Regards
Narasimham
> On 6/13/12 4:57 AM, Narasimham wrote:
> > Same topic is continued. Thanks to Murray Eisenberg and Bob Hanlon
>
> > All variables or a single variable are easily pocked out from sol[c_]
> > list for plotting.
> > But how to pick out two out of them for ParametricPlot ( 2D) ?
>
> > sol[c_] := {x[t], y[t], z[t]} /.
> > First[NDSolve[{y''[t] + Sin[y[t]/c] == 0, y'[0] == 0,
> > y[0] == 1/(1 + c), x'[t] == t, x[0] == c^2,
> > z'[t] == 2 c x[t] - y[t], z[0] == 2}, {x, y, z}, {t=
, -3, 3}]]
> > Manipulate[
> > Plot[Evaluate[sol[c]], {t, -3, 3}, PlotStyle -> {Red, Thick},
> > AspectRatio -> Automatic,
> > PlotRange -> {{-3, 3}, {-10, 10}}], {c, -0.5, 2, 0.2}]
> > Manipulate[
> > Plot[Evaluate[sol[c][[1]]], {t, -3, 3}, PlotStyle -> {Red, Thick=
},
> > AspectRatio -> Automatic,
> > PlotRange -> {{-3, 3}, {-10, 10}}], {c, -0.5, 2, 0.2}]
> > " 2 parameter Dynamic manipulation not OK"
> > Manipulate[
> > Plot[{Evaluate[sol[c][[1]]], Evaluate[sol[c][[1]]]}, {t, -3, 3},
> > PlotStyle -> {Green, Thick}, AspectRatio -> Automatic,
> > PlotRange -> {{-3, 3}, {-10, 10}}], {c, -0.5, 2, 0.2}]
>
> --
> Murray Eisenberg murrayeisenb...@=
gmail.com
> 80 Fearing Street phone 413 549-10=
20 (H)
> Amherst, MA 01002-1912
Prev by Date:
**Re: Memory Blowup Issues**
Next by Date:
**Re: part of the expression?**
Previous by thread:
**Re: Varying a constant in an ODE to Manipulate solution**
Next by thread:
**Re: Varying a constant in an ODE to Manipulate solution**
| |