# How should I enter systems of equations as index notation?

I'm trying to numerically solve a system of ODEs that I've worked out in index notation where it's not clear to me what the matrix representation of many terms would be, and writing each scalar equation individually seems impractical.

For example one of the equations in Latex is

$$\dot{q}_i = \frac{p_i}{m} -\frac{{A}_i(q)}{m} - \frac{\hbar}{4m} \mathcal{B}_{jk}^{-1} D^2_{kj} {A}_i(q) \\$$

where q,p and B are matrix valued functions I am solving for, and $$D^2 A_i (q)$$ is the Hessian matrix of $$A_i(q)$$.

What's the best strategy for putting this system in a representation Mathematica will understand? Is there and package for index notation support like this?

• You can define the indices as arguments of functions. For example, you may define a time-dependent vector q[i,t] and a matrix B[j,k,t]. Have in mind that the Einstein convention is not fulfilled automatically, you will need to sum explicitly. – Alexei Boulbitch Jun 27 at 7:54