MathGroup Archive 2011

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

Search the Archive

Re: NDSolvie[]

  • To: mathgroup at smc.vnet.net
  • Subject: [mg123533] Re: NDSolvie[]
  • From: Bob Hanlon <hanlonr357 at gmail.com>
  • Date: Sat, 10 Dec 2011 07:29:49 -0500 (EST)
  • Delivered-to: l-mathgroup@mail-archive0.wolfram.com
  • References: <201112091058.FAA03928@smc.vnet.net>

x'[t]//FullForm

Derivative[1][x][t]


D[x[t],t]//FullForm

Derivative[1][x][t]


soln1 = 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}];

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

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

soln1 == soln2 == soln3

True


Bob Hanlon

> Z
> Subject: [mg123513] NDSolve[]
> To: mathgroup at 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}]
>



  • References:
    • [no subject]
      • From: "Steven M. Christensen" <steve@smc.vnet.net>
  • Prev by Date: Re: Preventing unwanted threading by Inner
  • Next by Date: Re: Function for complex polynomial with variable number of arguments
  • Previous by thread: Re: NDSolve[]
  • Next by thread: Re: NDSolve[]