I have the following optimisation problem:
max $E_{0}\sum_{t=0}^{\infty}[log(c_{t}) + log(m_{t})]$ subject to $y + \frac{M_{t-1}}{p_{t}} + R_{t-1}\frac{B_{t-1}}{p_{t}} = c_{t} + m_{t}+b_{t}+\tau_{t}$
Where lower case letters indicate real variables and $R$ is the gross nominal interest rate.
I am trying to solve this using the value function approach but I am having a difficult time understanding what the state variable should be in this case. I tried using wealth as the state and formulated the following value function:
$V(a_{t}) = \max_{c_{t}, m_{t},b_{t}} [u(c_{t},m_{t}) + \beta V(a_{t+1})]$
where $a_{t} = y+ \frac{M_{t-1}}{p_{t}} + R_{t-1}\frac{B_{t-1}}{p_{t}} $ and initial values are assumed to be given. My problem now is that I don't know what to substitute for $a_{t+1}$. I have tried forwarding the left-hand side of the budget constraint (i.e $a_{t+1} = y + \frac{m_{t}}{\pi_{t+1}} + R_{t} \frac{b_{t}}{\pi_{t+1}})$ and then differentiating w.r.t c,m and b but my results are very strange. Furthermore, if I have understood correctly, I also have to find $V_{a}(a_{t})$ which I cannot do with this substitution.
I am trying to learn this using Walsh's book and in his example, the budget constraint has capital which appears on both sides of the budget constraint, this allows him to re-write capital as a function of $a_{t}$. I tried to do the same but with real balances;
From the budget constraint I can write $m_{t} = a_{t}-c_t-b_t-\tau_t$
So, $V(a_{t}) = [u(c_{t},m_{t}) + \beta V(y + \frac{a_{t}-c_t-b_t-\tau_t}{\pi_{t+1}}) + R_{t} \frac{b_{t}}{\pi_{t+1}} ]$
Again I differentiate w.r.t c,m and b and this time my results are looking less crazy but still not correct. I get:
(c) $u_{c} - \beta V_{a}(a_{t+1})[\frac{1}{\pi_{t+1}}] = 0$
(m) $u_m + \beta V_{a}(a_{t+1})[\frac{1}{\pi_{t+1}}] = 0$
(b) $\beta V_{a}(a_{t+1})[\frac{R_{t}}{\pi_{t+1}} - \frac{1}{\pi_{t+1}}] = 0$
And lastly, $V_{a}(a_{t}) = \beta V_{a}(a_{t+1})[\frac{1}{\pi_{t+1}}] $
The final condition implies that $u_{c} = V_{a}(a_{t})$ which is similar to Walsh's answer but I can't seem to obtain a form of the Fisher equation and money demand function from my workings.
There is also the equilibrium condition $c_{t} = y-g$ but I have no idea when to impose it.
Any thoughts on what I have done incorrectly?