I am trying to solve a integrodifferential equation in Mathematica, i.e., I'm trying to find a way to evaluate the code below, which isn't yet supported in mathematica, as far as I understand.

n = 5;
V[t_] := RandomReal[1,{n,n}];
s = NDSolve[{M'[t] == Integrate[M[t-tau].V[tau].M[tau], {tau, 0, t}], 
    M[0] == IdentityMatrix[n]}, M[x], {x, 0, 1}];

I understand that one way would be to discretize $t$, which turns the above into an algebraic equation. But in the end I will have to deal with very large matrices, so perhaps there might be better ways of doing this that I am not aware of.

Most similar question I've found on this page, e.g.,https://mathematica.stackexchange.com/questions/13695/numerical-solution-of-a-differential-equation-with-nintegrate-coefficients, is concerned with integrodifferential equations that can just be turned into standard ODEs by differentiation, which is not the case here.

  • 1
    $\begingroup$ V[t_] := RandomReal[1,{n,n}]; and you're using this in NDSolve. Is it a stochastic equation? $\endgroup$
    – flinty
    Jul 24 '20 at 13:01
  • $\begingroup$ No, i was just making an example. V[t] is just some time dependent matrix $\endgroup$
    – Daniel
    Jul 26 '20 at 7:43

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.