# An array of functions

I need to define an array which every entry is a function. To be more specific, I want to solve the equation:

$$\frac{d \rho}{dt} = -i[H, \rho] + L[\rho]$$

in which $\rho$ is a matrix. This is a coupled differential equation where each element of the matrix $\rho$ depends on the others.

How do I define a matrix of functions in a way that DSolve or DSolveValue recognize them and solve them?

Edit: I have defined an array for $\rho$

rho = Table[Subscript[r, i, j], {i, 8}, {j, 8}];

and also for H, and the operator $L$. Each of the elements of $\rho$ is depend on other elements. For example:

    d/dt Subscript[r, 2, 3] = 7 I Subscript[r, 2, 3] - (5 kappa Subscript[r, 2, 3])/(2 (-1 + E^(5/TL))) - (6 kappa Subscript[r, 2, 3])/(-1 + E^(12/TM)) - (
5 kappa Subscript[r, 2, 3])/(-1 + E^(5/TR)) -  5/2 (1 + 1/(-1 + E^(5/TL))) kappa Subscript[r, 2, 3] - (1 + 1/(-1 + E^(2/TM))) kappa Subscript[r, 2, 3] +
5 (1 + 1/(-1 + E^(5/TR))) kappa Subscript[r, 4, 1]


These are 32 coupled differential equations (because of Hermiticity condition of $\rho$) and each of the Subscript[r, i, j] is a function of time.

I need to define the array for $\rho$ in a way that each entry is a function of time.

BTW, I can solve them by Fourier transform, but for matrices with small sizes

• I don't see how you can solve this unless the matrix is defined. – Feyre Sep 3 '16 at 12:59
• Can you express the equation in Mathematica syntax, and indicate the sizes of the matrices (in terms of e.g. n if not fixed)? People may be unfamiliar with your notation. – mikado Sep 3 '16 at 13:25
• size of the matrices are fixed. in my case, it is N=8. – user42813 Sep 3 '16 at 13:27
• To make your questions easy for members to answer, a good technique for quality control is to start a new Mathematica notebook and then copy and run your code. If it fails, find the mistake or omission and fix it. When I copy and paste your code beginning with d/dt Subscript[r,2,3] it does not run. – Jack LaVigne Sep 5 '16 at 1:13
• A word of caution. Although Subscript[r,1,1] appears to be a variable mathematica does not treat it as a variable. You are strongly encouraged to write the code without the use of subscripts. You can use, r[1,1] for example rather than a subscript. – Jack LaVigne Sep 5 '16 at 1:15