In Gali chapter 2 we have the following constraint to the classical monetary model
$P_t C_t + Q_t B_t \leq B_{t-1} + W_t N_t-T_t$.
Then it seems that this is treated as an equality. Therefore my question is: are we assumig that $\partial U/\partial B_t >0$? So households would achieve the optimun at the equality.
Another question is, in general if I have the problem
$Max E_0 \sum_{t=0}^{\infty}\beta^t U(C_t,N_t)$
Should I solve the OP
$Max \sum_{t=0}^{\infty}\beta^t U(C_t,N_t)$
And then take expectation to the relations I obtain by optimizing?. For example if we add the constraint
$P_t C_t + Q_t B_t \leq B_{t-1} + W_t N_t-T_t$ to the OPs, in the problem without expectation I get $Q_t=\beta \frac{\partial U/\partial C_{t+1}}{\partial U/\partial C_{t}} \frac{P_t}{P_{t+1}}$ and taking $E_t$ I obtain Euler's equation. Is the procedure of solving the problem without expectation and then take expectation correct?
EDIT: If it is incorrect to forget the expectation and optimize, then I am confused about this: How to relate real rate of return on capital to bond interest rate: Lagrangian . As there the procedure to solve the problem seems to forget the expectation.
Second, if I do $\frac{\partial }{\partial C_t}E[U]=E\left[\frac{\partial U}{\partial C_t}\right]$. I obtain $Q_t=\beta\frac{ E_0\left[\partial U/\partial C_{t+1} \right]}{E_0\left[\partial U/\partial C_{t} \right]}\frac{P_t}{P_{t+1}}$ because I can not get rid off $E_0$. Nevertheless this would be equivalent to $Q_t=\beta E_0 \left[\frac{\partial U/\partial C_{t+1} }{\partial U/\partial C_{t} }\right]\frac{P_t}{P_{t+1}}$ if $E_0 \left[ \frac{\partial U/\partial C_{t+1} }{\partial U/\partial C_{t} }\right]=\frac{ E_0\left[\partial U/\partial C_{t+1} \right]}{E_0\left[\partial U/\partial C_{t} \right]}$. Is this because $C_t$ is independent of $C_{t+1}$?.
Third, I realized that if I solve $Max \sum_{t=0}^{\infty}\beta^t E_tU(C_t,N_t)$ s.t the constraint as before and proceed with $\frac{\partial }{\partial C_t}E[U]=E\left[\frac{\partial U}{\partial C_t}\right]$ I obtain the correct Euler's equation. Is this the correct problem to optimize? but what about Gali's propose?