[latexpage] The method of resolution via partial derivatives solves only very simple intertemporal optimization problems. The Hansen’s program writes,
\begin{equation*}
\left\{
\begin{array}{c}
\max_{k_{t+1},h_{t}}\sum\nolimits_{0}^{\infty }\beta ^{t}\left( \ln
c_{t}+A\ln \left( 1-h_{t}\right) \right) \\
sc:f\left( \lambda _{t},k_{t},h_{t}\right) =\lambda _{t}\left( k_{t}\right)
^{\theta }\left( h_{t}\right) ^{1-\theta } \\
sc:k_{t+1}=\left( 1-\delta \right) k_{t}+i_{t} \\
sc:f\left( \lambda _{t},k_{t},h_{t}\right) \geq c_{t}+i_{t}%
\end{array}%
\right.
\end{equation*}
With partial derivatives, we have to inject in the utility function the constraints of the agent. In order to reduce the problem, we define $\omega$, the objective function and replace $c_{t}$,
\begin{eqnarray*}
\omega &=&\sum\beta ^{t}\left( \ln c_{t}+A\ln
\left( 1-h_{t}\right) \right) \\
&=&\sum\beta ^{t}\left( \ln \left( f\left(
\lambda _{t},k_{t},h_{t}\right) -i_{t}\right) +A\ln \left( 1-h_{t}\right)
\right) \\
&=&\sum\beta ^{t}\left( \ln \left( \lambda
_{t} k_{t} ^{\theta }h_{t} ^{1-\theta
}-k_{t+1}+\left( 1-\delta \right) k_{t}\right) +A\ln \left( 1-h_{t}\right)
\right)
\end{eqnarray*}
Thus, the optimization involves the quantities $k_{t+1}$ et $h_{t}$,
\begin{eqnarray*}
\quicklatex{size=12}
FOC &:&\frac{\partial \omega }{\partial k_{t+1}}=0 \\
&\Leftrightarrow &\frac{-\beta ^{t+1}}{\lambda _{t}k_{t}^{\theta
}h_{t}^{1-\theta }-k_{t+1}+\left( 1-\delta \right) k_{t}}+E_{t}\left\{ \frac{\beta
^{t+2}\left( \theta \lambda _{t+1}k_{t+1}^{\theta
-1}h_{t+1}^{1-\theta }+\left( 1-\delta \right) \right) }{\lambda
_{t+1}k_{t+1}^{\theta }h_{t+1}^{1-\theta }-k_{t+2}+\left( 1-\delta \right)
k_{t+1}}\right\} =0 \\
&\Leftrightarrow &\beta E_{t}\left\{ \frac{\theta \lambda
_{t+1}k_{t+1}^{\theta -1}h_{t+1}^{1-\theta }+\left( 1-\delta \right) }{%
\lambda _{t+1}k_{t+1}^{\theta }h_{t+1}^{1-\theta }-k_{t+2}+\left( 1-\delta
\right) k_{t+1}}\right\} =\frac{1}{\lambda _{t}k_{t}^{\theta
}h_{t}^{1-\theta }-k_{t+1}+\left( 1-\delta \right) k_{t}} \\
&\Leftrightarrow &\beta E_{t}\left\{ \frac{r_{t+1}+\left( 1-\delta \right) }{%
c_{t+1}}\right\} =\frac{1}{c_{t}}
\end{eqnarray*}
Concerning $h_{t}$,
\begin{eqnarray*}
\quicklatex{size=12}
FOC &:&\frac{\partial \omega }{\partial h_{t}}=0 \\
&\Leftrightarrow &\beta ^{t}\left( \frac{\left( 1-\theta \right) \lambda
_{t}k_{t}^{\theta }h_{t}^{-\theta }}{\lambda _{t}k_{t}^{\theta
}h_{t}^{1-\theta }-k_{t+1}+\left( 1-\delta \right) k_{t}}+\frac{-A}{1-h_{t}}%
\right) =0 \\
&\Leftrightarrow &\left( 1-\theta \right) \lambda _{t}\left( \frac{k_{t}}{%
h_{t}}\right) ^{\theta }\left( 1-h_{t}\right) =A\left( \lambda
_{t}k_{t}^{\theta }h_{t}^{1-\theta }-k_{t+1}+\left( 1-\delta \right)
k_{t}\right) \\
&\Leftrightarrow &w_{t}\left( 1-h_{t}\right) =Ac_{t}
\end{eqnarray*}
We find out our first-order conditions,
\begin{equation*}
\left\{
\begin{array}{c}
\beta E_{t}\left\{ \frac{r_{t+1}+\left( 1-\delta \right) }{c_{t+1}}\right\} =%
\frac{1}{c_{t}} \\
w_{t}\left( 1-h_{t}\right) =Ac_{t}%
\end{array}%
\right.
\end{equation*}