This seems to be a hasty start into Mathematica. Your inputs are right but used without insight.
Use
B = {{k1 + h, -k1, 0}, {-k1,h + k1´ + k2, -k2´}, {0, -k2, h + k2´}};
C0 = {{CA0}, {CB0}, {CC0}};
C1[t_] = h.(IdentityMatrix - Exp[-Bt])(B^-1)*C0;
C2[t_] = {CA2[t], CB2[t], CC2[t]};
B// MatrixForm
C0 // MatrixForm
C1[t] // MatrixForm
C2[t] // MatrixForm
This is the differential equation.
{C1[0],C2[0]}
is another check. This shows Mathematica is not omniscient towards user input.
What is dividing by a matrix in mathematics?
It is multiplying with the Inverse
matrix. Now Mathematica can calculate the arbitrary inverse of symbolic matrices but for the given one it does not.
So the question is transformed into one more precise one. Help is required in how to enter a matrix for which this is calculated in Mathematica.
Most probable is that Mathematica expects the k1´, k2´ to be derivatives. So the suggestion of Bill is pointing in the right direction. The ´ in this case denotes a different set of reaction constant coefficients in a two-step flow reaction. The ´ can not be neglected because they are different. So simply rename them.
B = {{k1 + h, -k1, 0}, {-k1,
h + kp1 + k2, -kp2}, {0, -k2, h + kp2}}
The next point in discourse is that naming the constants k in Mathematica leads to confusion because Wolfram Inc did choose k for naming free constants or even integration variables.
Keeping in simpler leave aside the meaning of the matrix coefficients. Another bigger problem is that Mathematica does not give such nice formulas as the introductory book does as solution and that is really worse in this case.
Det[B]
(-k1^2 + (h + k1) (h + k1\.b4 + k2)) (h + k2\.b4) +
k2 (-h k2\.b4 - k1 k2\.b4)
Inverse[B]
{{(h^2 + h k1\.b4 + h k2 + h k2\.b4 +
k1\.b4 k2\.b4)/((-k1^2 + (h + k1) (h + k1\.b4 + k2)) (h + k2\.b4) +
k2 (-h k2\.b4 - k1 k2\.b4)), (
h k1 + k1 k2\.b4)/((-k1^2 + (h + k1) (h + k1\.b4 + k2)) (h +
k2\.b4) + k2 (-h k2\.b4 - k1 k2\.b4)), (
k1 k2\.b4)/((-k1^2 + (h + k1) (h + k1\.b4 + k2)) (h + k2\.b4) +
k2 (-h k2\.b4 - k1 k2\.b4))}, {(
h k1 + k1 k2\.b4)/((-k1^2 + (h + k1) (h + k1\.b4 + k2)) (h +
k2\.b4) +
k2 (-h k2\.b4 - k1 k2\.b4)), ((h + k1) (h +
k2\.b4))/((-k1^2 + (h + k1) (h + k1\.b4 + k2)) (h + k2\.b4) +
k2 (-h k2\.b4 - k1 k2\.b4)), (
h k2\.b4 +
k1 k2\.b4)/((-k1^2 + (h + k1) (h + k1\.b4 + k2)) (h + k2\.b4) +
k2 (-h k2\.b4 - k1 k2\.b4))}, {(
k1 k2)/((-k1^2 + (h + k1) (h + k1\.b4 + k2)) (h + k2\.b4) +
k2 (-h k2\.b4 - k1 k2\.b4)), (
h k2 + k1 k2)/((-k1^2 + (h + k1) (h + k1\.b4 + k2)) (h + k2\.b4) +
k2 (-h k2\.b4 - k1 k2\.b4)), (-k1^2 + (h + k1) (h + k1\.b4 +
k2))/((-k1^2 + (h + k1) (h + k1\.b4 + k2)) (h + k2\.b4) +
k2 (-h k2\.b4 - k1 k2\.b4))}}
So a solution with that fills a booklet written matrix element per matrix element.
So the best input for a lengthy output is now:
sol = DSolve[C2'[t] == h.C1[t] - B.C2'[t], C2[t], t]
So the best input for a teaching students instruction guide book is
sol = DSolve[D[C2m[t], t] == h.C1m[t] - Bm.D[C2m, t], C2m[t], t]
{{C2m[t] ->
C[1] + Inactive[Integrate][(-Bm.0 + h.C1m[K[1]]), {K[1], 1, t}]}}
Then substitute the matrix B and C1 into the solution.
One of these geniuses that already published a book about Mathematica figured the process, there is a in the real world to make the right reduces at the right time. To operate with symbolics is often better. To gain insight into tedious output is cumbersome.
In this question working with abbreviations can be fine in the pages long tedious solution. But that is still too long compared to not make use of the element per element matrix short again.
might be even better input style to get a more matrix-like solution.
MatrixExp[B*t]
{{RootSum[
h^3 + h^2 k1 - h k1^2 + h^2 k1\.b4 + h k1 k1\.b4 + h^2 k2 +
h k1 k2 + h^2 k2\.b4 + h k1 k2\.b4 - k1^2 k2\.b4 +
h k1\.b4 k2\.b4 + k1 k1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k2 #1^2 +
k2\.b4 #1^2 - #1^3 &, (-E^(t #1) h - E^(t #1) k1 +
E^(t #1) #1)/(3 h^2 + 2 h k1 - k1^2 + 2 h k1\.b4 +
k1 k1\.b4 + 2 h k2 + k1 k2 + 2 h k2\.b4 + k1 k2\.b4 +
k1\.b4 k2\.b4 - 6 h #1 - 2 k1 #1 - 2 k1\.b4 #1 - 2 k2 #1 -
2 k2\.b4 #1 + 3 #1^2) &],
RootSum[h^3 + h^2 k1 - h k1^2 + h^2 k1\.b4 + h k1 k1\.b4 + h^2 k2 +
h k1 k2 + h^2 k2\.b4 + h k1 k2\.b4 - k1^2 k2\.b4 +
h k1\.b4 k2\.b4 + k1 k1\.b4 k2\.b4 - 3 h^2 #1 - 2 h k1 #1 +
k1^2 #1 - 2 h k1\.b4 #1 - k1 k1\.b4 #1 - 2 h k2 #1 - k1 k2 #1 -
2 h k2\.b4 #1 - k1 k2\.b4 #1 - k1\.b4 k2\.b4 #1 + 3 h #1^2 +
k1 #1^2 + k1\.b4 #1^2 + k2 #1^2 +
k2\.b4 #1^2 - #1^3 &, (E^(t #1) h^2 + E^(t #1) h k1 -
E^(t #1) k1^2 + E^(t #1) h k1\.b4 + E^(t #1) k1 k1\.b4 +
E^(t #1) h k2 + E^(t #1) k1 k2 - 2 E^(t #1) h #1 -
E^(t #1) k1 #1 - E^(t #1) k1\.b4 #1 - E^(t #1) k2 #1 +
E^(t #1) #1^2)/(3 h^2 + 2 h k1 - k1^2 + 2 h k1\.b4 +
k1 k1\.b4 + 2 h k2 + k1 k2 + 2 h k2\.b4 + k1 k2\.b4 +
k1\.b4 k2\.b4 - 6 h #1 - 2 k1 #1 - 2 k1\.b4 #1 - 2 k2 #1 -
2 k2\.b4 #1 + 3 #1^2) &]}}
This already is longer than one page of letter size. IndentityMatrix[3]!
DSolve[C2'[t]==h.C1[t]-B.C2'[t],{CA2[t], CB2[t], CC2[t]},t]
{{CA2[t] ->
C[1] + Inactive[Integrate][
h.h.{CB0 (-((E^(k1 K[1]) (h + k1) (h + k2))/(
h^3 + 2 h^2 k1 + 2 h^2 k2 +
3 h k1 k2)) + ((1 - E^((-h - k1) K[1])) (h k1 + k1 k2))/(
h^3 + 2 h^2 k1 + 2 h^2 k2 + 3 h k1 k2) - (h k2 + k1 k2)/(
h^3 + 2 h^2 k1 + 2 h^2 k2 + 3 h k1 k2)) +
CC0 (((1 - E^((-h - k1) K[1])) k1 k2)/(
h^3 + 2 h^2 k1 + 2 h^2 k2 + 3 h k1 k2) - (
E^(k1 K[1]) (h k2 + k1 k2))/(
h^3 + 2 h^2 k1 + 2 h^2 k2 + 3 h k1 k2) - (
h^2 + 2 h k1 + h k2 + k1 k2)/(
h^3 + 2 h^2 k1 + 2 h^2 k2 + 3 h k1 k2)) +
CA0 (-((k1 k2)/(h^3 + 2 h^2 k1 + 2 h^2 k2 + 3 h k1 k2)) - (
E^(k1 K[1]) (h k1 + k1 k2))/(
h^3 + 2 h^2 k1 + 2 h^2 k2 +
3 h k1 k2) + ((1 - E^((-h - k1) K[1])) (h^2 + h k1 +
2 h k2 + k1 k2))/(
h^3 + 2 h^2 k1 + 2 h^2 k2 + 3 h k1 k2)),
CB0 (((1 - E^((-h - k1 - k2) K[1])) (h + k1) (h + k2))/(
h^3 + 2 h^2 k1 + 2 h^2 k2 + 3 h k1 k2) - (
E^(k1 K[1]) (h k1 + k1 k2))/(
h^3 + 2 h^2 k1 + 2 h^2 k2 + 3 h k1 k2) - (
E^(k2 K[1]) (h k2 + k1 k2))/(
h^3 + 2 h^2 k1 + 2 h^2 k2 + 3 h k1 k2)) +
CC0 (-((E^(k1 K[1]) k1 k2)/(
h^3 + 2 h^2 k1 + 2 h^2 k2 +
3 h k1 k2)) + ((1 - E^((-h - k1 - k2) K[1])) (h k2 +
k1 k2))/(h^3 + 2 h^2 k1 + 2 h^2 k2 + 3 h k1 k2) - (
E^(k2 K[1]) (h^2 + 2 h k1 + h k2 + k1 k2))/(
h^3 + 2 h^2 k1 + 2 h^2 k2 + 3 h k1 k2)) +
CA0 (-((E^(k2 K[1]) k1 k2)/(
h^3 + 2 h^2 k1 + 2 h^2 k2 +
3 h k1 k2)) + ((1 - E^((-h - k1 - k2) K[1])) (h k1 +
k1 k2))/(h^3 + 2 h^2 k1 + 2 h^2 k2 + 3 h k1 k2) - (
E^(k1 K[1]) (h^2 + h k1 + 2 h k2 + k1 k2))/(
h^3 + 2 h^2 k1 + 2 h^2 k2 + 3 h k1 k2)),
CB0 (-((E^(k2 K[1]) (h + k1) (h + k2))/(
h^3 + 2 h^2 k1 + 2 h^2 k2 + 3 h k1 k2)) - (h k1 + k1 k2)/(
h^3 + 2 h^2 k1 + 2 h^2 k2 +
3 h k1 k2) + ((1 - E^((-h - k2) K[1])) (h k2 + k1 k2))/(
h^3 + 2 h^2 k1 + 2 h^2 k2 + 3 h k1 k2)) +
CC0 (-((k1 k2)/(h^3 + 2 h^2 k1 + 2 h^2 k2 + 3 h k1 k2)) - (
E^(k2 K[1]) (h k2 + k1 k2))/(
h^3 + 2 h^2 k1 + 2 h^2 k2 +
3 h k1 k2) + ((1 - E^((-h - k2) K[1])) (h^2 + 2 h k1 +
h k2 + k1 k2))/(
h^3 + 2 h^2 k1 + 2 h^2 k2 + 3 h k1 k2)) +
CA0 (((1 - E^((-h - k2) K[1])) k1 k2)/(
h^3 + 2 h^2 k1 + 2 h^2 k2 + 3 h k1 k2) - (
E^(k2 K[1]) (h k1 + k1 k2))/(
h^3 + 2 h^2 k1 + 2 h^2 k2 + 3 h k1 k2) - (
h^2 + h k1 + 2 h k2 + k1 k2)/(
h^3 + 2 h^2 k1 + 2 h^2 k2 + 3 h k1 k2))}/(
1 + h), {K[1], 1, t}],
CB2[t] ->
C[2] + Inactive[Integrate][
h.h.{CB0 (-((E^(k1 K[2]) (h + k1) (h + k2))/(
h^3 + 2 h^2 k1 + 2 h^2 k2 +
3 h k1 k2)) + ((1 - E^((-h - k1) K[2])) (h k1 + k1 k2))/(
h^3 + 2 h^2 k1 + 2 h^2 k2 + 3 h k1 k2) - (h k2 + k1 k2)/(
h^3 + 2 h^2 k1 + 2 h^2 k2 + 3 h k1 k2)) +
CC0 (((1 - E^((-h - k1) K[2])) k1 k2)/(
h^3 + 2 h^2 k1 + 2 h^2 k2 + 3 h k1 k2) - (
E^(k1 K[2]) (h k2 + k1 k2))/(
h^3 + 2 h^2 k1 + 2 h^2 k2 + 3 h k1 k2) - (
h^2 + 2 h k1 + h k2 + k1 k2)/(
h^3 + 2 h^2 k1 + 2 h^2 k2 + 3 h k1 k2)) +
CA0 (-((k1 k2)/(h^3 + 2 h^2 k1 + 2 h^2 k2 + 3 h k1 k2)) - (
E^(k1 K[2]) (h k1 + k1 k2))/(
h^3 + 2 h^2 k1 + 2 h^2 k2 +
3 h k1 k2) + ((1 - E^((-h - k1) K[2])) (h^2 + h k1 +
2 h k2 + k1 k2))/(
h^3 + 2 h^2 k1 + 2 h^2 k2 + 3 h k1 k2)),
CB0 (((1 - E^((-h - k1 - k2) K[2])) (h + k1) (h + k2))/(
h^3 + 2 h^2 k1 + 2 h^2 k2 + 3 h k1 k2) - (
E^(k1 K[2]) (h k1 + k1 k2))/(
h^3 + 2 h^2 k1 + 2 h^2 k2 + 3 h k1 k2) - (
E^(k2 K[2]) (h k2 + k1 k2))/(
h^3 + 2 h^2 k1 + 2 h^2 k2 + 3 h k1 k2)) +
CC0 (-((E^(k1 K[2]) k1 k2)/(
h^3 + 2 h^2 k1 + 2 h^2 k2 +
3 h k1 k2)) + ((1 - E^((-h - k1 - k2) K[2])) (h k2 +
k1 k2))/(h^3 + 2 h^2 k1 + 2 h^2 k2 + 3 h k1 k2) - (
E^(k2 K[2]) (h^2 + 2 h k1 + h k2 + k1 k2))/(
h^3 + 2 h^2 k1 + 2 h^2 k2 + 3 h k1 k2)) +
CA0 (-((E^(k2 K[2]) k1 k2)/(
h^3 + 2 h^2 k1 + 2 h^2 k2 +
3 h k1 k2)) + ((1 - E^((-h - k1 - k2) K[2])) (h k1 +
k1 k2))/(h^3 + 2 h^2 k1 + 2 h^2 k2 + 3 h k1 k2) - (
E^(k1 K[2]) (h^2 + h k1 + 2 h k2 + k1 k2))/(
h^3 + 2 h^2 k1 + 2 h^2 k2 + 3 h k1 k2)),
CB0 (-((E^(k2 K[2]) (h + k1) (h + k2))/(
h^3 + 2 h^2 k1 + 2 h^2 k2 + 3 h k1 k2)) - (h k1 + k1 k2)/(
h^3 + 2 h^2 k1 + 2 h^2 k2 +
3 h k1 k2) + ((1 - E^((-h - k2) K[2])) (h k2 + k1 k2))/(
h^3 + 2 h^2 k1 + 2 h^2 k2 + 3 h k1 k2)) +
CC0 (-((k1 k2)/(h^3 + 2 h^2 k1 + 2 h^2 k2 + 3 h k1 k2)) - (
E^(k2 K[2]) (h k2 + k1 k2))/(
h^3 + 2 h^2 k1 + 2 h^2 k2 +
3 h k1 k2) + ((1 - E^((-h - k2) K[2])) (h^2 + 2 h k1 +
h k2 + k1 k2))/(
h^3 + 2 h^2 k1 + 2 h^2 k2 + 3 h k1 k2)) +
CA0 (((1 - E^((-h - k2) K[2])) k1 k2)/(
h^3 + 2 h^2 k1 + 2 h^2 k2 + 3 h k1 k2) - (
E^(k2 K[2]) (h k1 + k1 k2))/(
h^3 + 2 h^2 k1 + 2 h^2 k2 + 3 h k1 k2) - (
h^2 + h k1 + 2 h k2 + k1 k2)/(
h^3 + 2 h^2 k1 + 2 h^2 k2 + 3 h k1 k2))}/(
1 + h), {K[2], 1, t}],
CC2[t] ->
C[3] + Inactive[Integrate][
h.h.{CB0 (-((E^(k1 K[3]) (h + k1) (h + k2))/(
h^3 + 2 h^2 k1 + 2 h^2 k2 +
3 h k1 k2)) + ((1 - E^((-h - k1) K[3])) (h k1 + k1 k2))/(
h^3 + 2 h^2 k1 + 2 h^2 k2 + 3 h k1 k2) - (h k2 + k1 k2)/(
h^3 + 2 h^2 k1 + 2 h^2 k2 + 3 h k1 k2)) +
CC0 (((1 - E^((-h - k1) K[3])) k1 k2)/(
h^3 + 2 h^2 k1 + 2 h^2 k2 + 3 h k1 k2) - (
E^(k1 K[3]) (h k2 + k1 k2))/(
h^3 + 2 h^2 k1 + 2 h^2 k2 + 3 h k1 k2) - (
h^2 + 2 h k1 + h k2 + k1 k2)/(
h^3 + 2 h^2 k1 + 2 h^2 k2 + 3 h k1 k2)) +
CA0 (-((k1 k2)/(h^3 + 2 h^2 k1 + 2 h^2 k2 + 3 h k1 k2)) - (
E^(k1 K[3]) (h k1 + k1 k2))/(
h^3 + 2 h^2 k1 + 2 h^2 k2 +
3 h k1 k2) + ((1 - E^((-h - k1) K[3])) (h^2 + h k1 +
2 h k2 + k1 k2))/(
h^3 + 2 h^2 k1 + 2 h^2 k2 + 3 h k1 k2)),
CB0 (((1 - E^((-h - k1 - k2) K[3])) (h + k1) (h + k2))/(
h^3 + 2 h^2 k1 + 2 h^2 k2 + 3 h k1 k2) - (
E^(k1 K[3]) (h k1 + k1 k2))/(
h^3 + 2 h^2 k1 + 2 h^2 k2 + 3 h k1 k2) - (
E^(k2 K[3]) (h k2 + k1 k2))/(
h^3 + 2 h^2 k1 + 2 h^2 k2 + 3 h k1 k2)) +
CC0 (-((E^(k1 K[3]) k1 k2)/(
h^3 + 2 h^2 k1 + 2 h^2 k2 +
3 h k1 k2)) + ((1 - E^((-h - k1 - k2) K[3])) (h k2 +
k1 k2))/(h^3 + 2 h^2 k1 + 2 h^2 k2 + 3 h k1 k2) - (
E^(k2 K[3]) (h^2 + 2 h k1 + h k2 + k1 k2))/(
h^3 + 2 h^2 k1 + 2 h^2 k2 + 3 h k1 k2)) +
CA0 (-((E^(k2 K[3]) k1 k2)/(
h^3 + 2 h^2 k1 + 2 h^2 k2 +
3 h k1 k2)) + ((1 - E^((-h - k1 - k2) K[3])) (h k1 +
k1 k2))/(h^3 + 2 h^2 k1 + 2 h^2 k2 + 3 h k1 k2) - (
E^(k1 K[3]) (h^2 + h k1 + 2 h k2 + k1 k2))/(
h^3 + 2 h^2 k1 + 2 h^2 k2 + 3 h k1 k2)),
CB0 (-((E^(k2 K[3]) (h + k1) (h + k2))/(
h^3 + 2 h^2 k1 + 2 h^2 k2 + 3 h k1 k2)) - (h k1 + k1 k2)/(
h^3 + 2 h^2 k1 + 2 h^2 k2 +
3 h k1 k2) + ((1 - E^((-h - k2) K[3])) (h k2 + k1 k2))/(
h^3 + 2 h^2 k1 + 2 h^2 k2 + 3 h k1 k2)) +
CC0 (-((k1 k2)/(h^3 + 2 h^2 k1 + 2 h^2 k2 + 3 h k1 k2)) - (
E^(k2 K[3]) (h k2 + k1 k2))/(
h^3 + 2 h^2 k1 + 2 h^2 k2 +
3 h k1 k2) + ((1 - E^((-h - k2) K[3])) (h^2 + 2 h k1 +
h k2 + k1 k2))/(
h^3 + 2 h^2 k1 + 2 h^2 k2 + 3 h k1 k2)) +
CA0 (((1 - E^((-h - k2) K[3])) k1 k2)/(
h^3 + 2 h^2 k1 + 2 h^2 k2 + 3 h k1 k2) - (
E^(k2 K[3]) (h k1 + k1 k2))/(
h^3 + 2 h^2 k1 + 2 h^2 k2 + 3 h k1 k2) - (
h^2 + h k1 + 2 h k2 + k1 k2)/(
h^3 + 2 h^2 k1 + 2 h^2 k2 + 3 h k1 k2))}/(
1 + h), {K[3], 1, t}]}}
B={{k1+h,-k1,0},{-k1,h+k1+k2,-k2},{0,-k2,h+k2}}; C0={CA0,CB0,CC0}; C1[t_]:=h.(IdentityMatrix[3]-Exp[-B*t]).Inverse[B].C0; C2[t_]:={CA2[t],CB2[t],CC2[t]}; sol=DSolve[C2'[t]==h.C1[t]-B.C2'[t],C2[t],t]
More will be needed but perhaps this is a start. See if you can use the documentation to understand why each change might have been made. It worries me that you defined the functionC2[t]
and then you wantDSolve
to solve forC2[t]
$\endgroup$// MatrixForm
from everything - it's just a presentational form $\endgroup$DSolve[C2'[t]==h.C1[t]-B.C2'[t],{CA2[t], CB2[t], CC2[t]},t]
$\endgroup$