This commit is contained in:
Hykilpikonna
2021-12-07 22:28:01 -05:00
commit 6fffdf686a
151 changed files with 37985 additions and 0 deletions
@@ -0,0 +1,119 @@
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" lang="" xml:lang="">
<head>
<meta charset="utf-8" />
<meta name="generator" content="pandoc" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes" />
<title>C.1 Summations and Products</title>
<style>
code{white-space: pre-wrap;}
span.smallcaps{font-variant: small-caps;}
span.underline{text-decoration: underline;}
div.column{display: inline-block; vertical-align: top; width: 50%;}
div.hanging-indent{margin-left: 1.5em; text-indent: -1.5em;}
ul.task-list{list-style: none;}
</style>
<link rel="stylesheet" href="../tufte.css" />
<script src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js" type="text/javascript"></script>
<!--[if lt IE 9]>
<script src="//cdnjs.cloudflare.com/ajax/libs/html5shiv/3.7.3/html5shiv-printshiv.min.js"></script>
<![endif]-->
</head>
<body>
<div style="display:none">
\(
\newcommand{\NOT}{\neg}
\newcommand{\AND}{\wedge}
\newcommand{\OR}{\vee}
\newcommand{\XOR}{\oplus}
\newcommand{\IMP}{\Rightarrow}
\newcommand{\IFF}{\Leftrightarrow}
\newcommand{\TRUE}{\text{True}\xspace}
\newcommand{\FALSE}{\text{False}\xspace}
\newcommand{\IN}{\,{\in}\,}
\newcommand{\NOTIN}{\,{\notin}\,}
\newcommand{\TO}{\rightarrow}
\newcommand{\DIV}{\mid}
\newcommand{\NDIV}{\nmid}
\newcommand{\MOD}[1]{\pmod{#1}}
\newcommand{\MODS}[1]{\ (\text{mod}\ #1)}
\newcommand{\N}{\mathbb N}
\newcommand{\Z}{\mathbb Z}
\newcommand{\Q}{\mathbb Q}
\newcommand{\R}{\mathbb R}
\newcommand{\C}{\mathbb C}
\newcommand{\cA}{\mathcal A}
\newcommand{\cB}{\mathcal B}
\newcommand{\cC}{\mathcal C}
\newcommand{\cD}{\mathcal D}
\newcommand{\cE}{\mathcal E}
\newcommand{\cF}{\mathcal F}
\newcommand{\cG}{\mathcal G}
\newcommand{\cH}{\mathcal H}
\newcommand{\cI}{\mathcal I}
\newcommand{\cJ}{\mathcal J}
\newcommand{\cL}{\mathcal L}
\newcommand{\cK}{\mathcal K}
\newcommand{\cN}{\mathcal N}
\newcommand{\cO}{\mathcal O}
\newcommand{\cP}{\mathcal P}
\newcommand{\cQ}{\mathcal Q}
\newcommand{\cS}{\mathcal S}
\newcommand{\cT}{\mathcal T}
\newcommand{\cV}{\mathcal V}
\newcommand{\cW}{\mathcal W}
\newcommand{\cZ}{\mathcal Z}
\newcommand{\emp}{\emptyset}
\newcommand{\bs}{\backslash}
\newcommand{\floor}[1]{\left \lfloor #1 \right \rfloor}
\newcommand{\ceil}[1]{\left \lceil #1 \right \rceil}
\newcommand{\abs}[1]{\left | #1 \right |}
\newcommand{\xspace}{}
\newcommand{\proofheader}[1]{\underline{\textbf{#1}}}
\)
</div>
<header id="title-block-header">
<h1 class="title">C.1 Summations and Products</h1>
</header>
<section>
<p>When performing calculations, well often end up writing sums of terms, where each term follows a pattern. For example: <span class="math display">\[\frac{1 + 1^2}{3 + 1} +
\frac{2 + 2^2}{3 + 2} +
\frac{3 + 3^2}{3 + 3} +
\cdots +
\frac{100 + 100^2}{3 + 100}\]</span></p>
<p>We will often use <em>summation notation</em> to express such sums concisely. We could rewrite the previous example simply as: <span class="math display">\[\sum_{i=1}^{100} \frac{i + i^2}{3 + i}.\]</span></p>
<p>In this example, <span class="math inline">\(i\)</span> is called the <em>index of summation</em>, and <span class="math inline">\(1\)</span> and <span class="math inline">\(100\)</span> are the <em>lower</em> and <em>upper bounds</em> of the summation, respectively. A bit more generally, for any pair of integers <span class="math inline">\(j\)</span> and <span class="math inline">\(k\)</span>, and any function <span class="math inline">\(f : \Z \to \R\)</span>, we can use summation notation in the following way: <span class="math display">\[\sum_{i=j}^k f(i) = f(j) + f(j+1) + f(j+2) + \dots + f(k).\]</span></p>
<p>We can similarly use <em>product notation</em> to abbreviate multiplication:<label for="sn-0" class="margin-toggle sidenote-number"></label><input type="checkbox" id="sn-0" class="margin-toggle"/><span class="sidenote">Fun fact: the Greek letter <span class="math inline">\(\Sigma\)</span> (sigma) corresponds to the first letter of “sum,” and the Greek letter <span class="math inline">\(\Pi\)</span> (pi) corresponds to the first letter of “product.”</span> <span class="math display">\[\prod_{i=j}^k f(i) = f(j) \times f(j+1) \times f(j+2) \times \dots \times f(k).\]</span></p>
<p>It is sometimes useful (e.g., in certain formulas) to allow a summation or products lower bound to be greater than its upper bound. In this case, we say the summation or product is <em>empty</em>, and define their values as follows:<label for="sn-1" class="margin-toggle sidenote-number"></label><input type="checkbox" id="sn-1" class="margin-toggle"/><span class="sidenote">These particular values are chosen so that adding an empty summation and multiplying by an empty product do not change the value of an expression.</span></p>
<ul>
<li>When <span class="math inline">\(j &gt; k\)</span>, <span class="math inline">\(\sum_{i=j}^k f(i) = 0\)</span>.</li>
<li>When <span class="math inline">\(j &gt; k\)</span>, <span class="math inline">\(\prod_{i=j}^k f(i) = 1\)</span>.</li>
</ul>
<p>Finally, well end off this section with a few formulas for common summation formulas, and a few laws governing how expressions using summation and product notation can be simplified.</p>
<div id="theorem:summation_formulas" class="theorem">
<p>For all <span class="math inline">\(n \in \N\)</span>, the following formulas hold:</p>
<ol type="1">
<li>For all <span class="math inline">\(c \in \R\)</span>, <span class="math inline">\(\sum_{i=1}^{n} c = c \cdot n\)</span> (sum with constant terms).</li>
<li><span class="math inline">\(\sum_{i=0}^{n} i = \frac{n(n+1)}{2}\)</span> (sum of consecutive numbers).</li>
<li><span class="math inline">\(\sum_{i=0}^{n} i^2 = \frac{n(n+1)(2n+1)}{6}\)</span> (sum of consecutive squares).</li>
<li>For all <span class="math inline">\(r \in \R\)</span>, if <span class="math inline">\(r \neq 1\)</span> then <span class="math inline">\(\sum_{i=0}^{n-1} r^i = \frac{r^n - 1}{r - 1}\)</span> (sum of powers).</li>
<li>For all <span class="math inline">\(r \in \R\)</span>, if <span class="math inline">\(r \neq 1\)</span> then <span class="math inline">\(\sum_{i=0}^{n-1} i \cdot r^i = \frac{n \cdot r^n}{r - 1} - \frac{r(r^n - 1)}{(r - 1)^2}\)</span> (arithmetico-geometric series).</li>
</ol>
</div>
<div id="theorem:summation_product_laws" class="theorem">
<p>For all <span class="math inline">\(m, n \in \Z\)</span>, the following formulas hold:</p>
<ol type="1">
<li><p><span class="math inline">\(\sum_{i=m}^{n} (a_i + b_i) = \left( \sum_{i=m}^{n} a_i \right) + \left(\sum_{i=m}^{n} b_i \right)\)</span> (separating sums)</p></li>
<li><p><span class="math inline">\(\prod_{i=m}^{n} (a_i \cdot b_i) = \left( \prod_{i=m}^{n} a_i \right) \cdot \left (\prod_{i=m}^{n} b_i \right)\)</span> (separating products)</p></li>
<li><p><span class="math inline">\(\sum_{i=m}^{n} c \cdot a_i = c \cdot \left( \sum_{i=m}^{n} a_i \right)\)</span> (factoring out constants, sums)</p></li>
<li><p><span class="math inline">\(\prod_{i=m}^{n} c \cdot a_i = c^{n - m + 1} \cdot \left( \prod_{i=m}^{n} a_i \right)\)</span> (factoring out constants, products)</p></li>
<li><p><span class="math inline">\(\sum_{i=m}^{n} a_i = \sum_{i&#39;=0}^{n-m} a_{i&#39;+m}\)</span> (change of index <span class="math inline">\(i&#39; = i - m\)</span>)</p></li>
<li><p><span class="math inline">\(\prod_{i=m}^{n} a_i = \prod_{i&#39;=0}^{n-m} a_{i&#39;+m}\)</span> (change of index <span class="math inline">\(i&#39; = i - m\)</span>)</p></li>
</ol>
</div>
</section>
<footer>
<a href="https://www.teach.cs.toronto.edu/~csc110y/fall/notes/">CSC110 Course Notes Home</a>
</footer>
</body>
</html>
+114
View File
@@ -0,0 +1,114 @@
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" lang="" xml:lang="">
<head>
<meta charset="utf-8" />
<meta name="generator" content="pandoc" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes" />
<title>C.2 Inequalities</title>
<style>
code{white-space: pre-wrap;}
span.smallcaps{font-variant: small-caps;}
span.underline{text-decoration: underline;}
div.column{display: inline-block; vertical-align: top; width: 50%;}
div.hanging-indent{margin-left: 1.5em; text-indent: -1.5em;}
ul.task-list{list-style: none;}
</style>
<link rel="stylesheet" href="../tufte.css" />
<script src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js" type="text/javascript"></script>
<!--[if lt IE 9]>
<script src="//cdnjs.cloudflare.com/ajax/libs/html5shiv/3.7.3/html5shiv-printshiv.min.js"></script>
<![endif]-->
</head>
<body>
<div style="display:none">
\(
\newcommand{\NOT}{\neg}
\newcommand{\AND}{\wedge}
\newcommand{\OR}{\vee}
\newcommand{\XOR}{\oplus}
\newcommand{\IMP}{\Rightarrow}
\newcommand{\IFF}{\Leftrightarrow}
\newcommand{\TRUE}{\text{True}\xspace}
\newcommand{\FALSE}{\text{False}\xspace}
\newcommand{\IN}{\,{\in}\,}
\newcommand{\NOTIN}{\,{\notin}\,}
\newcommand{\TO}{\rightarrow}
\newcommand{\DIV}{\mid}
\newcommand{\NDIV}{\nmid}
\newcommand{\MOD}[1]{\pmod{#1}}
\newcommand{\MODS}[1]{\ (\text{mod}\ #1)}
\newcommand{\N}{\mathbb N}
\newcommand{\Z}{\mathbb Z}
\newcommand{\Q}{\mathbb Q}
\newcommand{\R}{\mathbb R}
\newcommand{\C}{\mathbb C}
\newcommand{\cA}{\mathcal A}
\newcommand{\cB}{\mathcal B}
\newcommand{\cC}{\mathcal C}
\newcommand{\cD}{\mathcal D}
\newcommand{\cE}{\mathcal E}
\newcommand{\cF}{\mathcal F}
\newcommand{\cG}{\mathcal G}
\newcommand{\cH}{\mathcal H}
\newcommand{\cI}{\mathcal I}
\newcommand{\cJ}{\mathcal J}
\newcommand{\cL}{\mathcal L}
\newcommand{\cK}{\mathcal K}
\newcommand{\cN}{\mathcal N}
\newcommand{\cO}{\mathcal O}
\newcommand{\cP}{\mathcal P}
\newcommand{\cQ}{\mathcal Q}
\newcommand{\cS}{\mathcal S}
\newcommand{\cT}{\mathcal T}
\newcommand{\cV}{\mathcal V}
\newcommand{\cW}{\mathcal W}
\newcommand{\cZ}{\mathcal Z}
\newcommand{\emp}{\emptyset}
\newcommand{\bs}{\backslash}
\newcommand{\floor}[1]{\left \lfloor #1 \right \rfloor}
\newcommand{\ceil}[1]{\left \lceil #1 \right \rceil}
\newcommand{\abs}[1]{\left | #1 \right |}
\newcommand{\xspace}{}
\newcommand{\proofheader}[1]{\underline{\textbf{#1}}}
\)
</div>
<header id="title-block-header">
<h1 class="title">C.2 Inequalities</h1>
</header>
<section>
<p>In this course we will deal heavily with the manipulation of <em>inequalities</em>. While many of these operations are very similar to manipulating equalities, there are enough differences to warrant a comprehensive list.</p>
<div id="theorem:inequalities_basics" class="theorem">
<p>(<em>Arithmetic manipulations</em>) For all real numbers <span class="math inline">\(a\)</span>, <span class="math inline">\(b\)</span>, and <span class="math inline">\(c\)</span>, the following are true:</p>
<ol type="a">
<li>If <span class="math inline">\(a \leq b\)</span> and <span class="math inline">\(b \leq c\)</span>, then <span class="math inline">\(a \leq c\)</span>.</li>
<li>If <span class="math inline">\(a \leq b\)</span>, then <span class="math inline">\(a + c \leq b + c\)</span>.</li>
<li>If <span class="math inline">\(a \leq b\)</span> and <span class="math inline">\(c &gt; 0\)</span>, then <span class="math inline">\(ac \leq bc\)</span>.</li>
<li>If <span class="math inline">\(a \leq b\)</span> and <span class="math inline">\(c &lt; 0\)</span>, then <span class="math inline">\(ac \geq bc\)</span>.</li>
<li>If <span class="math inline">\(0 &lt; a \leq b\)</span>, then <span class="math inline">\(\frac{1}{a} \geq \frac{1}{b}\)</span>.</li>
<li>If <span class="math inline">\(a \leq b &lt; 0\)</span>, then <span class="math inline">\(\frac{1}{a} \geq \frac{1}{b}\)</span>.</li>
</ol>
<p>Moreover, if we replace any of the “if” inequalities with a strict inequality (i.e., change <span class="math inline">\(\leq\)</span> to <span class="math inline">\(&lt;\)</span>), then the corresponding “then” inequality is also strict.<label for="sn-0" class="margin-toggle sidenote-number"></label><input type="checkbox" id="sn-0" class="margin-toggle"/><span class="sidenote">For example, the following is true: “If <span class="math inline">\(a &lt; b\)</span>, then <span class="math inline">\(a + c &lt; b + c\)</span>.”</span></p>
</div>
<p>The previous theorem tells us that basic operations like adding a number or multiplying by a positive number preserves inequalities. However, other operations like multiplying by a negative number or taking reciprocals <em>reverses</em> the direction of the inequality, which is something we didnt have to worry about when dealing with equalities. But it turns out that, at least for non-negative numbers, most of our familiar functions preserve inequalities.</p>
<div class="definition" data-terms="increasing">
<p>Let <span class="math inline">\(f : \R^{\geq 0} \to \R^{\geq 0}\)</span>. We say that <span class="math inline">\(f\)</span> is when for all <span class="math inline">\(x, y \in \R^{\geq 0}\)</span>, if <span class="math inline">\(x &lt; y\)</span> then <span class="math inline">\(f(x) &lt; f(y)\)</span>.</p>
<p>Most common functions are strictly increasing:</p>
<ul>
<li>Raising to a positive power, e.g., <span class="math inline">\(f(x) = x^2\)</span> or <span class="math inline">\(f(x) = x^{3.14}\)</span>.<label for="sn-1" class="margin-toggle sidenote-number"></label><input type="checkbox" id="sn-1" class="margin-toggle"/><span class="sidenote"> Remember that were restricting ourselves to the <span class="math inline">\(\R^{\geq 0}\)</span> for the domain of these functions! <span class="math inline">\(f(x) = x^2\)</span> is not increasing on the domain <span class="math inline">\(\R\)</span>, for example.</span></li>
<li>Logarithms with a base greater than one, e.g., <span class="math inline">\(f(x) = \log_3(x + 1)\)</span>.</li>
<li>Exponential functions with a base greater than one, e.g., <span class="math inline">\(f(x) = 2^x\)</span>.</li>
</ul>
<p>Moreover, adding two strictly increasing functions, or multiplying a strictly increasing function by a positive constant or another always-positive strictly increasing function, results in another strictly increasing function. So for example, we know that <span class="math inline">\(f(x) = 300x^2 + x \log_3 x + 2^{x+100}\)</span> is also strictly increasing.</p>
</div>
<p>It should be clear from this definition that the following property holds, which enables us to manipulate inequalities using a host of common functions.</p>
<div id="theorem:inequalities_functions" class="theorem">
<p>For all non-negative real numbers <span class="math inline">\(a\)</span> and <span class="math inline">\(b\)</span>, and all strictly increasing functions <span class="math inline">\(f: \R^{\geq 0} \TO \R^{\geq 0}\)</span>, if <span class="math inline">\(a \leq b\)</span>, then <span class="math inline">\(f(a) \leq f(b)\)</span>.</p>
<p>Moreover, if <span class="math inline">\(a &lt; b\)</span>, then <span class="math inline">\(f(a) &lt; f(b)\)</span>.</p>
</div>
<p>It is this theorem that allows us to perform several common operations on inequalities as a “step” in a computation. For example, if we know <span class="math inline">\(0 &lt; a \leq b\)</span>, then we can conclude that <span class="math inline">\(a^2 \leq b^2\)</span>, or <span class="math inline">\(\log_2(a) \leq \log_2(b)\)</span>, because both of the functions <span class="math inline">\(x^2\)</span> and <span class="math inline">\(\log_2(x)\)</span> are strictly increasing functions.</p>
</section>
<footer>
<a href="https://www.teach.cs.toronto.edu/~csc110y/fall/notes/">CSC110 Course Notes Home</a>
</footer>
</body>
</html>