Disclaimer: Please excuse me if this question seems trivial; I'm new to Mathematica.
As a simple example, consider the stationary Boltzmann equation $$\frac{\vec{p}}{m} \cdot \vec{\nabla}_x \, f(\vec{x},\vec{p}) = \vec{F}(\vec{x}) \cdot \vec{\nabla}_p \, f(\vec{x},\vec{p}),$$ where $\vec{x}$ and $\vec{p}$ are independent three-vectors representing position and momentum, $\vec{F}(\vec{x})$ is a position-dependent force, and $f(\vec{x},\vec{p})$ is a scalar quantity denoting a particle distribution which I would like to solve for. (If possible, I would like to visualize the result and later extend this calculation to an non-stationary integro-differential equation.)
My naive approach was to implement this as follows:
xvec = {x1, x2, x3};
pvec = {p1, p2, p3};
Fvec = {F1[xvec], F2[xvec], F3[xvec]};
DSolve[pvec/m.Grad[f[xvec, pvec], xvec] ==
Fvec.Grad[f[xvec, pvec], pvec], f[xvec, pvec], {xvec, pvec}]
Evaluating this cell yields the error message:
DSolve::litarg: To avoid possible ambiguity, the arguments of the dependent variable in f[{x1,x2,x3},{p1,p2,p3}] should literally match the independent variables.
The problem is, I don't know how to 'unpack' a list so that it can act as multiple function arguments. Also, I'm guessing that this is not the only issue with the above code snippet. Any advice would be much appreciated.
Apply
andFlatten
seems to set it up properly, butDSolve
doesn't solve it:Fvec = {F1 @@ xvec, F2 @@ xvec, F3 @@ xvec}; DSolve[(pvec/m).Grad[f @@ Flatten[{xvec, pvec}], xvec] == Fvec.Grad[f @@ Flatten[{xvec, pvec}], pvec], f, Flatten@{xvec, pvec}]
$\endgroup$