# DifferentialEquations.jl inputting out of domain value

**URL:** https://discourse.julialang.org/t/differentialequations-jl-inputting-out-of-domain-value/70501
**Category:** General Usage
**Tags:** package, diffeq, differentialequation
**Created:** [October 27, 2021, 7:01pm UTC](https://discourse.julialang.org/t/differentialequations-jl-inputting-out-of-domain-value/70501 "2021-10-27T19:01:23Z")
**Posts on this page:** 1
**Showing post:** 2

<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: [October 29, 2021, 2:26pm UTC](https://discourse.julialang.org/t/differentialequations-jl-inputting-out-of-domain-value/70501/2 "2021-10-29T14:26:43Z")

</div>

> [@hellmrf](#):
>
> How can I tell OrdinaryDiffEq.jl the domain of my function?

There has a lot been written on this, so you might want to just read the docs on it.

[https://diffeq.sciml.ai/stable/basics/common\_solver\_opts/#Miscellaneous](https://diffeq.sciml.ai/stable/basics/common_solver_opts/#Miscellaneous)

> - `isoutofdomain` : Specifies a function `isoutofdomain(u,p,t)` where, when it returns true, it will reject the timestep. Disabled by default.

[https://diffeq.sciml.ai/stable/features/callback\_library/#PositiveDomain](https://diffeq.sciml.ai/stable/features/callback_library/#PositiveDomain)

If these “fail”, see

[https://diffeq.sciml.ai/stable/basics/faq](https://diffeq.sciml.ai/stable/basics/faq) see " [My ODE goes negative but should stay positive, what tools can help?](https://diffeq.sciml.ai/stable/basics/faq/#My-ODE-goes-negative-but-should-stay-positive,-what-tools-can-help?)".

Also,

> [@PSA: How to help yourself debug differential equation solving issues](https://discourse.julialang.org/t/psa-how-to-help-yourself-debug-differential-equation-solving-issues/62489):
>
> Debugging differential equation solver issues almost always boils down to doing the same thing, so this is a summary to help you out. For more information on specific issues, check out the FAQ section of the DifferentialEquations.jl documentation which highlights common issues and questions: [https://diffeq.sciml.ai/dev/basics/faq/](https://diffeq.sciml.ai/dev/basics/faq/)How do I debug why the differential equation solver is diverging? dt \<= dtmin. Aborting. There is either an error in your model specification or the true solution i…

---

_[View the full topic](https://discourse.julialang.org/t/differentialequations-jl-inputting-out-of-domain-value/70501)._
