6

I want to write following system of equation in my paper, but I don't know how: enter image description here

Here is a code that I've tried, but it does not work:

R\geqslant R_t \equiv \begin{cases} \frac{r_{t+1} (1-W(k_t)}{f'(k{t+1}    
\lambda} &\mbox{if } k_t < K(\lambda) \\ 
\frac{r_{t+1}}{f'(k_{t+1})} & \mbox{if } k_t\geqslant K(\lambda) 
\end{cases} 

Any suggestions will be very helpful. Thanks

4
  • 1
    Excuse me but the code is different from the image. Have I understood well?
    – Sebastiano
    Feb 25, 2019 at 13:17
  • 3
    Consider accepting one of the provided answers if your question is solved (check mark on the left hand side of the answers). Feb 25, 2019 at 13:44
  • I don't understand what you were having trouble with. The only error I got compiling was about \geqslant. What about didn't work? Or were you wanting to get something closer to your image than you have? I would say that your code gives a better output than that image.
    – Teepeemm
    Feb 25, 2019 at 16:57
  • 5
    Does this answer your question? Large braces for specifying values of variables by condition
    – user202729
    Nov 7, 2021 at 6:08

2 Answers 2

13

I would load the mathtools package, which is a superset of the amsmath package, and employ that package's dcases* environment.

enter image description here

\documentclass{article}
\usepackage{mathtools} % for 'dcases*' env.
\begin{document}
\[
R\ge R_t \equiv
\begin{dcases*}
\frac{r_{t+1}}{f'(k_{t+1})}\frac{1-W(k_t)}{\lambda} 
   & if  $k_t < K(\lambda)$\,, \\[1ex]
\frac{r_{t+1}}{f'(k_{t+1})} 
   & if $k_t\ge K(\lambda)$\,.
\end{dcases*}
\]
\end{document}
3
  • 1
    Is this command better than the usual cases command?
    – knzhou
    Feb 25, 2019 at 16:38
  • 2
    @knzhou - I wouldn't say that dcases is necessarily better than cases, certainly not in the sense of it being *always and everywhere" better than cases. The d in dcases denotes "automatic display-style math mode. It's handy if one has to typeset expressions such as \frac, which might look a whole lot better when rendered in display-style math mode rather than in text-style math mode. Conversely, cases is much more parsimonious, space-wise, than dcases. If conserving space is an important criterion, by all means go with cases.
    – Mico
    Feb 25, 2019 at 16:44
  • 2
    Makes sense, thanks! I was just asking in case cases had been declared obsolete by people in the know for some reason, like how \[ ... \] is supposed to be strictly better than $$ ... $$.
    – knzhou
    Feb 25, 2019 at 16:50
4

Welcome to TeX.SE. Here my (fast) proposal from your original code:

enter image description here

\documentclass[12pt]{article}
\usepackage{amsmath,amssymb}

\begin{document}
\[R\geqslant R_t \equiv \begin{cases} \dfrac{r_{t+1} (1-W(k_t))}{f'(k{t+1}    
\lambda)} &\mbox{if } k_t < K(\lambda) \\
&\\
\dfrac{r_{t+1}}{f'(k_{t+1})} & \mbox{if } k_t\geqslant K(\lambda) 
\end{cases}\] 
\end{document}

EDIT: By correct comment of @Yorgos:

\documentclass[12pt]{article}
\usepackage{amsmath,amssymb}
\begin{document}
\[
R\geqslant R_t \equiv 
\begin{cases} 
\dfrac{r_{t+1} (1-W(k_t))}{f'(k{t+1} \lambda)} 
    & \text{if } k_t < K(\lambda) \\
&\\  % blank row
\dfrac{r_{t+1}}{f'(k_{t+1})} 
    & \text{if } k_t\geqslant K(\lambda) 
\end{cases}
\] 
\end{document}
4
  • 1
    i don't think that mbox is necessary, since & aligns. also i prefer equation environment, since it allows for numbering the equation
    – Yorgos
    Feb 25, 2019 at 13:09
  • 1
    @Yorgos I accept your suggestion correctly. I have only taken the code from the user. :(
    – Sebastiano
    Feb 25, 2019 at 13:11
  • 1
    I believe that the k{t+1} term in the first denominator should be changed to k_{t+1}.
    – Mico
    Feb 25, 2019 at 13:22
  • @Mico Thank you very much for edit and all ....You're right for you comment.
    – Sebastiano
    Feb 25, 2019 at 15:58

Not the answer you're looking for? Browse other questions tagged or ask your own question.