\documentclass[../Main.tex]{subfiles}
\graphicspath{{\subfix{Assets/img/}}}

\begin{document}
The Social (Fleet) Planner's problem can be written in the belman form as:
\begin{align}
    W(\vec s_t, D_t) =& \max_{\vec x_t} \left[
       \left(\sum^N_{i=1} u^i(\vec s_t, D_t) - F(x^i_t) \right)
    + \beta \left[ W(\vec s_{t+1}, D_{t+1}) \right]\right] \notag \\
     &\text{subject to:} \notag \\
     & s^i_{t+1} = (1-l^i(\vec s_t, D_t))s^i_t +x^i_t ~~~  \forall i \notag \\
     & D_{t+1} = (1-\delta)D_t + g(D_t) 
         + \gamma \sum^N_{i=1} l^i(\vec s_t, D_t)
         + \Gamma \sum^N_{i=1} x^i_t
\end{align}

The resulting $N$ optimality conditions are:
\begin{align}
    0 =& -\der{F(x^i_t)}{s^i_t}{}  
        + \beta \left[
            \nabla_{\vec s_{t+1}, D_{t+1}} W(\vec s_{t+1}, D_{t+1}) 
            \cdot
            \nabla_{\vec s_{t}, D_{t}}[\vec s_{t+1} ~ D_{t+1}]
            \right] 
        ~~\forall~~i \\
    0 =& -\vec f +\beta \left[B\cdot \nabla W_{t+1} \right]
\end{align}

And the $N+1$ envelope conditions are:
\begin{align}
    \nabla_{\vec s_{t}, D_{t}} W(\vec s_t, D_t) =& 
        \sum^N_{i=1} \nabla_{\vec s_{t}, D_{t}} u^i(\vec s_t, D_t) 
        %- \der{}{x^i_t}{}F(x^i_t) \nabla_{\vec s_{t}, D_{t}}x^i_t %This equals zero due to the envelope theorem
        \notag \\
        &+ \beta \left[ \nabla_{\vec s_{t+1}, D_{t+1}} W(\vec s_{t+1}, D_{t+1})
            \cdot \nabla_{\vec s_{t}, D_{t}} [\vec s_{t+1} ~ D_{t+1}]
    \right] \\
    \nabla W_t =& \vec U + \beta \left[C \cdot \nabla W_{t+1} \right] 
\end{align}

\end{document}
