Math Help Forum

Math Help Forum Feed Site Feed

Go Back   Math Help Forum > Math Help Forum Lounge > LaTex Help
Reply
 
Thread Tools Display Modes
  #1  
Old 07-13-2008, 02:56 PM
Mathstud28's Avatar
MHF Contributor
 
Join Date: Mar 2008
Location: Pennsylvania
Posts: 3,765
Country:
Thanks: 411
Thanked 979 Times in 905 Posts
Mathstud28 is a splendid one to beholdMathstud28 is a splendid one to beholdMathstud28 is a splendid one to beholdMathstud28 is a splendid one to beholdMathstud28 is a splendid one to beholdMathstud28 is a splendid one to beholdMathstud28 is a splendid one to beholdMathstud28 is a splendid one to behold
Send a message via AIM to Mathstud28
Default Testing LaTeX 2

f(x)={{3x\quad\text{if}~~x>0}\brace{5x\quad\text{if}~~x\leq{0}}}

Does anyone think that is an easier way to do piecwise functions?
__________________
We're clever but we're clueless.

\int_0^z\ln\Gamma(x+1)dx=\frac{z}{2}\ln(2\pi)-\frac{z(z+1)}{2}+z\ln\Gamma(z+1)-\ln\left\{(2\pi)^{\frac{z}{2}}\exp\left(\frac{-z(z+1)}{2}-\frac{\gamma z^2}{2}\right)\prod_{k=1}^{\infty}\left\{\left(1+\frac{z}{k}\right)^k\exp\left(-z+\frac{z^2}{2k}\right)\right\}\right\}
Reply With Quote
Advertisement
 
  #2  
Old 07-13-2008, 03:25 PM
galactus's Avatar
Eater of Worlds
 
Join Date: Jul 2006
Location: Chaneysville, PA
Posts: 2,668
Country:
Thanks: 102
Thanked 952 Times in 853 Posts
galactus has much to be proud ofgalactus has much to be proud ofgalactus has much to be proud ofgalactus has much to be proud ofgalactus has much to be proud ofgalactus has much to be proud ofgalactus has much to be proud ofgalactus has much to be proud of
Default

That's a nice way. But for piecewise, the norm is usually one left bracket. I mostly do it like so. But I like your way.

f(z) = \left\{ \begin{array}{rcl}3x & \mbox{if} & x<3 \\ 5x & \mbox{if} & x\geq {3}\end{array}\right.
__________________
http://www.mathhelpforum.com/math-help/avatars/colby2152.gif?dateline=1208469836


Zenophobia: the irrational fear of convergent sequences.
Reply With Quote
  #3  
Old 07-13-2008, 05:35 PM
Mathstud28's Avatar
MHF Contributor
 
Join Date: Mar 2008
Location: Pennsylvania
Posts: 3,765
Country:
Thanks: 411
Thanked 979 Times in 905 Posts
Mathstud28 is a splendid one to beholdMathstud28 is a splendid one to beholdMathstud28 is a splendid one to beholdMathstud28 is a splendid one to beholdMathstud28 is a splendid one to beholdMathstud28 is a splendid one to beholdMathstud28 is a splendid one to beholdMathstud28 is a splendid one to behold
Send a message via AIM to Mathstud28
Default

Quote:
Originally Posted by galactus View Post
That's a nice way. But for piecewise, the norm is usually one left bracket. I mostly do it like so. But I like your way.

f(z) = \left\{ \begin{array}{rcl}3x & \mbox{if} & x<3 \\ 5x & \mbox{if} & x\geq {3}\end{array}\right.
Thanks Galactus. Does anyone know how to add three elements with this \brace command?

{x}\brace{{y}\brace{z}}

Like that but obviously I want the z and y to be the same size as the x, and no brace.
__________________
We're clever but we're clueless.

\int_0^z\ln\Gamma(x+1)dx=\frac{z}{2}\ln(2\pi)-\frac{z(z+1)}{2}+z\ln\Gamma(z+1)-\ln\left\{(2\pi)^{\frac{z}{2}}\exp\left(\frac{-z(z+1)}{2}-\frac{\gamma z^2}{2}\right)\prod_{k=1}^{\infty}\left\{\left(1+\frac{z}{k}\right)^k\exp\left(-z+\frac{z^2}{2k}\right)\right\}\right\}
Reply With Quote
  #4  
Old 07-13-2008, 05:39 PM
Junior Member
 
Join Date: Feb 2008
Posts: 13
Country:
Thanks: 1
Thanked 6 Times in 6 Posts
cyph1e is on a distinguished road
Default

|x| = \begin{cases}x, & \mbox{if}~x \ge 0 \\-x, & \mbox{otherwise}\end{cases}

Code:
|x| = 
\begin{cases}
x, & \mbox{if}~x \ge 0 \\
-x, & \mbox{otherwise}
\end{cases}
Neat .
Reply With Quote
The following users thank cyph1e for this useful post:
Donate to MHF
  #5  
Old 07-13-2008, 05:41 PM
Mathstud28's Avatar
MHF Contributor
 
Join Date: Mar 2008
Location: Pennsylvania
Posts: 3,765
Country:
Thanks: 411
Thanked 979 Times in 905 Posts
Mathstud28 is a splendid one to beholdMathstud28 is a splendid one to beholdMathstud28 is a splendid one to beholdMathstud28 is a splendid one to beholdMathstud28 is a splendid one to beholdMathstud28 is a splendid one to beholdMathstud28 is a splendid one to beholdMathstud28 is a splendid one to behold
Send a message via AIM to Mathstud28
Default

Quote:
Originally Posted by cyph1e View Post
|x| = \begin{cases}x, & \mbox{if}~x \ge 0 \\-x, & \mbox{otherwise}\end{cases}

Code:
|x| = 
\begin{cases}
x, & \mbox{if}~x \ge 0 \\
-x, & \mbox{otherwise}
\end{cases}
Neat .
I do not suppose that was supposed to be an answer to my question?

Neat indeed, but I hate having to write all that \mbox stuff
__________________
We're clever but we're clueless.

\int_0^z\ln\Gamma(x+1)dx=\frac{z}{2}\ln(2\pi)-\frac{z(z+1)}{2}+z\ln\Gamma(z+1)-\ln\left\{(2\pi)^{\frac{z}{2}}\exp\left(\frac{-z(z+1)}{2}-\frac{\gamma z^2}{2}\right)\prod_{k=1}^{\infty}\left\{\left(1+\frac{z}{k}\right)^k\exp\left(-z+\frac{z^2}{2k}\right)\right\}\right\}
Reply With Quote
  #6  
Old 07-13-2008, 05:48 PM
Catherine Morland's Avatar
Member
 
Join Date: Jul 2008
Posts: 17
Country:
Thanks: 110
Thanked 9 Times in 6 Posts
Catherine Morland is on a distinguished road
Default

Quote:
Originally Posted by Mathstud28 View Post
{x}\brace{{y}\brace{z}}

Like that but obviously I want the z and y to be the same size as the x, and no brace.
Like this?

\left\{\begin{array}{c}x\\y\\z\end{array}\right\}
Reply With Quote
The following users thank Catherine Morland for this useful post:
Donate to MHF
  #7  
Old 07-13-2008, 05:50 PM
Mathstud28's Avatar
MHF Contributor
 
Join Date: Mar 2008
Location: Pennsylvania
Posts: 3,765
Country:
Thanks: 411
Thanked 979 Times in 905 Posts
Mathstud28 is a splendid one to beholdMathstud28 is a splendid one to beholdMathstud28 is a splendid one to beholdMathstud28 is a splendid one to beholdMathstud28 is a splendid one to beholdMathstud28 is a splendid one to beholdMathstud28 is a splendid one to beholdMathstud28 is a splendid one to behold
Send a message via AIM to Mathstud28
Default

Quote:
Originally Posted by Catherine Morland View Post
Like this?

\left\{\begin{array}{c}x\\y\\z\end{array}\right\}
Yes, thank you very much. I know that way, I was just hoping there was an easier way involving the \brace command, thanks again.
__________________
We're clever but we're clueless.

\int_0^z\ln\Gamma(x+1)dx=\frac{z}{2}\ln(2\pi)-\frac{z(z+1)}{2}+z\ln\Gamma(z+1)-\ln\left\{(2\pi)^{\frac{z}{2}}\exp\left(\frac{-z(z+1)}{2}-\frac{\gamma z^2}{2}\right)\prod_{k=1}^{\infty}\left\{\left(1+\frac{z}{k}\right)^k\exp\left(-z+\frac{z^2}{2k}\right)\right\}\right\}
Reply With Quote
  #8  
Old 07-13-2008, 06:14 PM
Junior Member
 
Join Date: Feb 2008
Posts: 13
Country:
Thanks: 1
Thanked 6 Times in 6 Posts
cyph1e is on a distinguished road
Default

Quote:
Originally Posted by Mathstud28 View Post
I do not suppose that was supposed to be an answer to my question?

Neat indeed, but I hate having to write all that \mbox stuff
No, it wasn't an answer to your question.

I was just demonstrating that when using cases you don't need \left{.
Reply With Quote
  #9  
Old 07-29-2008, 11:32 AM
Moo's Avatar
Moo Moo is offline
A Cute Angle
 
Join Date: Mar 2008
Location: Green and fresh grass
Posts: 4,066
Thanks: 358
Thanked 2,082 Times in 1,735 Posts
Moo has a reputation beyond reputeMoo has a reputation beyond reputeMoo has a reputation beyond reputeMoo has a reputation beyond reputeMoo has a reputation beyond reputeMoo has a reputation beyond reputeMoo has a reputation beyond reputeMoo has a reputation beyond reputeMoo has a reputation beyond reputeMoo has a reputation beyond reputeMoo has a reputation beyond repute
Default

\left. \begin{array}{c|c|c|c|c|c} 1 & \tfrac 12 &+& \tfrac 13 &+& \tfrac 16 \\ \hline 3 & \int_0^2 x^2 \, dx &+& \int_0^1 x^3 \; dx &+& \tfrac 13 \int_0^1 x^3 ~dx  \end{array} \right\} \Leftrightarrow \rm{teable.}

Ou..nice one
__________________
Arbeit bringt Brot, Faulenzen Hungersnot.
Everything is possible. The impossible just takes longer.


shinhidora production
Reply With Quote
The following users thank Moo for this useful post:
Donate to MHF
  #10  
Old 08-24-2008, 08:52 AM
flyingsquirrel's Avatar
Super Member
 
Join Date: Apr 2008
Posts: 688
Country:
Thanks: 146
Thanked 345 Times in 299 Posts
flyingsquirrel is just really niceflyingsquirrel is just really niceflyingsquirrel is just really niceflyingsquirrel is just really niceflyingsquirrel is just really nice
Default

Few commands that I've just discovered (see [1]) and which can be useful :

To write text under/over an arrow one can use \xrightarrow[subscript]{superscript} and \xleftarrow[subscript]{superscript}. If the subscript/superscript is too wide the arrow is automatically extended.

f(x)\xrightarrow[x\to 0]{}42 \text{ and } f(x)\xrightarrow[\text{sometimes}]{} 1

The command \cfrac{}{} gives continued fractions (to get the same result using \frac{}{} one has to use \displaystyle) :

\cfrac{1}{1+\cfrac{1}{1+\cfrac{1}{1+\cdots}}}

To get multiline subscripts and superscripts : \substack{ first line\\ second line\\ third line \\ ... }

\theta(n) = \sum_{\substack{ 1\leq i\leq n\\ 1\leq j\leq  i}} i\times j\text{  and  } f(x,y) \xrightarrow[\substack{x\to 0\\y\to 0}]{} 42

For those of you who integrate functions of more than four variables :

\idotsint\limits_{ \mathbb{R}^n}\varphi(x_1,x_2,\ldots,x_n)\,\mathrm{d}x_1\mathrm{d}x_2\ldots \mathrm{d}x_n

Edit : To get a small matrix one can use... \begin{smallmatrix}...\end{smallmatrix}. It gives something like this : \begin{smallmatrix} 1 & 2 \\ 3 & 4 \end{smallmatrix}.



[1] http://pages.usherbrooke.ca/cimel/im...math_guide.pdf (not all the commands given in this file are available on the forum...)

Last edited by flyingsquirrel; 08-27-2008 at 09:16 AM.
Reply With Quote
The Following 3 Users Say Thank You to flyingsquirrel For This Useful Post:
Donate to MHF
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off
Forum Jump


All times are GMT -7. The time now is 10:35 AM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0 ©2008, Crawlability, Inc.
©2005 - 2008 Math Help Forum


Math Help Forum is a community of maths forums with an emphasis on maths help in all levels of mathematics.
Register to post your math questions or just hang out and try some of our math games or visit the arcade.