# DifferentialEquations.jl, Error: Exponentiation yielding a complex result requires a complex argument

**URL:** <https://discourse.julialang.org/t/differentialequations-jl-error-exponentiation-yielding-a-complex-result-requires-a-complex-argument/44935>\
**Category:** General Usage\
**Tags:** package\
**Created:** [August 14, 2020, 2:32pm UTC](https://discourse.julialang.org/t/differentialequations-jl-error-exponentiation-yielding-a-complex-result-requires-a-complex-argument/44935 "2020-08-14T14:32:57Z")\
**Posts on this page:** 1\
**Showing post:** 6

<div class="post-metadata">

**Author:** ![Gregers](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/gregers/32/17339_2.png) [@Gregers](https://discourse.julialang.org/u/Gregers)\
**Post date:** [August 17, 2020, 9:27am UTC](https://discourse.julialang.org/t/differentialequations-jl-error-exponentiation-yielding-a-complex-result-requires-a-complex-argument/44935/6 "2020-08-17T09:27:07Z")

</div>

Thanks mauro3 for your relpy.

Is i correct that `isoutofdomain=(u,p,t) -> any(x -> x < 0, u)` ensure that all variables to be within the positive domain?

If so, is there a way to specify that `u[2] > 0 and is free u[2]`?

---

_[View the full topic](https://discourse.julialang.org/t/differentialequations-jl-error-exponentiation-yielding-a-complex-result-requires-a-complex-argument/44935)._
