Break line within array or eqnarray
Solution 1
The environment align
is probably the way to go here:
\documentclass[12pt]{article}
\usepackage{amsmath}
\begin{document}
\begin{align}
\lambda_{R,t} &= \dfrac{(C_{R,t}-\phi_c C_{R,t-1})^{-\sigma}}
{P_t(1+\tau_t^c)} - \phi_c \beta \dfrac{(E_t C_{R,t+1}-\phi_c C_{R,t})^{-
\sigma}}{P_t(1+\tau_t^c)} \\
Q_t &= \beta E_t{(1-\delta)Q_{t+1} + \lambda_{R,t+1}R_{t+1}U_{t+1}(1-
\tau^k_{t+1})} \\
& - \lambda_{R,t+1}P_{t+1} \left[\Psi_1(U_t-1) + \dfrac{\Psi_2}
{2}(U_t-1)^2 \right] \nonumber
\end{align}
\end{document}
You also have to use \nonumber
in order to avoid having three equation numbers.
Hope that helps.
Romain
Solution 2
Another suggestion, with the aligned
environment. You should not use eqnarray
as it leads to bad spacing around the alignment points.
\documentclass[12pt]{article}
\usepackage{mathtools}
\begin{document}
\begin{align}
\lambda_{R,t} &= \dfrac{(C_{R,t}-\phi_c C_{R,t-1})^{-\sigma}}
{P_t(1+\tau_t^c)} - \phi_c \beta \dfrac{(E_t C_{R,t+1}-\phi_c C_{R,t})^{-
\sigma}}{P_t(1+\tau_t^c)} \\[1ex]
Q_t &=\raisetag{3.7ex} \begin{aligned}[t]
\beta E_t{(1-\delta)Q_{t+1} + \lambda_{R,t+1}R_{t+1}U_{t+1}(1-
\tau^k_{t+1})} & \hspace*{5cm}\\
- \lambda_{R,t+1}P_{t+1} \Bigl[\Psi_1(U_t-1) + \dfrac{\Psi_2}
{2}(U_t-1)^2 \Bigr]
\end{aligned}
\end{align}
\end{document}
Solution 3
You can use split
inside align
(never use eqnarray
)
\documentclass{article}
\usepackage{amsmath}
\begin{document}
\begin{align}
\lambda_{R,t} &=
\frac{(C_{R,t}-\phi_c C_{R,t-1})^{-\sigma}}{P_t(1+\tau_t^c)}
- \phi_c \beta \frac{(E_t C_{R,t+1}-\phi_c C_{R,t})^{-\sigma}}{P_t(1+\tau_t^c)}
\\[1ex]
\begin{split}
Q_t &=
\beta E_t{(1-\delta)Q_{t+1} + \lambda_{R,t+1}R_{t+1}U_{t+1}(1-\tau^k_{t+1})}
\\
&\qquad
- \lambda_{R,t+1}P_{t+1} \Bigl[\Psi_1(U_t-1) + \frac{\Psi_2}{2}(U_t-1)^2 \Bigr]
\end{split}
\end{align}
\end{document}
I used \Bigl
and \Bigr
because the size chosen by \left and
\rightseems too large for this formula. The
[1ex]` helps in distinguishing between the two formulas.
Related videos on Youtube
TRa
Updated on May 22, 2020Comments
-
TRa over 3 years
I have used the following codes to generate two equations. However, the second equation overlaps with the equation index. Can someone please help me look it pretty by breaking the 2nd equation into two lines? By the way, I also read on stackexchange to avoid eqnarray and instead use "array". Could you help me with that too? Apparently, using these codes within array resulted in error.
\begin{eqnarray} \lambda_{R,t} &=& \dfrac{(C_{R,t}-\phi_c C_{R,t-1})^{-\sigma}} {P_t(1+\tau_t^c)} - \phi_c \beta \dfrac{(E_t C_{R,t+1}-\phi_c C_{R,t})^{- \sigma}}{P_t(1+\tau_t^c)} \\ Q_t &=& \beta E_t{(1-\delta)Q_{t+1} + \lambda_{R,t+1}R_{t+1}U_{t+1}(1- \tau^k_{t+1})} - \lambda_{R,t+1}P_{t+1} \left[\Psi_1(U_t-1) + \dfrac{\Psi_2} {2}(U_t-1)^2 \right] \end{eqnarray}
-
AML over 5 years
-
-
TRa over 5 yearsawesome! Exactly how I wanted it. Thank you Romain.