Results 1 to 5 of 5

Math Help - Piecewise function

  1. #1
    Member Greengoblin's Avatar
    Joined
    Feb 2008
    From
    UK
    Posts
    182

    Piecewise 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:

    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.
    Follow Math Help Forum on Facebook and Google+

  2. #2
    Super Member
    Joined
    Jun 2008
    Posts
    792
    \left{ should be \left\{
    Follow Math Help Forum on Facebook and Google+

  3. #3
    Member Greengoblin's Avatar
    Joined
    Feb 2008
    From
    UK
    Posts
    182
    Ahh thanks, I didn't realise you had to use the extra backslash with \left and \right.
    Follow Math Help Forum on Facebook and Google+

  4. #4
    Flow Master
    mr fantastic's Avatar
    Joined
    Dec 2007
    From
    Zeitgeist
    Posts
    16,948
    Thanks
    5
    Quote Originally Posted by Greengoblin View Post
    Ahh thanks, I didn't realise you had to use the extra backslash with \left and \right.
    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
    Follow Math Help Forum on Facebook and Google+

  5. #5
    MHF Contributor
    Opalg's Avatar
    Joined
    Aug 2007
    From
    Leeds, UK
    Posts
    4,041
    Thanks
    7
    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:

    0=\begin{cases} 2u^2-7u+7 & \text{if } x \ge 1 \\ 2u^2+7u+7 & \text{if } x<1 \end{cases}
    Follow Math Help Forum on Facebook and Google+

Similar Math Help Forum Discussions

  1. Replies: 14
    Last Post: October 7th 2011, 10:45 PM
  2. Piecewise Function
    Posted in the Pre-Calculus Forum
    Replies: 1
    Last Post: September 8th 2011, 06:21 PM
  3. Replies: 3
    Last Post: June 4th 2010, 11:40 PM
  4. piecewise function,
    Posted in the Calculus Forum
    Replies: 2
    Last Post: March 7th 2010, 09:43 AM
  5. Piecewise Function
    Posted in the Pre-Calculus Forum
    Replies: 1
    Last Post: September 26th 2009, 03:43 AM

Search Tags


/mathhelpforum @mathhelpforum