1

I would like to solve a list of equation with NDSolve with each equation having a different StartingStepSize. When I tried naively to use a table in the option NDSolve gave me an error. The only workaround I found is the solution given in this thread. However it would force me to rewrite a lot of my actual code. Does anyone know if it is possible to add a table in the options of NDSolve, or doing something equivalent?

Free_ion
  • 58
  • 7

1 Answers1

2

You could use Map

step={0.001,0.01,.1}; (* starting stepsize *) 
Map[NDSolve[{x'[t]==-x[t],x[0]==1},x,{t,0,10},StartingStepSize->#]&,step]

which gives you a list of solutions for a given ode with different stepsize!

For a list of odes MapThread[NDSolve[#1, StartingStepSize -> #2] &, {odes, step}] solves your problem.

Ulrich Neumann
  • 53,729
  • 2
  • 23
  • 55