[Date Index]
[Thread Index]
[Author Index]
Re: inverse square law attraction
*To*: mathgroup at smc.vnet.net
*Subject*: [mg34891] Re: [mg34884] inverse square law attraction
*From*: BobHanlon at aol.com
*Date*: Wed, 12 Jun 2002 02:15:18 -0400 (EDT)
*Sender*: owner-wri-mathgroup at wolfram.com
In a message dated 6/11/02 6:38:44 AM, boardman at onetel.net.uk writes:
>I have a question I would be pleased if someone would answer.
>
>I am studying planetary motion under the inverse square law attraction.
>
>I use NDSolve to find the numerical solution to
>
>y''[t]====-y[t]/(x[t]^2+y[t]^2)^(3/2)
>x''[t]====-x[t]/(x[t]^2+y[t]^2)^93/2)
>x'[0]==0
>y'[0]==1.2
>y[0]==0
>x[0]==1
>
>And get a very satisfactory ellipse. However, I would like to check the
>hodograph
>( a parametric plot of x'[t] and y'[t]
>against time. NDSolve must have calculated values for x'[t] and y'[t] but
>I
> cannot find them. Where are they please?
>
Clear[x,y,t];
soln=NDSolve[{
y''[t]==-y[t]/(x[t]^2+y[t]^2)^(3/2),
x''[t]==-x[t]/(x[t]^2+y[t]^2)^(3/2),
x'[0]==0, y'[0]==1.2, y[0]==0, x[0]==1},
{x[t], y[t]}, {t, 0, 15}][[1]];
x[t_] := Evaluate[x[t]/.soln];
y[t_] := Evaluate[y[t] /.soln];
ParametricPlot[{x[t], y[t]}, {t, 0, 15}, AspectRatio->1];
Plot[{x[t], x'[t]},{t,0,15}];
Plot[{y[t], y'[t]},{t,0,15}];
ParametricPlot[{x'[t], y'[t]}, {t, 0, 15}, AspectRatio->1];
Bob Hanlon
Chantilly, VA USA
Prev by Date:
**Re: Palette resizing**
Next by Date:
**Re: 3d table or list to file**
Previous by thread:
**inverse square law attraction**
Next by thread:
**RE: inverse square law attraction**
| |