Way to write the integral with ModelingToolkit

Hi @ChrisRackauckas I tried what you suggested but I am unable to discretize the equation, below is the code and the error. I am not sure where to pass the parameter x.

using NeuralPDE, Flux, ModelingToolkit, DiffEqFlux, DomainSets
import ModelingToolkit: Interval

@parameters t, x
@variables u(..)
lambda = -1.5
Di = Differential(t)
Ii = Integral(x in DomainSets.ClosedInterval(0, t))
eq = Di(u(t)) + Ii((t-x)^lambda*u(x)) ~ 1.0
bcs = [u(0.0) ~ 0.0]
domains = [t ∈ Interval(0.0,2.0)]
chain = Chain(Dense(1,15,Flux.σ),Dense(15,1))
initθ = Float64.(DiffEqFlux.initial_params(chain))

strategy_ = GridTraining(0.05)
discretization = PhysicsInformedNN(chain,
                                   strategy_;
                                   init_params = nothing,
                                   phi = nothing,
                                   derivative = nothing)
@named pde_system = PDESystem(eq,bcs,domains,[t],[u(t)])
prob = NeuralPDE.discretize(pde_system,discretization)
ERROR: KeyError: key :x not found