# Status of integration, optimization, and nl solvers

**URL:** https://discourse.julialang.org/t/status-of-integration-optimization-and-nl-solvers/60025
**Category:** Numerics
**Tags:** question
**Created:** [April 26, 2021, 10:55am UTC](https://discourse.julialang.org/t/status-of-integration-optimization-and-nl-solvers/60025 "2021-04-26T10:55:07Z")
**Posts on this page:** 1
**Showing post:** 14

<div class="post-metadata">

### Author: ![amrods](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/amrods/32/2543_2.png) [@amrods](https://discourse.julialang.org/u/amrods)
#### Post date: [April 30, 2021, 4:08am UTC](https://discourse.julialang.org/t/status-of-integration-optimization-and-nl-solvers/60025/14 "2021-04-30T04:08:50Z")

</div>

It’s a Nash bargaining problem of time of retirement for couples (Honoré & de Paula 2018). The optimization problem is

\max \_{t\_{1}, t\_{2}}\left(\int\_{0}^{t\_{1}} K\_{1} e^{-\rho s} d s+\int\_{t\_{1}}^{\infty} H\_{1}\left(s, {x}\_{1}\right) D\left(s, t\_{2}\right) e^{-\rho s} d s-A\_{1}\right) \\ \quad \times\left(\int\_{0}^{t\_{2}} K\_{2} e^{-\rho s} d s+\int\_{t\_{2}}^{\infty} H\_{2}\left(s, {x}\_{2}\right) D\left(s, t\_{1}\right) e^{-\rho s} d s-A\_{2}\right)

where D\left(s, t\_{j}\right)=(\delta-1) \mathbb{1}\left(s \geq t\_{j}\right)+1. The objective function simplifies to

\begin{aligned} N\left(t\_{1}, t\_{2}\right)=& \overbrace{\left(K\_{1} \rho^{-1}\left(1-e^{-\rho t\_{1}}\right)+\widetilde{H}\_{1}\left(t\_{1}, {x}\_{i}\right)+(\delta-1) \widetilde{H}\_{1}\left(\max \left\{t\_{1}, t\_{2}\right\}, {x}\_{1}\right)-A\_{1}\right)}^{\equiv I} \\ & \times \underbrace{\left(K\_{2} \rho^{-1}\left(1-e^{-\rho t\_{2}}\right)+\widetilde{H}\_{2}\left(t\_{2}, {x}\_{2}\right)+(\delta-1) \widetilde{H}\_{2}\left(\max \left\{t\_{1}, t\_{2}\right\}, {x}\_{2}\right)-A\_{2}\right)}\_{\equiv I I} \end{aligned}

with \widetilde{H}\_{i}\left(t, {x}\_{i}\right)=\int\_{t}^{\infty} H\_{i}\left(s, {x}\_{i}\right) e^{-\rho s} d s.  
There are 3 cases of FOC to maximize that objective function: when t^\*\_1 \< t^\*\_2, when t^\*\_1 \> t^\*\_2 and when t^\*\_1 = t^\*\_2. There are known bounds on t^\*\_1, t^\*\_2 for each of those cases.

In [another post](https://discourse.julialang.org/t/how-to-pass-constraints-in-nlsolve/60219) I ask about how to solve those FOC with `NLsolve` by supplying those theoretical bounds on the optimal values t^\*\_1, t^\*\_2. I’d appreciate any suggestion you may have.

---

_[View the full topic](https://discourse.julialang.org/t/status-of-integration-optimization-and-nl-solvers/60025)._
