# Information on auto-switching solvers

**URL:** <https://discourse.julialang.org/t/information-on-auto-switching-solvers/27853>\
**Category:** Modelling & Simulations\
**Created:** [August 22, 2019, 3:29pm UTC](https://discourse.julialang.org/t/information-on-auto-switching-solvers/27853 "2019-08-22T15:29:24Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![jamblejoe](https://avatars.discourse-cdn.com/v4/letter/j/ee7513/32.png) [@jamblejoe](https://discourse.julialang.org/u/jamblejoe)\
**Post date:** [August 22, 2019, 3:29pm UTC](https://discourse.julialang.org/t/information-on-auto-switching-solvers/27853/1 "2019-08-22T15:29:24Z")

</div>

Hi,  
I just want to know more about how the auto-switching algorithms in `DifferentialEquations` work. For example,

- when do they switch from non-stiff to stiff solver ?
- when do they switch back ?
- what happens to switching, when the corresponding integrator object is reinitialized by calling `reinit!`

Can someone point me to where I can find this information?  
Thanks in advance,

jamble

---

<div class="post-metadata">

**Author:** ![ChrisRackauckas](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/chrisrackauckas/32/77_2.png) [@ChrisRackauckas](https://discourse.julialang.org/u/ChrisRackauckas)\
**Post date:** [August 22, 2019, 3:55pm UTC](https://discourse.julialang.org/t/information-on-auto-switching-solvers/27853/2 "2019-08-22T15:55:57Z")

</div>

They use an internal Jacobian eigenvalue estimate to estimate the stiffness. They switch back and forth depending on the choice of switcher method in the `CompositeAlgorithm`, which for things like `AutoTsit5` assumes the other method is for stiff equations and thus switches back and forth depending on whether it’s detecting stiffness. It’s a single integrator dual cache object so `fsalfirst` is shared, meaning that there’s no reinitialization happening with a switch. The best thing to do right now is to look at the code. We’ll try and write it down probably within a year.

---

<div class="post-metadata">

**Author:** ![jamblejoe](https://avatars.discourse-cdn.com/v4/letter/j/ee7513/32.png) [@jamblejoe](https://discourse.julialang.org/u/jamblejoe)\
**Post date:** [September 4, 2019, 9:11pm UTC](https://discourse.julialang.org/t/information-on-auto-switching-solvers/27853/3 "2019-09-04T21:11:26Z")

</div>

Sorry for the late response - been busy! Having documentation of this would be great, but for now looking at the code will be fine 🙂
