May I ask if the logarithmic algorithm is applicable to matrices or vectors? In the formula, Part A is a matrix and Part B is a vector. I want to split it into two parts, but the running result is incorrect. How can I modify it?
{r = 22, l = 2 10^-1, c = 1 10^-4, vi = 24};
\[CapitalDelta]vi = 0;
A = {{0, -1/l}, {1/c, -1/(r c)}};
G = Inverse[A];
B = {1/l, 0};
S1 = Inverse[DiagonalMatrix[{1, 1}] - dt*A + 1/2*dt*dt*A . A];
STAR1 = S1 . G . (B*vi + G . B*\[CapitalDelta]vi/dt) -
G . (B*(vi + \[CapitalDelta]vi) + G . B*\[CapitalDelta]vi/dt);
X0 = {0, 0};
a1 = Log[
MatrixPower[S1,
t/dt] . (MatrixLog[S1] . X0/dt -
Inverse[DiagonalMatrix[{1, 1}] - S1] . STAR1 . MatrixLog[S1]/
dt)];
a2 = Log[MatrixPower[S1, t/dt]] +
Log[MatrixLog[S1] . X0/dt -
Inverse[DiagonalMatrix[{1, 1}] - S1] . STAR1 . MatrixLog[S1]/
dt];
a1 /. {t -> 0.008995439102590038`, dt -> 0.00006}
a2 /. {t -> 0.008995439102590038`, dt -> 0.00006}