- #1
waldy73
- 1
- 0
This mathematica code works for version 4 but i can't get it to work in version 5. Does anybody have any sugestions.
F = {Fx, Fy, Fz};
r = {x[t], y[t], z[t]};
EF = {Ex, Ey, Ez};
BF = {Bx, By, Bz};
v = D[r, t]
F = q EF + q Cross[v, BF]
eq1 = F - m D[r, {t, 2}] == 0 // Thread;
eq1 // ColumnForm
initial = {
x[0] == 0, x'[0] == 0,
y[0] == 0, y'[0] == 0,
z[0] == 0, z'[0] == 0};
fields = Thread /@ {BF -> {0, 0, m ω0/
q}, EF -> {E0 Cos[ω t], 0, 0}} // Flatten
eqs = Join[eq1, initial] /. fields
dsol = DSolve[eqs, {x[t], y[t], z[t]}, t] // Flatten // FullSimplify
when i do this last part i get this message
DSolve::bvnul: "For some branches of the general solution, the given boundary \
conditions lead to an empty solution.
Thanks!
F = {Fx, Fy, Fz};
r = {x[t], y[t], z[t]};
EF = {Ex, Ey, Ez};
BF = {Bx, By, Bz};
v = D[r, t]
F = q EF + q Cross[v, BF]
eq1 = F - m D[r, {t, 2}] == 0 // Thread;
eq1 // ColumnForm
initial = {
x[0] == 0, x'[0] == 0,
y[0] == 0, y'[0] == 0,
z[0] == 0, z'[0] == 0};
fields = Thread /@ {BF -> {0, 0, m ω0/
q}, EF -> {E0 Cos[ω t], 0, 0}} // Flatten
eqs = Join[eq1, initial] /. fields
dsol = DSolve[eqs, {x[t], y[t], z[t]}, t] // Flatten // FullSimplify
when i do this last part i get this message
DSolve::bvnul: "For some branches of the general solution, the given boundary \
conditions lead to an empty solution.
Thanks!