# ForwardDiff evaluation of objective in Optim returns wrong result (objective uses DifferentialEquations pkg)

**URL:** <https://discourse.julialang.org/t/forwarddiff-evaluation-of-objective-in-optim-returns-wrong-result-objective-uses-differentialequations-pkg/54624>\
**Category:** Optimization (Mathematical)\
**Tags:** diffeq, optim, optimization, forwarddiff\
**Created:** [February 4, 2021, 3:44pm UTC](https://discourse.julialang.org/t/forwarddiff-evaluation-of-objective-in-optim-returns-wrong-result-objective-uses-differentialequations-pkg/54624 "2021-02-04T15:44:47Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![odow](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/odow/32/28685_2.png) [@odow](https://discourse.julialang.org/u/odow)\
**Post date:** [February 4, 2021, 6:46pm UTC](https://discourse.julialang.org/t/forwarddiff-evaluation-of-objective-in-optim-returns-wrong-result-objective-uses-differentialequations-pkg/54624/2 "2021-02-04T18:46:47Z")

</div>

Please read the first part of this post: [Please read: make it easier to help you](https://discourse.julialang.org/t/psa-make-it-easier-to-help-you/14757).

You should provide a minimal working example.

---

_[View the full topic](https://discourse.julialang.org/t/forwarddiff-evaluation-of-objective-in-optim-returns-wrong-result-objective-uses-differentialequations-pkg/54624)._
