Hot answers tagged


I think substituting a in the definition of int, which is called by a is trouble, and what you really need is to make sure int isn't evaluated when z[t] isn't a number. The following seems to work, albeit not very quickly: Clear[a]; f[t_] := Sin[t^2]; int[t_?NumericQ, z_?NumericQ] := NIntegrate[Exp[-f[t]*z*v^2], {v, 0, 1}]; a = NDSolve[{ x'[t] == -3*(x[...

Only top voted, non community-wiki answers of a minimum length are eligible