Why doesn't this code work?

0=\left{ \begin{array}{lr} 2u^2-7u+7 & \text{if } x \ge 1 \\ 2u^2+7u+7 & \text{if } x<1 \end{array} \right.

Which gives:

Printable View

- December 16th 2008, 04:19 AMGreengoblinPiecewise function
Why doesn't this code work?

0=\left{ \begin{array}{lr} 2u^2-7u+7 & \text{if } x \ge 1 \\ 2u^2+7u+7 & \text{if } x<1 \end{array} \right.

Which gives:

- December 16th 2008, 04:25 AMChop Suey
\left{ should be \left\{

- December 16th 2008, 04:39 AMGreengoblin
Ahh thanks, I didn't realise you had to use the extra backslash with \left and \right.

- December 16th 2008, 05:55 AMmr fantastic
You don't. You only use the

*extra backslash*when you want to write symbols such as { that are also used as special characters in the LaTeX system. Read this: Special Characters and Formatting in LaTeX - December 16th 2008, 11:43 AMOpalg
Alternatively, you can use the LaTeX cases environment:

0=\begin{cases} 2u^2-7u+7 & \text{if } x \ge 1 \\ 2u^2+7u+7 & \text{if } x<1 \end{cases}

which gives: