First, attach the code, and I will raise my questions after the code.
{r = 22, l = 2 10^-1, c = 1 10^-4, vi = 24, initvalueil = 0,
initvaluevc = 0, tstart = 0, tend = 0.08, limitdt = 0.0001,
error = 0.0019152};
\[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];
S2 = Inverse[DiagonalMatrix[{1, 1}] - dt*A];
STAR1 = S1 . G . (B*vi + G . B*\[CapitalDelta]vi/dt) -
G . (B*(vi + \[CapitalDelta]vi) + G . B*\[CapitalDelta]vi/dt);
STAR2 = S2 . G . (B*vi + G . B*\[CapitalDelta]vi/dt) -
G . (B*(vi + \[CapitalDelta]vi) + G . B*\[CapitalDelta]vi/dt);
X0 = {0, 0};
X[t_] :=
Simplify[(MatrixPower[S1, i] - MatrixPower[S2, i]) .
X0 + (DiagonalMatrix[{1, 1}] . (DiagonalMatrix[{1, 1}] -
MatrixPower[S1, i]) .
Inverse[DiagonalMatrix[{1, 1}] - S1]) .
STAR1 - (DiagonalMatrix[{1, 1}] . (DiagonalMatrix[{1, 1}] -
MatrixPower[S2, i]) .
Inverse[DiagonalMatrix[{1, 1}] - S2]) . STAR2] /. {i ->
t/dt};
ilerror = X[t][[1]];
ContourPlot[
Abs[ilerror] == error, {t, tstart, tend}, {dt, 0, limitdt},
ContourShading -> None, PlotPoints -> 50, FrameLabel -> Automatic,
Epilog -> {PointSize[Large], Red,
Point[{t, dt} /. {t -> 0.00899448, dt -> 0.00006}]}]
condequal = Abs[ilerror] == error;
dilt = D[condequal, t];
Solve[dilt == 0, t]
Since error has been assigned a value of 0.0019152, condequal can be considered as the relationship between dt and t. Therefore, I want to take the derivative of t through condequal to obtain the value of the corresponding extreme point t when dt obtains its extreme value. But Solve instruction cannot solve correctly in the code, how can I modify the code?