Re: NDSolve with functions of vectors

• To: mathgroup at smc.vnet.net
• Subject: [mg82990] Re: NDSolve with functions of vectors
• From: "Steve Luttrell" <steve at _removemefirst_luttrell.org.uk>
• Date: Tue, 6 Nov 2007 03:42:53 -0500 (EST)
• References: <fgca49\$9ho\$1@smc.vnet.net> <fgenik\$fv6\$1@smc.vnet.net> <fghb2n\$i9j\$1@smc.vnet.net>

```Now I have had a look at my Messages window I see that I am getting the same
warning messages as you. But the final result appears to be the correct
solution to the differential equation.

I have \$Version = "6.0 for Microsoft Windows (32-bit) (April 20, 2007)".

--
Steve Luttrell
West Malvern, UK

"Jerry" <JLK2941 at yahoo.com> wrote in message
news:fghb2n\$i9j\$1 at smc.vnet.net...
> Hi, I tried your code and got these errors. What did I miss?
> Thanks.
>
> Part::partw: Part 2 of x[s] does not exist. >>
>
> Part::partw: Part 3 of x[s] does not exist. >>
>
> Steve Luttrell wrote:
>> This does what you want:
>>
>> solution =
>>  NDSolve[{x'[s] == {2*x[s][[2]], x[s][[1]]/3, x[s][[3]]},
>>    x[0] == {1, 1, 1}}, x[s], {s, 0, 1}]
>>
>> gives
>>
>> {{x[s]->InterpolatingFunction[{{0.,1.}},<>][s]}}
>>
>> Then
>>
>> ParametricPlot3D[Expand[x[s]/.solution[[1]]],{s,0,1}]
>>
>> gives a 3D plot of the trajectory for 0<=s<=1.
>>
>

```

• Prev by Date: Re: A Problem with x[i_]:=
• Next by Date: Re: Reproducing a hash code
• Previous by thread: Re: NDSolve with functions of vectors
• Next by thread: Re: NDSolve with functions of vectors