# Chapter 2 Examples

## 2.1 Don’t Be Tricked

A pizza shop sales 12-inches pizza and 8-inches pizza at the price $12/each and $6/each respectively. With $12, would you like to order one 12-inches and two 8-inches. Why?

A sheet of everyday copy paper is about 0.01 millimeter thick. Repeat folding along a different side 20 times. Now, how thick do you think the folded paper is?

## 2.2 Properties of Exponents

For an integer \(n\), and an expression \(x\), the mathematical operation of the \(n\)-times repeated multiplication of \(x\) is call exponentiation, written as \(x^n\), that is, \[ x^n=\underbrace{x\cdot x \cdots x}_{n~\text{factors of}~x}. \]

In the notation \(x^n\), \(n\) is called ** the exponent**, \(x\) is called

**, and \(x^n\) is called**

*the base***, read as “\(x\) raised to the \(n\)-th power”, “\(x\) to the \(n\)-th power”, “\(x\) to the \(n\)-th”, “\(x\) to the power of \(n\)” or “\(x\) to the \(n\)”.**

*the power***Order of Basic Mathematical Operations**

In mathematics, the order of operations reflects conventions about which procedure should be performed first. There are four levels (from the highest to the lowest):

**Parenthesis**; **Exponentiation**; **Multiplication and Division**; **Addition and Subtraction**.

Within the same level, the convention is to perform from the left to the right.

Simplify. **Write with positive exponents.**
\[
\left(\dfrac{2y^{-2}z^{-5}}{4x^{-3}y^6}\right)^{-4}.
\]

The idea is to simplify the base first and rewrite using positive exponents only.

\[ \begin{aligned} \left(\dfrac{2y^{-2}z^{-5}}{4x^{-3}y^6}\right)^{-4} =&\left(\dfrac{x^3}{2z^{5}y^8}\right)^{-4}\\ =&\left(\dfrac{2z^{5}y^8}{x^3}\right)^4\\ =&\dfrac{2^4(z^{5})^4(y^8)^4}{(x^3)^4}\\ =&\dfrac{16y^{32}z^{20}}{x^{12}}.\\ \end{aligned} \]

**Simplify (at least partially) the problem first**

To avoid mistakes when working with negative exponents, it’s better to apply the negative exponent rule to change negative exponents to positive exponents and simplify the base first.

## 2.3 Generating Theorem Environments Using R Bookdown Code Chunks

Bookdown theorem environments work great. It will be awesome if it can handle r code chunks within a theorem block.

**Theorem 2.1 (Pythagorean Theorem) **
If \(c\) denotes the length of the hypotenuse and \(a\) and \(b\) denote the lengths of the other two sides, the Pythagorean theorem can be expressed as the Pythagorean equation:
\[a^2+b^2=c^2.\]

**Corollary 2.1 **
For any angle \(\theta\), we have
\[
\sin^2\theta+\cos^2\theta=1
\]

## 2.4 Generating Theorem Environments Using Pandoc Fence Code Blocks

Bookdown has a lua filter called “latex-div.lua” which handles theorem environments for latex.

If \(c\) denotes the length of the hypotenuse and \(a\) and \(b\) denote the lengths of the other two sides, the Pythagorean theorem can be expressed as the Pythagorean equation: \[a^2+b^2=c^2.\]

For any angle \(\theta\), we have \[ \sin^2\theta+\cos^2\theta=1 \]

Pandoc use `::: {#Id .Div_attributes}`

to start and `:::`

to end a Div block. Such a block can be converted
to LaTeX environment using lua.

Find the hypotenuose for the right triangle whose legs are 4 and 3.

## 2.5 Practice

Simplify. **Write with positive exponents.**

- \((3a^2b^3c^2)(4abc^2)(2b^2c^3)\)
- \(\dfrac{4y^3z^0}{x^2y^2}\)
- \((-2)^{-3}\)

Simplify. **Write with positive exponents.**

- \(\dfrac{-u^0v^{15}}{v^{16}}\)
- \((-2a^3b^2c^0)^3\)
- \(\dfrac{m^5 n^{2}}{(mn)^3}\)

Simplify. **Write with positive exponents.**

- \((-3a^2x^3)^{-2}\)
- \(\left(\dfrac{-x^0y^3}{2wz^2}\right)^3\)
- \(\dfrac{3^{-2}a^{-3}b^5}{x^{-3}y^{-4}}\)

Simplify. **Write with positive exponents.**

- \(\left(-x^{-1}(-y)^2\right)^3\)
- \(\left(\dfrac{6x^{-2}y^5}{2y^{-3}z^{-11}}\right)^{-3}\)
- \(\dfrac{(3 x^{2} y^{-1})^{-3}(2 x^{-3} y^{2})^{-1}}{(x^{6} y^{-5})^{-2}}\)

A store has large size and small size watermelons. A large one cost $4 and a small one $1. Putting on the same table, a smaller watermelons has only half the height of the larger one. Given $4, will you buy a large watermelon or 4 smaller ones? Why?