0
$\begingroup$

I've been trying to solve a system of differential equations on Mathematica, and I wanted to know why this implementation does not work:

f[t_]:= {x[t],y[t],z[t]}
v[t_]:= f'[t]
A = {a,b,c}
DSolve[{f''[t]==k Cross[v[t],A],f[0]=={0,0,0},f,t]

If I write the system explicitly, on the other hand, it works; why is that? By explicitly I mean:

DSolve[{x''[t] == k(c y'[t]-b z'[t]), y''[t]==k( -c x'[t] + a z'[t]), z''[t]==k( b x'[t]- a y'[t])},{x,y,z},t]

And in this case I'm not able to input an initial value, thus ending up with a whole lot of costants which I don't really care about right now.

What's the problem?

1 Answers 1

1

Comparison (==) does not Thread over lists; otherwise it would be impossible to compare lists. You want to use the function Thread:

In[8]:= Thread[{x, y, z} == {1, 2, 3}] Out[8]= {x == 1, y == 2, z == 3} 

In your case you will need

Join[Thread[f''[t]==k Cross[v[t],A]],Thread[f[0]=={0,0,0}]] 

Finally, let me recommend the group comp.soft-sys.math.mathematica for Mathematica related questions.