Math & Science ⇒ piecewise function
piecewise function
f(x)= \left\{ \begin{array}{lr} 1 - e^{-(c\lambda)x}& \text{if }X\text{ is exponential} \\1-(1-p_{X})^{cx} &\text{if }X\text{ is geometric}. \end{array} \right
I am trying to align "if X is exponential" and "if X is geometric".
Cheers.
Learn LaTeX easily with newest books:
The LaTeX Beginner's Guide: 2nd edition and perfect for students writing a thesis
The LaTeX Cookbook: 2nd edition full of practical examples for mathematics, physics, chemistry, and more
LaTeX Graphics with TikZ: the first book about TikZ for perfect drawings in your LaTeX thesis
piecewise function
you could use the cases environment provided by the amsmath package:
Code: Select all
\documentclass{article}
\usepackage{amsmath}
\begin{document}
\begin{equation}
f(x)=%
\begin{cases}
1 - e^{-(c\lambda)x} &\text{if $X$ is exponential} \\
1-(1-p_{X})^{cx} &\text{if $X$ is geometric}.
\end{cases}
\end{equation}
\end{document}