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 11-08-2008, 11:31 AM
Mathstud28's Avatar
MHF Contributor
 
Join Date: Mar 2008
Location: Pennsylvania
Posts: 3,765
Country:
Thanks: 411
Thanked 981 Times in 907 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 LaTeX question

How do you align a series of equations in the center like Krizalid does in this thread?

More telescopic sums

I tried to duplicate the appropriate LaTeX code but don't seem to be able to. Could someone tell me what I'm doing wrong?

\begin{aligned}\int{f(x)g(x)}dx&
=f(x)+200g(x)&
=5\end{aligned}

Code:
\begin{aligned}\int{f(x)g(x)}dx&
=f(x)+200g(x)&
=5\end{aligned}
__________________
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 11-08-2008, 11:46 AM
masters's Avatar
MHF Contributor

 
Join Date: Jan 2008
Location: Southwest Virginia, USA in beautiful Appalachian Mountains
Posts: 1,380
Country:
Thanks: 243
Thanked 888 Times in 638 Posts
masters is a splendid one to beholdmasters is a splendid one to beholdmasters is a splendid one to beholdmasters is a splendid one to beholdmasters is a splendid one to beholdmasters is a splendid one to beholdmasters is a splendid one to beholdmasters is a splendid one to behold
Default

Quote:
Originally Posted by Mathstud28 View Post
How do you align a series of equations in the center like Krizalid does in this thread?

More telescopic sums

I tried to duplicate the appropriate LaTeX code but don't seem to be able to. Could someone tell me what I'm doing wrong?

\begin{aligned}\int{f(x)g(x)}dx&=f(x)+200g(x)&=5\end{aligned}

\begin{aligned}\int{f(x)g(x)}dx&=f(x)+200g(x) \\ &=5\end{aligned}
You left out the "new line" code \\ after your &
__________________
He who knows not and knows not that he knows not is a fool, shun him. He who knows not and knows that he knows not is a child, teach him. He who knows and knows not that he knows is asleep, wake him. And he who knows and knows that he knows is wise, follow him.
-- Persian Proverb


Reply With Quote
The following users thank masters for this useful post:
Donate to MHF
  #3  
Old 11-08-2008, 12:10 PM
Moo's Avatar
Moo Moo is offline
A Cute Angle
 
Join Date: Mar 2008
Location: Green and fresh grass
Posts: 4,068
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

You can also use \hfill in case you want the parts between & & to be aligned to the left.

Another command to align things is \begin{gathered} \end{gathered} :
\begin{gathered}p \text{ is a prime.} \hfill \\\text{In } \mathbb{Z}/p \mathbb{Z},~ \forall \overline{n},~ \overline{n}^p-\overline{n}= \prod_{k=0}^{n-1} (\overline{n}-k) \hfill \end{gathered}
Code:
\begin{gathered}
p \text{ is a prime.} \hfill \\
\text{In } \mathbb{Z}/p \mathbb{Z},~ \forall \overline{n},~ \overline{n}^p-\overline{n}= \prod_{k=0}^{n-1} (\overline{n}-k) \hfill \end{gathered}
\begin{gathered}p \text{ is a prime.} \\\text{In } \mathbb{Z}/p \mathbb{Z},~ \forall \overline{n},~ \overline{n}^p-\overline{n}= \prod_{k=0}^{n-1} (\overline{n}-k) \end{gathered}
Code:
\begin{gathered}
p \text{ is a prime.} \hfill \\
\text{In } \mathbb{Z}/p \mathbb{Z},~ \forall \overline{n},~ \overline{n}^p-\overline{n}= \prod_{k=0}^{n-1} (\overline{n}-k) \end{gathered}
(without \hfill)
__________________
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
  #4  
Old 11-08-2008, 12:16 PM
Mathstud28's Avatar
MHF Contributor
 
Join Date: Mar 2008
Location: Pennsylvania
Posts: 3,765
Country:
Thanks: 411
Thanked 981 Times in 907 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

\begin{aligned}\int{f(x)g(x)}dx&\\=f(x)+200g(x)&\\=5\end{aligned}

How do I get them lined up correctly?

Code:
\begin{aligned}\int{f(x)g(x)}dx&\\
=f(x)+200g(x)&\\
=5
\end{aligned}
__________________
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
  #5  
Old 11-08-2008, 12:37 PM
o_O's Avatar
o_O o_O is offline
Primero Espada
 
Join Date: Mar 2008
Location: Canada
Posts: 1,130
Country:
Thanks: 135
Thanked 568 Times in 514 Posts
o_O is a name known to allo_O is a name known to allo_O is a name known to allo_O is a name known to allo_O is a name known to allo_O is a name known to all
Default

The &'s help you align them. Play around with them and you should be able to catch on:

\begin{aligned} 
& \int{f(x)g(x)}dx \\
&  =  f(x)+200g(x) \\ 
& = 5
\end{aligned}

Code:
\begin{aligned} 
& \int{f(x)g(x)}dx \\
&  =  f(x)+200g(x) \\ 
& = 5
\end{aligned}
__________________________________________________ ____

\begin{aligned} 
\int{f(x)g(x)}dx  & = f(x)+200g(x) \\ 
& =  5
\end{aligned}

Code:
\begin{aligned} 
\int{f(x)g(x)}dx & = f(x)+200g(x) \\ 
& = 5
\end{aligned}
Reply With Quote
The following users thank o_O for this useful post:
Donate to MHF
  #6  
Old 11-08-2008, 01:03 PM
Mathstud28's Avatar
MHF Contributor
 
Join Date: Mar 2008
Location: Pennsylvania
Posts: 3,765
Country:
Thanks: 411
Thanked 981 Times in 907 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

\begin{aligned}A_n&=\int{f(x)g(x)}dx\\&=f(x)+200g(x)\\&=5\\&=4+1\\&=\frac{5!}{4!}\\&=\frac{\int_0^{\infty}t^5e^{-t}dt}{\int_0^{\infty}t^4e^{-t}dt}\end{aligned}
Thank you
__________________
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
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 04:20 PM.


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.