Mathematica 9 is now available
Services & Resources / Wolfram Forums / MathGroup Archive
-----

MathGroup Archive 2011

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

Search the Archive

Re: NDSolve, three 2-d order ODE, 6 initial conditions

  • To: mathgroup at smc.vnet.net
  • Subject: [mg115224] Re: NDSolve, three 2-d order ODE, 6 initial conditions
  • From: Alois Steindl <Alois.Steindl at tuwien.ac.at>
  • Date: Tue, 4 Jan 2011 04:29:22 -0500 (EST)
  • References: <ifs30l$oov$1@smc.vnet.net>

Am 03.01.2011 09:56, schrieb michael partensky:
> ndSol[w_, w0_, w1_, x0_, y0_, z0_, v0x_, v0y_, v0z_, t1_] :=
>    NDSolve[{Cos[w t ] D[x[t], {t, 2}] + Sin[ w t] D[y[t], {t, 2}] - w Sin[w
> t] D[x[t], t] + w Cos[w t] D[y[t], t] == (w - w0) ( Sin[w t ] D[x[t], t] -
> Cos[w t] D[y[t], t]),
>      -Sin[w t] D[x[t], {t, 2}] + Cos[w t] D[y[t], {t, 2}] == (w - w0) (Cos[w
> t] D[x[t], t] + Sin[w t] D[y[t], t]) + w1 D[z[t], t],
>      D[z, {t, 2}] == w1 (Sin[w t] D[x[t], t] - Cos[w1 t] D[y[t], t]),
> (D[x[t], t] /. {t ->  0} ) == v0x, (D[y[t], t] /. {t ->  0} ) == v0y, (D[z[t],
> t] /. {t ->  0})  == v0z, x[0] == x0, y[0] == y0, z[0] == z0 }, {x[t], y[t],
> z[t]}, {t, t1}];
>
Hello,
when I type
ndSol[5, 3, 2, 0, 0, 0, 0, 0, 0, 10]
I get the message
NDSolve::ndnco: The number of constraints (6) (initial conditions) is 
not equal to the total differential order of the system (5). >>
and the output (converted here to InputForm for better readability):
NDSolve[{-5*Sin[5*t]*Derivative[1][x][t] +
          5*Cos[5*t]*Derivative[1][y][t] +
     Cos[5*t]*Derivative[2][x][t] +
          Sin[5*t]*Derivative[2][y][t] ==
        2*(Sin[5*t]*Derivative[1][x][t] -
       Cos[5*t]*Derivative[1][y][t]),
      (-Sin[5*t])*Derivative[2][x][t] + Cos[5*t]*Derivative[2][y][t] ==
        2*(Cos[5*t]*Derivative[1][x][t] +
        Sin[5*t]*Derivative[1][y][t]) +
          2*Derivative[1][z][t],
      0 == 2*(Sin[5*t]*Derivative[1][x][t] -
             Cos[2*t]*Derivative[1][y][t]), Derivative[1][x][0] == 0,
      Derivative[1][y][0] == 0, Derivative[1][z][0] == 0, x[0] == 0,
      y[0] == 0, z[0] == 0}, {x[t], y[t], z[t]}, {t, 10}]

The reason for the message is obvious after looking at the third equation.
Alois


  • Prev by Date: Re: dissabling code segments
  • Next by Date: Re: New to Mathematica, need help for Image Processing.
  • Previous by thread: Re: NDSolve, three 2-d order ODE, 6 initial conditions
  • Next by thread: Re: NDSolve, three 2-d order ODE, 6 initial conditions