# Dynamic programming problem and optimal solution

For the following problem $$\max_{(\tilde{c}_t,\tilde{a}_{t+1+s})}\sum_{s=0}^{\infty}\beta ^su(\tilde{c}_{t+s})$$

s.t. the following restrictions

$$$\begin{split} \tilde{c}_t&=(1-\delta )Y_t+a_t-\frac{\tilde{a}_{t+1}}{R_t}\\ \tilde{c}_{t+1+s}&=(1-\delta )Y_{t+1+s}^{e}+\tilde{a}_{t+1+s}-\frac{\tilde{a}_{t+2+s}}{R_{t+1+s}}, \forall s \geq 0 \end{split}$$$

where:

$\tilde{c}_t$: Consumption at time $t$

$\tilde{a}_t$: Financial wealth at time $t$

$Y_t$: Income at time $t$

$R_t$: Nominal interest rate at time $t$

$Y_t^e$: Expected income at time $t$

Consider that $u(\tilde{c}_{t+s})$ is defined by the isoelastic utility function: $u(\tilde{c}_{t+s})=\frac{\tilde{c}_{t+s}^{1-\frac{1}{\sigma}}-1}{1-\frac{1}{\sigma}}$

Find the optimal policy function for $\tilde{c}_t$.

I guess the natural procedure is first forming the lagrangian

$$$L=\sum_{s=0}^{\infty}\beta ^s\frac{\tilde{c}_{t+s}^{1-\frac{1}{\sigma}}-1}{1-\frac{1}{\sigma}}+\sum_{t=0}^{\infty}\lambda _t \left [ \tilde{c}_t- (1-\delta )Y_t-a_t+\frac{\tilde{a}_{t+1}}{R_t} \right ]+\sum_{t=0}^{\infty}\pi _t\left [ \tilde{c}_{t+1+s}-(1-\delta )Y_{t+1+s}^{e}-\tilde{a}_{t+1+s}+\frac{\tilde{a}_{t+2+s}}{R_{t+1+s}} \right ]$$$

but then, what would be the FOC? these?

$$$\frac{\partial L}{\partial \tilde{c}_{t}}=\frac{\partial L}{\partial \tilde{c}_{t+s}}=\frac{\partial L}{\partial \tilde{a}_{t+1+s}}=\frac{\partial L}{\partial \tilde{a}_{t+2+s}}=0$$$