For instance a ODE system of two unknown functions: x(t_):={x1(t),x2(t)}; DSolve[x'[t]==a.x(t),x(t),t]
Now, suppose that instead of two, I have 1,000,000 unknown functions. How do I write x(t_):={x1(t),x2(t),...,x1000000(t)}?
x #[t] & /@ Range@3 {x 1[t], x 2[t], x 3[t]}
I don't think that would work as a list of functions
In[5]:= x #[t] & /@ Range@3 Out[5]= {x 1[t], x 2[t], x 3[t]} In[6]:= InputForm[%] Out[6]//InputForm= {x*1[t], x*2[t], x*3[t]}
ToExpression["x" <> ToString[#] <> "[t]"] & /@ Range[3] {x1[t], x2[t], x3[t]}
Subscript[x, #][t] & /@ Range[3]
In[31]:= x[#][t] & /@ Range[3] Out[31]= {x[1][t], x[2][t], x[3][t]}
How about this..
xx[t_]=Table[x[i][t], {i, 3}] {x[1][t], x[2][t], x[3][t]}
Worked. Thanks!
In[6]:= xx[t_] = Through[Array[x, 3][t]] Out[6]= {x[1][t], x[2][t], x[3][t]}