# Troubleshooting Instability for Tsit5

**URL:** https://discourse.julialang.org/t/troubleshooting-instability-for-tsit5/99572
**Category:** New to Julia
**Created:** [May 29, 2023, 4:39pm UTC](https://discourse.julialang.org/t/troubleshooting-instability-for-tsit5/99572 "2023-05-29T16:39:26Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![yoshi](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/yoshi/32/38259_2.png) [@yoshi](https://discourse.julialang.org/u/yoshi)
#### Post date: [May 29, 2023, 4:39pm UTC](https://discourse.julialang.org/t/troubleshooting-instability-for-tsit5/99572/1 "2023-05-29T16:39:26Z")

</div>

I’m running Tsit5 on a system of equations and it is returning an instability warning and terminating the computation. I can see that there are NaN’s in one of the internal stages of the last value. I don’t know too much about how the internal stages are computed for Tsit5’s steps. Where is the github code that explicitly shows how these are computed? And is there some documentation that outlines what the steps are?

thanks!

---

<div class="post-metadata">

### Author: ![Oscar\_Smith](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/oscar_smith/32/25343_2.png) [@Oscar\_Smith](https://discourse.julialang.org/u/Oscar_Smith)
#### Post date: [May 29, 2023, 5:08pm UTC](https://discourse.julialang.org/t/troubleshooting-instability-for-tsit5/99572/2 "2023-05-29T17:08:16Z")

</div>

Is the problem stiff? If so, you are very likely better off with an implicit integrator such as `Rodas5P`.

---

<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: [May 29, 2023, 5:11pm UTC](https://discourse.julialang.org/t/troubleshooting-instability-for-tsit5/99572/3 "2023-05-29T17:11:22Z")

</div>

Steps are detailed in:

[![](https://global.discourse-cdn.com/julialang/original/3X/5/d/5d8be9be2d861eecc910a9bdda15b5b546dd839f.jpeg "How to debug Julia simulation codes (ODEs, optimization, etc.!)") ](https://www.youtube.com/watch?v=g-iOOhh2U6o)

---

<div class="post-metadata">

### Author: ![yoshi](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/yoshi/32/38259_2.png) [@yoshi](https://discourse.julialang.org/u/yoshi)
#### Post date: [May 29, 2023, 5:27pm UTC](https://discourse.julialang.org/t/troubleshooting-instability-for-tsit5/99572/4 "2023-05-29T17:27:35Z")

</div>

Rodas also crashes, makes it a little further though. Yes, there are multiple time scales in my simulation
