Log-linearisation Euler Consumption Equation I am trying to log-linearize the Euler consumption equation in Gali's book. He says:


  A log-linear approximation of $Q_{t}= \beta E_{t}[(\frac{C_{t+1}}{C_{t}})^{-\sigma}(\frac{Z_{t+1}}{Z_{t}})(\frac{P_{t}}{P_{t+1}})]$ (1)


I spent all of last night trying to learn log-linearization so this might be why my answer isn't correct but here is my attempt:

I re-write $Q_{t}=\frac{1}{1+i_{t}}$ and thus (1) becomes:

$1= \beta E_{t}[(1+i_{t})(\frac{C_{t+1}}{C_{t}})^{-\sigma}(\frac{Z_{t+1}}{Z_{t}})(\frac{P_{t}}{P_{t+1}})]$

Taking logs of both sides (I'm assuming I can ignore the expectation operator, although I'm not really sure why):

$0=ln(\beta) + ln(1+i_{t})- \sigma[ln(c_{t+1}) - ln(c_{t})] + ln(z_{t+1}) - ln(z_{t}) + ln(P_{t}) - ln(P_{t+1})]$ (2)

Approximating around the steady state values:

$0=ln(\beta) + ln(1+i^{*})+(\frac{1}{1+i^{*}})(i_{t}-i^{*})- \sigma[ln(c^{*})+(\frac{1}{c^{*}})(c_{t+1}-c^{*}) - ln(c^{*}) - (\frac{1}{c^{*}})(c_{t}-c^{*})] + ln(z^{*}) + (\frac{1}{z^{*}})(z_{t+1}-z^{*}) - ln(z^{*}) - (\frac{1}{z^{*}})(z_{t}-z^{*})+ ln(P^{*}) + (\frac{1}{P^{*}})(P_{t}-P^{*}) - ln(P^{*}) - (\frac{1}{P^{*}})(P_{t+1}-P^{*})$

That was quite messy but hopefully you see what I am doing, a simple first order approximation around the steady state. Next I used equation (2) to cancel some terms. I was left with:

$(\frac{1}{1+i^{*}})(i_{t}-i^{*})- \sigma(\frac{1}{c^{*}})(c_{t+1}-c^{*}) +  \sigma(\frac{1}{c^{*}})(c_{t}-c^{*}) + (\frac{1}{z^{*}})(z_{t+1}-z^{*}) - (\frac{1}{z^{*}})(z_{t}-z^{*})  + (\frac{1}{P^{*}})(P_{t}-P^{*}) -  (\frac{1}{P^{*}})(P_{t+1}-P^{*}) = 0$ 

Re-writing in terms of deviations from steady state:

$\tilde i_{t} - \sigma \tilde c_{t+1} + \sigma \tilde c_{t} + \tilde z_{t+1} - \tilde z_{t} + \tilde p_{t} -  \tilde p_{t+1} = 0$

I can re-arrange this in terms of $\tilde c_{t}$ and put in expectation operators but my answer does not match with Gali's. He says:


  $c_{t} = E[c_{t+1}] + \frac{1}{\sigma}(i_{t} - E_{t}[\pi_{t+1}] - \rho) + \frac{1}{\sigma}(1-\rho _{z})z_{t} $


First of all, I don't understand where $\rho$ came from since it is not in (1). Furthermore, am I making a mistake in my linear approximation? Should I not have used (2) to cancel terms?

I just learned log-linearization so my method might be quite naive. I simply "logged" both sides, used first order Taylor approximation around steady state, cancelled terms from the "logging" step and solved for consumption.

Any assistance is greatly appreciated!
To simplify matters, let's call the right-hand side of your starting equation $X_t$ Then, I start just like you did with

$1 = X_t$

The difference between your solution and Gali's is that you took the Taylor expansion around

$\log(1)=0=log(X_t)$  which implies that also the steady state equals 0, so we can simply subtract it to get log-differences,

whereas Gali used

$1 = \exp(\log(X_t))$ with steady state $1=\exp(\log(X^*))$

Let's define $x_t=\log(X_t)$.

By definition of the Taylor expansion this gives

$T(1) = \exp(x^*)+\exp(x^*)(x_t-x^*)$ 

Note that the exponential function is identical to its derivative. We know that $\exp(x^*)=1$ from above, so we can simplify to 

$T(1)=1+(x_t-x^*)$ 

At this point, you are correct that the $\rho$ cancel out. Instead of defining $\hat{x}_t=x_t-x^*$ but Gali chooses to replace $\rho=\pi +\sigma \gamma-i$, which is the steady state condition, which is why $\rho$ stays on the paper. 

Note, however, that the "approximation error" from taking log differences instead of Gali's approach is tiny, i.e. for $\beta=0.99$ it is only $-\log(0.99)\approx 0.01$

Have a look at appendix 2.1 of Gali's book! It is quite complicated, but together with this post, I hope you get it!