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 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.