Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.soft-sys.math.mathematica > #7090

Re: NDSolve[]

From Frederick Bartram <bartramf@acm.org>
Newsgroups comp.soft-sys.math.mathematica
Subject Re: NDSolve[]
Date 2011-12-10 12:38 +0000
Organization Steven M. Christensen and Associates, Inc and MathTensor, Inc.
Message-ID <jbvjs0$j34$1@smc.vnet.net> (permalink)
References <201112091058.FAA03928@smc.vnet.net>

Show all headers | View raw


Well, if your stumped then I don't know if I can help
Sorry, if this is a trivial answer but from the documentation the two 
forms are not strictly equivalent.

From the documentation for "Derivative": f' is equivalent to 
Derivative[1][f].



So
> NDSolve[{Derivative[x[t], t] == -y[t] - x[t]^2,
>  Derivative[y[t], t] == 2*x[t] - y[t], x[0] == y[0] == 1}, 
{x,
>  y}, {t, 10}]

should be

NDSolve[{Derivative[1][x][t] == -y[t] - x[t]^2,
  Derivative[1][y][t] == 2*x[t] - y[t], x[0] == y[0] == 1}, 
{x,
  y}, {t, 10}]

Another example of behavior that is not quite what you might expect...

*-------------------------------------------------
* Frederick Bartram
* PGP key id: 0x63fa758 keyserver: http://keyserver.pgp.com
*/


> Z
> Subject:  NDSolve[]
> To: mathgroup@smc.vnet.net
>
> For the same equations, why does the first method as following give
> the error but the other one give the desired result?
>
> NDSolve[{Derivative[x[t], t] == -y[t] - x[t]^2,
>  Derivative[y[t], t] == 2*x[t] - y[t], x[0] == y[0] == 1}, 
{x,
>  y}, {t, 10}]
>
> NDSolve[{x'[t] == -y[t] - x[t]^2, y'[t] == 2*x[t] - y[t],
>  x[0] == y[0] == 1}, {x, y}, {t, 10}]
>

Back to comp.soft-sys.math.mathematica | Previous | Next — Next in thread | Find similar | Unroll thread


Thread

Re: NDSolve[] Frederick Bartram <bartramf@acm.org> - 2011-12-10 12:38 +0000
  Re: NDSolve[] "Oleksandr Rasputinov" <oleksandr_rasputinov@hmamail.com> - 2011-12-11 08:47 +0000

csiph-web