MHB How to draw large curly brackets?

  • Thread starter Thread starter alexmahone
  • Start date Start date
AI Thread Summary
To write the piecewise function "g(x) = x if x >= 0 and g(x) = -x for x < 0" using large curly brackets on two lines, the recommended format is: g(x) = { x if x >= 0; -x if x < 0. This can be achieved using LaTeX code, specifically with the cases environment for clarity and proper formatting. The provided examples demonstrate both the standard piecewise notation and a more specialized cases environment, ensuring the function is clearly defined for both conditions.
alexmahone
Messages
303
Reaction score
0
How can I write "g(x) = x if x >= 0 and g(x) = -x for x < 0" on 2 lines using large curly brackets?
 
Physics news on Phys.org
Alexmahone said:
How can I write "g(x) = x if x >= 0 and g(x) = -x for x < 0" on 2 lines using large curly brackets?

If I understand your question correctly you mean (maybe) this(?):

$ g(x) = \left\{ \begin{array}{rcl} x\ &if& \ x\geq 0 \\ -x\ &if& \ x<0\end{array} \right. $
 
That's exactly what I meant. Thanks!
 
There is also a more specialized cases environment:
$\begin{cases}
x&\text{if }x\ge0\\
-x&\text{if }x<0
\end{cases}$
 
Back
Top