Integral equations in ModelingToolkit

Hi Everyone,

I’d like to know how/if the following integral equation can be solved in ModelingToolkit:

using ModelingToolkit
using DomainSets

@parameters t β γ
@variables S(..) I(..) R(..)
It = Integral(t in DomainSets.ClosedInterval(0,t))

eqs = [S(t) ~ S(0.) - It(β*S(t)*I(t)),
       I(t) ~ I(0.) + It(β*S(t)*I(t)) - It(γ*I(t)),
       R(t) ~ R(0.) + It(γ*I(t))];

I know it’s a trivial example that can be rewritten as ODEs, but knowing how to do this would open up a lot.

1 Like

NeuralPDE.jl should be able to do it now? Support for compound integrals by killah-t-cell · Pull Request #409 · SciML/NeuralPDE.jl · GitHub was what was required. Give it a try.