I am attempting to solve a system of ODEs where a, b, cv1 and cv2 are vectors.
Tu = {{-3 / 4, 1 / 4}, {5, -6}}`
tu = {2/4, 1}
pu = {.7, .3}
a[y_] = {Subscript[a, 1][y], Subscript[a, 2][y]};
b[y_] = {Subscript[b, 1][y], Subscript[b, 2][y]};
cv1[y_] = {Subscript[cv1, 1][y], Subscript[cv1, 2][y]}
cv2[y_] = {Subscript[Subscript[cv2, 1][y], 1], Subscript[Subscript[cv2, 2][y], 2]}
(* Ode system )
a'[y] == a[y].Tu
b'[y] == Tu.b[y]
cv1'[y] == Tu.cv1[y] + Subscript[a, 1][y].tu
cv2'[y] == Tu.cv2[y] + Subscript[a, 2][y].tu)
S =
NDSolve[
{a'[y] == a[y].Tu,
b'[y] == Tu.b[y],
cv1'[y] == Tu.cv1[y] + Subscript[a, 1][y].tu,
cv2'[y] == Tu.cv2[y] + Subscript[a, 2][y].tu, a[0] == pu,
b[0] == tu, cv1[0] == cv2[0] == 10^-5},
{a[y], b[y], cv1[y], cv2[y] }, {y, 0, ∞}]
I am getting an output informing me that there (incorrectly) exist more dependent variables than equations. How should I specify this system?
Edit
I fixed the initial code (the above is now the updated version); the previous error no longer occurs, though I now receive the following:
NDSolve::ndnco: The number of constraints (6) (initial conditions) is not equal to the total differential order of the system plus the number of discrete variables (8).
EDIT:
Note that using the system as specified in the answer will not retrieve the correct
cv1andcv2expressions. Instead specify those in the system as:
cv1'[y] ==
Tu.cv1[y] + (MapIndexed[Indexed[a[y], #2] &, Range[2]] // First)*tu,
cv2'[y] ==
Tu.cv2[y] + (MapIndexed[Indexed[a[y], #2] &, Range[2]] // Last)*tu


Subscript[a, 1][y]andSubscript[a, 2][y]scalar? If so, why there existsSubscript[a, 1][y].tuin the system? (Dot(.) is for products of vectors, matrices, and tensors. ) Iscv2just a vector likea,bandcv1? If so, why is it defined in such a strange way? Can you show us the system in traditional math notation? – xzczd Jan 25 '19 at 05:26