I'm using the following source code for making a case differentiation. However, it is showing in the log "undefined control sequence". Please help, where I am wrong in coding.
Code: Select all
\documentclass[10pt,a4paper]{article}
\usepackage[latin1]{inputenc}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}
\begin{document}
$$
f(x) =
\begin{cases}
|2x-3|[x] & \text{if} \ x\ge1 \\
\sin\frac{\pi x}{2} & \text{if} \ x\lt 1 \
\end{cases}.
$$
\end{document}
Sachin