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

• To: mathgroup at smc.vnet.net
• Subject: [mg115217] Re: NDSolve, three 2-d order ODE, 6 initial conditions
• From: Bob Hanlon <hanlonr at cox.net>
• Date: Tue, 4 Jan 2011 04:28:02 -0500 (EST)

```D[z, {t, 2}] should be D[z[t], {t, 2}]

Bob Hanlon

---- michael partensky <partensky 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 == x0, y == y0, z == z0 }, {x[t], y[t],
z[t]}, {t, t1}];