# How to autodifferentiate the results of NLsolve?

**URL:** https://discourse.julialang.org/t/how-to-autodifferentiate-the-results-of-nlsolve/65680
**Category:** General Usage
**Tags:** autodiff
**Created:** [August 2, 2021, 1:22pm UTC](https://discourse.julialang.org/t/how-to-autodifferentiate-the-results-of-nlsolve/65680 "2021-08-02T13:22:48Z")
**Posts on this page:** 1
**Showing post:** 16

<div class="post-metadata">

### Author: ![Tamas\_Papp](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tamas_papp/32/25949_2.png) [@Tamas\_Papp](https://discourse.julialang.org/u/Tamas_Papp)
#### Post date: [August 5, 2021, 12:24pm UTC](https://discourse.julialang.org/t/how-to-autodifferentiate-the-results-of-nlsolve/65680/16 "2021-08-05T12:24:47Z")

</div>

Also, this univariate worked example may help to get you started:

> [@ChainRulesCore and ForwardDiff](https://discourse.julialang.org/t/chainrulescore-and-forwarddiff/61705/3):
>
> Thanks. I managed to adapt the docs example to use the frule with ForwardDiff. This MWE uses bisection (to keep it simple) to solve x^{\varepsilon\_1} + x^{\varepsilon\_2} = \theta \qquad \varepsilon\_1, \varepsilon\_2, \theta \> 0 If it sees ForwardDiff.Dual, it just invokes the frule. This works and I don’t see any obvious problems with inference, but suggestions to improve how I hook into ForwardDiff are welcome (the rest is really just an MWE). using ForwardDiff, ChainRulesCore, FiniteDiffer…

---

_[View the full topic](https://discourse.julialang.org/t/how-to-autodifferentiate-the-results-of-nlsolve/65680)._
