Building a formula step-by-step

7.4.7 Building a formula step-by-step

It is easy to build up complex formulas from the components described in this section. Try the formula

X 3 x i µ(i)

(i − 1)

i,i+1

3 ρ(i) −2+ ρ(i) −1 Build this formula in several steps. Create a new file in your work folder. Name

i+3

i=1

it formula.tex, type in the following lines, and save it: % File: formula.tex

\documentclass{amsart} \usepackage{amssymb,latexsym} \begin{document} \end{document}

At present, the file has an empty document environment. Type each part of the formula as an inline or displayed formula within this environment so that you can typeset the document and check for errors.

Step 1 We start with n 2 . Type the following line into formula.tex: $\left[ \frac{n}{2} \right]$ and test it by typesetting the document.

Step 2 Now you can do the sum

i=1

For the superscript, you can copy and paste the formula created in Step 1 (without the dollar signs), so that you have

\[ \sum_{i = 1}^{ \left[ \frac{n}{2} \right] } \]

Step 3 Next, do the two formulas in the binomial

x i 2 i,i+1 i+3

Type them as separate formulas in formula.tex: \[

x_{i, i + 1}^{i^{2}}\qquad\left[ \frac{i + 3}{3} \right] \]

7.4 Basic constructs 165

Step 4 Now it is easy to do the binomial. Piece together the following formula by copying and pasting the previous formulas and dropping the \qquad command:

\[ \binom{x_{i,i + 1}^{i^{2}}}{\left[\frac{i + 3}{3}\right]} \]

which typesets as

x i 2 i,i+1 i+3

Step 5 3 Next, type the formula under the square root, µ(i) 2 (i 2 − 1): $\mu(i)^{ \frac{3}{2} } (i^{2} - 1)$

and then the square root, 3 µ(i) 2 (i 2 − 1):

$\sqrt{ \mu(i)^{ \frac{3}{2} } (i^{2} - 1) }$

Step 6 3 The two cube roots, 3 p

ρ(i) − 2 and ρ(i) − 1, are easy to type: $\sqrt[3]{ \rho(i) - 2 }$ $\sqrt[3]{ \rho(i) - 1 }$

Step 7 Now the fraction

µ(i) 3 2 (i 2 − 1) p 3 p

ρ(i)

−2+ 3 ρ(i) −1

is typed, copied, and pasted together as \[

\frac{ \sqrt{ \mu(i)^{ \frac{3}{2}} (i^{2} -1) } } { \sqrt[3]{\rho(i) - 2} + \sqrt[3]{\rho(i) - 1} } \]

Step 8 Finally, the whole formula,

µ(i) 2 (i − 1)

i,i+1

3 ρ(i) −2+ ρ(i) −1 is formed by copying and pasting the pieces together, leaving only one pair of displayed

i+3

i=1

math delimiters:

166 Chapter 7 Typing math

\[ \sum_{i = 1}^{ \left[ \frac{n}{2} \right] } \binom{ x_{i, i + 1}^{i^{2}} }

{ \left[ \frac{i + 3}{3} \right] } \frac{ \sqrt{ \mu(i)^{ \frac{3}{2}} (i^{2} - 1) } } {\sqrt[3]{\rho(i)-2} + \sqrt[3]{\rho(i) - 1}} \]

Note the use of

Hierarchical indentation, to keep track of the structure of the formula Spacing to help highlight the braces—some text editors help you balance braces Separate lines for the various pieces of formulas that are more than a line long

It is to your advantage to keep your source file readable. L A TEX does not care how its input is formatted, and would happily accept the following:

\[\sum_{i=1}^{\left[\frac{n}{2}\right]}\binom{x_{i,i+1} ^{i^{2}}}{\left[\frac{i+3}{3}\right]}\frac{\sqrt{\mu(i) ^{\frac{3}{2}}(i^{2}-1)}}{\sqrt[3]{\rho(i)-2}+\sqrt[3] {\rho(i)-1}}\]

But this haphazard style not only makes it more difficult for your coauthors or editor to work with your source file, it also makes finding mistakes difficult. Try to find the error in the next version:

\[\sum_{i=1}^{\left[\frac{n}{2}\right]} \binom{x_{i,i+1}^{i^{2}}}{\left[\frac{i+3}{3}\right]} \frac{\sqrt{\mu(i)^{\frac{3}{2}}}(i^{2}-1)}}{\sqrt[3] {\rho(i)-2}+\sqrt[3]{\rho(i)-1}}\]

Answer: \frac{3}{2 should be followed by }} and not by }}}.

Dokumen yang terkait

c. Bridging Teknik memanjat pada celah vertikal yang lebih besar (gullies). Caranya dengan menggunakan kedua tangan dan kaki sebagai pegangan pada kedua celah tersebut. Posisi badan mengangkang kaki sebagai tumpuan dibantu juga tangan sebagai penjaga kese

0 1 10

2. Marah: adalah kunci setiap kejahatan. Nabi saw. telah berpesan pada seseorang untuk menjauhi sikap marah dengan sabda beliau: "Janganlah engkau marah". Beliau mengulanginya berkali-kali. (H.R Bukhari). - Kebersihan Hati

2 5 14

Object Oriented Programming dengan Delphi (

1 4 75

E volusi dan aplikasi sistem informasi berbasis komputer

1 8 18

b. Data Manipulation Language (DML) : Digunakan untuk memanipulasi data dengan menggunakan perintah : select, - SISTEM BASIS DATA 1.rar (7,386Kb)

1 3 15

Hubungan Pola Asuh Orang Tua dan Kesiapan Psikologis Anak dengan Kebersihan Toilet Traning pada Anak Usia Prasekolah di Paud Ab-Arisalah Kota Lubuklinggau

0 1 8

Hubungan Pengetahuan dsn Sikap dengan Tindakan Hygiene Penjual makanan Jajanan di Lingkungan Sekolah Dasar Kaamatan Baturaja Timur Kabupaten Ogan Komering UIU Tahun 2013 A. Gani

1 3 14

Faktor faktor yang berhubungan dengan manfaatan Posyandu lansia oleh kelompok usia lanjut didesa Kemalara dalam wilayah kerja Puskesmas Kemalaraja OKU Tahun 2013. Saprianto, M.Kes

3 3 21

Korelasi umur, pekerjaan, dan keberadaan kontainer dengan kejadian penyakit malaria di desa simpang Martapura wilayah Kabupaten Ogan Komering Ulu Selatan tahun 2014 – A. Gani

0 0 18

Pengaruh Ekstrak Daun Jambu Biji (Psidiu Guajava Linn) dan Ekstrak daun Teh Hijau (Camelia Sinensis) terhadap Pertumbuhan Escherichia Coli In Vitro dan Perbandingannya dengan Kotrimoksazol

2 16 20