I have two sets of state variables, A and Ap, and I need to solve for P(t), which relates the two. The equation to do so is Ap = inv(P)*(A*P-d/dt(P)). Does anyone know how I can solve for P(t)? I am stumped because I am unsure as to how to handle the inverted matrix of P and the derivative of the P matrix.
A = [t 1; 1 t];
Ap = [0 1; 2-t^2 2*t];