I want to define two functions conditionally as in How to write conditional equations with one-sided curly brackets, but I want to write the two equations on the same line. Is there a way for this?
-
Two cases environment in an align environment should do it, if I've understood well what you want.– BernardFeb 4, 2020 at 19:07
-
@Bernard I added a picture what I want– blancketFeb 4, 2020 at 19:11
1 Answer
No further special constructs are needed for this, just add some space after the first definition with e.g. \qquad
:
\documentclass{article}
\usepackage{mathtools}
\begin{document}
\begin{equation*}
w_{n}(x) =
\begin{dcases*}
\frac{1}{2^{n+1}(1+\mu(E_{n}))},&if \( x\in E_{n}\),\\
0,&otherwise,
\end{dcases*}
\qquad
u_{n}(x) =
\begin{dcases*}
\frac{\mu(E_{n})}{2^{n+1}(1+\mu(E_{n}))},&if \( x\in E_{n}\),\\
0,&otherwise.
\end{dcases*}
\end{equation*}
\end{document}
If a \qquad
is too much, you can reduce to a \quad
.
It is best to make the punctuation part of the cases statements, rather than putting it outside these blocks.