# Two (or more!) piecewise functions on same line

Want to display two piecewise functions on the same line. Currently using 'cases' to define two piecewise functions on two separate lines. It looks ugly. They can fit on the same line, but how?

-
Could you please create an image of the undesired and desired output you're after? It's not that clear from the question. Do so by including an image of both, if you cannot produce it in (La)TeX yourself. You can even create it in another editor (like MS Word), if need be. –  Werner Feb 9 '13 at 5:29

You can cascade two cases on the same line as follows:

## Code:

\documentclass{article}
\usepackage{amsmath}

\begin{document}
\begin{equation*}
f(x) = \begin{cases}
0  & \text{if } x < 0 \\
1  & \text{if } x \ge 0