# 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:** 5

<div class="post-metadata">

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

</div>

You still need to make sure that the objective function does not error when it goes negative, see [Using DiffEq isoutofdomain to enforce positivity - #2 by ChrisRackauckas](https://discourse.julialang.org/t/using-diffeq-isoutofdomain-to-enforce-positivity/42443/2).

---

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