# Zero division problem

**URL:** <https://brian.discourse.group/t/zero-division-problem/893>\
**Category:** Support\
**Tags:** synapses, equations\
**Created:** [30 January 2023 15:02 UTC](https://brian.discourse.group/t/zero-division-problem/893 "2023-01-30T15:02:41Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![mstimberg](https://yyz2.discourse-cdn.com/free1/user_avatar/brian.discourse.group/mstimberg/32/11_2.png) [@mstimberg](https://brian.discourse.group/u/mstimberg)\
**Post date:** [31 January 2023 17:40 UTC](https://brian.discourse.group/t/zero-division-problem/893/2 "2023-01-31T17:40:13Z")

</div>

Hi @Arina_Belova. Unfortunately, I did not yet have time to look into this issue in more detail, but sometimes the analytical solutions (generated by using `method='exact'`) can contain terms that create a division by zero for some parameter values. A typical example would be when you have two time constants (e.g. `tau_1` and `tau_2` in your example) with the same values – or of course when one of the time constants is zero. I don’t see anything obvious like this in your equations, though.

As a workaround, you can change the integration method to e.g. `method='rk2'`, this will probably make the error go away.

For debugging, the technique I mention in this comment could be helpful: [ZeroDivisionError: float division - #2 by mstimberg](https://brian.discourse.group/t/zerodivisionerror-float-division/519/2)

---

_[View the full topic](https://brian.discourse.group/t/zero-division-problem/893)._
