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: [mg115218] Re: NDSolve, three 2-d order ODE, 6 initial conditions
  • From: schochet123 <schochet123 at gmail.com>
  • Date: Tue, 4 Jan 2011 04:28:13 -0500 (EST)
  • References: <ifs30l$oov$1@smc.vnet.net>

In the third ODE you need to have z[t]
instead of just z in the expression  D[z, {t, 2}]

Steve

On Jan 3, 10:56 am, michael partensky <parten... at gmail.com> wrote:
> Hi, group!
>
> An attempt  to demonstrate a (restricted)  analogy between the Bloch
> (magnetic resonance) equation and the motion equation for a charged particle
> in the magnetic field leads to the following equation:
>
> 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}];
>
> Apparently there is an error - u will see the message. Could you please help
>  catching  it?
> Thanks
> Michael Partenskii



  • Prev by Date: Re: Mathematica daily WTF (programming everything functionally?)
  • Next by Date: Re: How to change the directory for the docs?
  • 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