If I do an NDSolve of an IVP directly, everything works:

x[.5] /. NDSolve[{x[0] == 0, x'[t] == 1}, x, {t, 0, 1}][[1]]

But if I try to parametrise it, it doesn't

x[0][.5] /. ParametricNDSolve[{x[T] == 0, x'[t] == 1}, x, {t, T, T+1}, {T}][[1]]

I receive a ParametricNDSolve::ndsv: Cannot find starting value for the variable x. error. I cannot see what I'm doing wrong!? I guess this use of the parameter just isn't allowed?


ParametricNDSolve is not helpful in such cases. However, you can use NDSolve with a SetDelay,

sol[T_] := NDSolve[{x[T] == 0, x'[t] == 1}, x, {t, T, T + 1}];

yfun = First[x /. sol[0]];




Not the answer you're looking for? Browse other questions tagged or ask your own question.