commit 53a43be0b0f6db39d90dffcfd46b45a4e48c6907 Author: Charlie Root Date: Sat Feb 21 21:34:56 2026 -0300 Let there be light. diff --git a/FILES b/FILES new file mode 100755 index 0000000..f4e126d --- /dev/null +++ b/FILES @@ -0,0 +1,21 @@ +calculus.aux +calculus.dvi +calculus.log +calculus.pdf +calculus.ps +calculus.tex +calculus.tex.~1~ +calculus.tex.~2~ +calculus.tex.~20~ +calculus.tex.~21~ +calculus.tex.~22~ +calculus.tex.~23~ +calculus.tex.~24~ +calculus.toc +FILES +freelance.txt +inequalities.txt +limits.txt +Makefile +PACKAGE +VERSION diff --git a/Makefile b/Makefile new file mode 100755 index 0000000..ca56183 --- /dev/null +++ b/Makefile @@ -0,0 +1,31 @@ +SHELL = /bin/sh + +default: compile-and-serve + +compile-and-serve: + latexmk -pdf -pvc calculus + +slides: + latexmk -pdf -pvc slides + +doit: \ +calculus.pdf # calculus.ps calculus.dvi + +calculus.dvi: \ +calculus.tex Makefile + latex \\nonstopmode\\input calculus.tex + +calculus.pdf: \ +Makefile calculus.tex refs.bib + pdflatex calculus.tex && pdflatex calculus.tex + +refs: \ +refs.bib + biber calculus + +calculus.ps: \ +calculus.dvi Makefile + dvips -o calculus.ps calculus.dvi + +clean: + rm -f *.ps *.dvi *.pdf *.log *.aux *.toc diff --git a/PACKAGE b/PACKAGE new file mode 100755 index 0000000..6bd0baf --- /dev/null +++ b/PACKAGE @@ -0,0 +1 @@ +calculus diff --git a/VERSION b/VERSION new file mode 100755 index 0000000..5a2a580 --- /dev/null +++ b/VERSION @@ -0,0 +1 @@ +0.6 diff --git a/calculus.pdf b/calculus.pdf new file mode 100755 index 0000000..d5eba2f Binary files /dev/null and b/calculus.pdf differ diff --git a/calculus.tex b/calculus.tex new file mode 100755 index 0000000..eaca1fd --- /dev/null +++ b/calculus.tex @@ -0,0 +1,5916 @@ +\documentclass[12pt,a4paper]{article} +\mathchardef\ordinarycolon\mathcode`\: +\mathcode`\:=\string"8000 +\begingroup \catcode`\:=\active + \gdef:{\mathrel{\mathop\ordinarycolon}} +\endgroup + +\usepackage[text={6.5in,9in},centering]{geometry} + +%% --8<---------------cut here---------------start------------->8--- +%% Fontes e línguas +\usepackage[utf8]{inputenc} +\usepackage[T1]{fontenc} +\usepackage[brazil]{babel} +\usepackage{csquotes} +\usepackage{lmodern} +\usepackage{fix-cm} +%% --8<---------------cut here---------------end--------------->8--- + +%% --8<---------------cut here---------------start------------->8--- +%% Bibliografia et cetera. +\usepackage[backend=biber]{biblatex} +\addbibresource{refs.bib} +%% --8<---------------cut here---------------end--------------->8--- + +%% --8<---------------cut here---------------start------------->8--- +%% Cores e links. +\usepackage[hyperref]{xcolor} +\definecolor{darkblue}{rgb}{0,0,0.4} +\usepackage[colorlinks=true,linkcolor=darkblue,citecolor=darkblue,urlcolor=darkblue]{hyperref} +%% --8<---------------cut here---------------end--------------->8--- + +%% --8<---------------cut here---------------start------------->8--- +%% Otimizações visuais +\usepackage{xfrac} +\usepackage{cancel} +\usepackage{booktabs} +%% --8<---------------cut here---------------end--------------->8--- + +\usepackage{amsmath,amsthm,amssymb} +\usepackage{icomma} +\allowdisplaybreaks +\theoremstyle{definition} +\newtheorem{theorem}{Teorema}[section] +\newtheorem{definition}{Definição}[section] +\newtheorem{lemma}[theorem]{Lema} +\newtheorem{proposition}[theorem]{Proposição} +\newtheorem{corollary}[theorem]{Corolário} +\newtheorem{exercise}{Exercício}[section] +\newtheorem{remark}{Comentário}[section] +\newtheorem{axiom}{Axioma}[section] + +\newtheorem*{theorem*}{Teorema} +\newtheorem*{definition*}{Definição} +\newtheorem*{lemma*}{Lema} +\newtheorem*{proposition*}{Proposição} +\newtheorem*{corollary*}{Corolário} +\newtheorem*{exercise*}{Exercício} +\newtheorem*{remark*}{Comentário} +\newtheorem*{notation*}{Notação} +\newtheorem*{axiom*}{Axioma} + +%% \newtheoremstyle{pf} % name +%% {10pt} % space above +%% {3pt} % space below +%% {} % body font +%% {} % indent amount (empty = 0, +%% % \parindent = para) +%% {\itshape} % head font +%% {.} % punctuation after head +%% {.5em} % space after head +%% % \newline = linebreak +%% {} % head spec (empty means `normal') +%% +%% \theoremstyle{pf} +\newtheorem*{pf}{Proof} + +% references +\newcommand{\refth}[1]{Theorem \ref{#1}} +\newcommand{\refex}[1]{Exercise \ref{#1}} +\newcommand{\refco}[1]{Corollary \ref{#1}} + +% sets +\newcommand{\reals}{\mathbb{R}} +\newcommand{\ints}{\mathbb{Z}} +\newcommand{\rats}{\mathbb{Q}} +\newcommand{\nats}{\mathbb{N}} +\newcommand{\complex}{\mathbb{C}} + +% jumps +\newcommand{\jmp}{\vspace{3pt}} + +% tags +\newcommand{\masciidef}[1]{\begin{definition*}[#1]} +\newcommand{\defend}{\end{definition*}} +\newcommand{\masciith}[1]{\begin{theorem*}[#1]} +\newcommand{\theend}{\end{theorem*}} +\newcommand{\masciiproof}{\begin{pf}} +\newcommand{\profend}{\qed\end{pf}} +\newcommand{\masciiexe}[1]{\begin{exercise*}[#1]} +\newcommand{\exeend}{\end{exercise*}} +\newcommand{\masciicor}[1]{\begin{corollary*}[#1]} +\newcommand{\corend}{\end{corollary*}} +\newcommand{\masciirem}[1]{\begin{remark*}[#1]} +\newcommand{\remend}{\end{remark*}} +\newcommand{\masciilemma}[1]{\begin{lemma*}[#1]} +\newcommand{\lemend}{\end{lemma*}} +\newcommand{\masciiprop}[1]{\begin{proposition*}[#1]} +\newcommand{\propend}{\end{proposition*}} + +% shortcuts +\newcommand{\pit}{{\em Prova. }} +\newcommand{\sol}{{\em Solução}} +\newcommand{\nor}{\trianglelefteqslant} +\newcommand{\nnor}{\ntrianglelefteqslant} +\newcommand{\subf}{\subseteq} +\newcommand{\nsubf}{\subsetneq} +\newcommand{\psubf}{\subset} +\newcommand{\ext}{\subseteq} +\newcommand{\cyc}[1]{\langle #1 \rangle} +\newcommand{\iso}{\cong} +\newcommand{\ov}[1]{\overline{#1}} +\newcommand{\otto}{\longleftrightarrow} +\newcommand{\hasnor}{\vartriangleright} +\newcommand{\bl}{\biggl} +\newcommand{\br}{\biggr} +\newcommand{\fr}{\dfrac} +\DeclareMathOperator{\floor}{floor} +\DeclareMathOperator{\arccot}{arccot} +\DeclareMathOperator{\tg}{tg} +\DeclareMathOperator{\cm}{cm} +\undef\sin +\DeclareMathOperator{\sin}{sen} +\DeclareMathOperator{\ctg}{ctg} +\DeclareMathOperator{\imp}{\implies} +\DeclareMathOperator{\inv}{inv} +\newcommand{\dx}{\ dx} +\newcommand{\du}{\ du} +\newcommand{\dy}{\ dy} +\newcommand{\dt}{\ dt} +\newcommand{\ds}{\ ds} + +\DeclareMathOperator{\csch}{csch} +\DeclareMathOperator{\sech}{sech} + +\DeclareMathOperator{\arcsinh}{arcsinh} +\DeclareMathOperator{\arccosh}{arccosh} + +\newcommand{\fdiff}{\fr{dy}{dx}} +\newcommand{\sdiff}{\fr{d^2 y}{dx^2}} + +% lattice tools +\newcommand{\edge}[1]{\ar@{-}[#1]} +\newcommand{\node}{*+[o][F-]{ }} + +\usepackage{graphicx} +\usepackage{caption} +\usepackage{lipsum} + +% title and dudes +\author{Charlie Root \& wife} +\title{Notes on Calculus} +\date{Jan 10, 2006} + +\begin{document} \fontfamily{cmr}\selectfont \maketitle + +%% \setlength{\parskip}{7pt} +%% \setlength{\parindent}{0pt} + +\section{Introdução} + +O habilidoso uso de ferramentas é condição {\em sine qua non} pra +análise matemática. Começamos por ferramentas que certamente usaremos +na empreitada. + +\subsection{O sistema Hindu-Arábico de numerais} + +\newcommand{\al}{al-Khow\={a}rism\={\i}} + +Os numerais que usamos são um fantástico sistema de raciocínio --- +provavelmente a maior contribuição matemática de todos os tempos. O +sistema foi disseminado por Ab\={u}'Abd All\={a} Muhammad ibn +M\={u}s\={a} al-Khow\={a}rism\={\i}'', nome que literalmente significa +pai de Abdullah, Mohammed, filho de Moisés, nativo de Khow\={a}rizm. +Os termos ``algarismo'' e ``algoritmo'' vêm do nome dele, \al. Por +volta do ano 825, al-Khow\={a}rism\={\i} escreveu o livro {\em Kitab + al jabr wa'l-muq\={a}bala}, que essencialmente significa ``regras +para recuperar e equacionar''~\cite[capítulo~1, seção~1.1, + página~1]{knuthv1}. O livro explica como usar os numerais. Mais +tarde foi traduzido e apareceu em latim sob o título ``Liber +Algorismi'', que significa ``o livro de +al-Khow\={a}rism\={\i}''~\cite[página~21]{eti}. Khow\={a}rism\={\i} +hoje é a cidade de Khiva no Uzbequistão. O termo {\em al} é o +equivalente ao artigo ``o'' da língua portuguesa. Então o nome +``al-Khow\={a}rism\={\i}'' significa, efetivamente, ``o (livro) +daquele que vem de Khiva''. + +A essência do sistema é usar os símbolos 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 +na expressão de um número natural. Por exemplo, o número quatro mil +trezentos e vinte um pode ser expresso pela soma $4000 + 300 + 20 + +1$, o que podemos (também) abreviar por $4321$. Observemos então que +os naturais têm um nome completo e um nome abreviado. O nome completo +de quatro mil trezentos e vinte um é +% + \[1\cdot10^0 + 2\cdot10^1 + 3\cdot 10^2 + 4\cdot 10^3 = 4321.\] +% +Quando usamos o nome completo, não precisamos nos preocupar com +qualquer ambiguidade de leitura --- não precisamos informar ao leitor +que o algarismo menos significativo encontra-se na direita. Já quando +usamos o nome abreviado, precisamos informar o fato --- em ``4321'', o +algarismo 4 representa o número quatro mil. O nome abreviado exige do +leitor que conte a quantidade de algarismos usados pelo número para +compreender seu algarismo mais à esquerda --- o mais significativo. +Já o nome completo pode ser escrito de várias formas. Por exemplo, +quatro mil trezentos e vinte um também pode ser escrito tanto por +% + \[4\cdot 10^3 + 3\cdot 10^2 + 2\cdot10^1 + 1\cdot10^0\] +% +quanto por +% + \[2\cdot10^1 + 1\cdot10^0 + 4\cdot 10^3 + 3\cdot 10^2,\] +% +dentre outras expressões. + +Agora fica evidente a suprema importância do algarismo zero. Ele +serve pra demarcar uma potência de dez, isto é, uma ``casa decimal''. +Se o número que desejamos escrever não é composto de qualquer centena, +mas é composto de alguns milhares, então escrevemos ``0'' quando +desejamos informar a quantidade de centenas e, assim, o algarismo que +escrevermos à esquerda do zero expressa a quantidade de milhares. + +Com essas ideias, \al\ nos ensina a raciocinar sobre números enormes +por via de considerar apenas cada uma de suas partes, ou seja, cada um +de seus algarismos. Podemos raciocionar sobre trilhões como se +algumas unidades fossem. A aritmética de \al, portanto, é +provavelmente a mais enfática ilustração científica de modularização e +análise. (``Enfática'' porque as aplicações são absolutamente +pervasivas.) Por exemplo, pra somar dois números, fazemos a soma em +cada algarismo correspondente, ou seja, unidade com unidade, dezena +com dezena, centena com centena e assim sucessivamente, como ilustra a +Figura~\ref{fg-alkw-sum}. + +\begin{figure}[!htb] + \centering +\begin{verbatim} + 1234 + + 4321 + ---- + 5555 +\end{verbatim} + \caption{Como computar uma soma segundo \al. Com quatro algarismos, + operamos quatro somas, algarismo a algarismo.} + \label{fg-alkw-sum} +\end{figure} + +Subtração é um caso levemente mais complicado. Subtrair significa +computar a distância entre dois números. Se desejamos 49 menos 17, +temos um caso fácil porque o algarismo 7 é menor que o algarismo 9 e o +algarismo 1 é menor que o algarismo 4. Assim obtemos a distância 2 +entre 7 e 9 bem como a distância 3 entre 1 e 4, logo $49 - 17 = 32$. +O caso mais complicado é quando o subtraendo não é menor que o +minuendo, que é o que ocorre em $37 - 19$, ilustrado pela +Figura~\ref{fg-alkw-diff}. + +\begin{figure}[!htb] + \centering +\begin{verbatim} + 37 20 + 17 + - 19 equivalente a - 10 - 9 + --- -- -- + 18 10 + 8 +\end{verbatim} + \caption{Subtração segundo \al. Se o algarismo do subtraendo é maior + que o algarismo do minuendo, use o sistema de \al\ e transfira um + potência de dez para simplificar o trabalho. Basta a + transferência de uma única potência de dez. A subtração desenhada + à esquerda desta figura é equivalente às duas subtrações e soma + desenhadas na direita. O número 37 é substituído por 20 + 17, + sendo que subtraímos 9 de 17 e depois 10 de 20. Por fim, somamos + as subtrações, obtendo $10 + 8 = 18$.} + \label{fg-alkw-diff} +\end{figure} + +Como é frequente no trabalho matemático, a subtração é reescrita de +forma que o trabalho seja facilitado no sentido de que cada tarefa +preliminar seja mais simples que o problema original, embora sob a +pena de que o problema original será resolvido com um maior número de +passos. + +Vejamos agora a multiplicação segundo \al. Para multiplicar 322 por +27, usaremos a distribuição da multiplicação sobre uma soma. Em +outras palavras, como $322\times27 = 322 \times 20 + 322 \times 7$, +computaremos cada problema em separado e somaremos o resultado, como +ilustra a Figura~\ref{fg-alkw-prod}. Os algarismos {\tt 644} +representam o número $6440 = 322 \times 20$, mas tipicamente omiti-se +o zero já que $322 \times 20 = 322\times 2 \times 10$ e multiplicação +por dez é trivial. + +\begin{figure}[!htb] + \centering +\begin{verbatim} + 322 + x 27 + --- + 2254 + + 644 + ------ + 8694 +\end{verbatim} + \caption{Como computar um produto segundo \al. Dado que 322 vezes 27 + é o mesmo que 322 vezes 7 mais 322 vezes 2 vezes 10, podemos + modularizar a computação de um produto por via de uma série de + somas.} + \label{fg-alkw-prod} +\end{figure} + +Como exercício, considere computar a multiplicação entre 123456789 e +987654321. É um trabalho perfeitamente executável com a ajuda de \al, +apesar de trabalhoso. A Figura~\ref{fg-alkw-long-prod} ilustra o que +acontece. Os fatores têm nove algarismos cada um, o que nos gera uma +soma envolvendo nove termos, cada um deles com nove algarismos --- +sugerindo um crescimento quadrático do volume de trabalho da +multiplicação convencional, isto é, da multiplicação de \al. + +\begin{figure}[!htb] + \centering +\begin{verbatim} +(*) A multiplicação de 123456789 por 987654321 + + 123456789 + x 987654321 + --------- + 123456789 + 246913578 + 370370367 + + 493827156 + 617283945 + 740740734 + 864197523 + 1987654312 + 1111111101 + 001221433341222100 transferências + ----------------- + 121932631112635269 +\end{verbatim} + \caption{A multiplicação entre 123456789 por 987654321 segundo \al. + Dedicamos esta conta a Leonardo Pisano. Obrigado, Fibonacci!} + \label{fg-alkw-long-prod} +\end{figure} + +Pra tornar tolerável o trabalho ilustrado pela +Figura~\ref{fg-alkw-long-prod}, é preciso auxiliar a memória humana. +Usamos uma linha de transferências onde anotamos as transferências +entre casas decimais. Por exemplo, na segunda casa decimal temos a +soma de 8 + 8 = 16; anotamos o algarismo 6 em seu lugar no produto +final e escrevemos o algarismo 1 na linha das transferências, +indicando assim que a soma da casa decimal anterior resultou-se em 16. +Em outras palavras, toda a informação necessária pra se continuar o +trabalho está no papel. Sendo assim, podemos trabalhar com números de +quaisquer tamanhos porque podemos interromper a operação depois de um +dia de trabalho e continuar no dia seguinte depois de um merecido +descanso. + +A divisão entre inteiros segundo \al\ é reduzida a um problema de +multiplicação e subtração. A Figura~\ref{fg-alkw-long-div} (na página +\pageref{fg-alkw-long-div}) ilustra o algoritmo chamado divisão longa. +Similar à estratégia exibida pela multiplicação longa da +Figura~\ref{fg-alkw-long-prod}, queremos uma estratégia que exponha no +papel toda a informação necessária para a execução da operação em +múltiplas etapas, já que os números não são minúsculos. Os símbolos +{\tt x} que marcamos no topo do dividendo representam os algarismos do +dividendo que já operamos na divisão. Por exemplo, se estivéssemos no +momento que em calculamos apenas o primeiro algarismo do quociente --- +que é 1 ---, teríamos marcado um {\tt x} só nos algarismos {\tt + 123456}, indicando que ainda consideraremos os algarismos {\tt + 789123456789} ao longo da computação do algoritmo. + +Por que se chama divisão longa? Pra ser constrastada com divisão +curta. Na divisão longa, escrevemos a multiplicação parcial do +quociente pelo divisor logo abaixo do dividendo parcial; em seguida, +efetuamos a subtração. Na divisão curta, omitimos a subtração tal que +escrevemos abaixo do dividendo apenas o resultado da subtração, +tornando a verificação do trabalho mais difícil. Também exibida pela +Figura~\ref{fg-alkw-long-div} (na página \pageref{fg-alkw-long-div}), +desenhamos uma seta indicando o produto do algarismo corrente do +quociente (corrente durante a execução do algoritmo) que deu origem ao +minuendo. Assim, o quociente escrito abaixo do divisor poderia ser +omitido da Figura~\ref{fg-alkw-long-div}. + +\begin{figure}[!htb] + \centering +\begin{verbatim} +(*) A divisão de 123456789123456789 por 123123 + + xxxxxxxxxxxxxxxxxx + 123456789123456789 / 123123 + -123123 --> 1 1002711021689 + ------ + 3337 + -0 --> 0 + ---- + 33378 + -0 --> 0 + ----- + 333789 + -246246 --> 2 + ------- + 875431 + -861861 --> 7 + ------- + 135702 + -123123 --> 1 + ------- + 125793 + -123123 --> 1 + ------- + 26704 + -0 --> 0 + ----- + 267045 + -246246 --> 2 + ------- + 207996 + -123123 --> 1 + ------- + 848737 + -738738 --> 6 + ------- + 1099998 + -984984 --> 8 + -------- + 1150149 + -1108107 --> 9 + -------- + 42042 --> resto +\end{verbatim} + \caption{A multiplicação entre 123456789 por 987654321 segundo \al. + O quociente é 1002711021689 e o resto, 42042. Se tivéssemos + interromido o algoritmo em qualquer momento, teríamos no papel + tudo que precisamos pra continuá-lo. Por falta de espaço, + exibimos a tabuada de 123123 na + Figura~\ref{fg-alkw-tabuada-123123}, que deve ser pré-computada + pra que evitemos a busca na escolha de algarismos do quociente.} + \label{fg-alkw-long-div} +\end{figure} + +\begin{figure}[!htb] + \centering +\begin{verbatim} +(*) A tabela de multiplicação por 123123 + +| 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | +|--------+--------+--------+--------+--------+--------+--------+--------+---------| +| 123123 | 246246 | 369369 | 492492 | 615615 | 738738 | 861861 | 984984 | 1108107 | +\end{verbatim} + \caption{Uma base de dados útil à divisão por 123123. Sem ela, + precisaríamos buscar cada algarismo do quociente a cada etapa, + correndo o risco de fazer escolhas incorretas, acarretando em mais + perda de tempo e momento.} + \label{fg-alkw-tabuada-123123} +\end{figure} + +\begin{figure}[!htb] + \centering +\begin{verbatim} +(*) A verificação do quociente de 123456789123456789 / 123123 + + 1002711021689 + x 123123 + ------------- + 3008133065067 + 2005422043378 + + 1002711021689 + 3008133065067 + 2005422043378 + 1002711021689 + 000110111222321100 transferências + ------------------ + 123456789123414747 + + 42042 resto + ------------------ + 123456789123456789 +\end{verbatim} + \caption{A verificação da divisão de 123456789123456789 por 123123.} +\end{figure} +Estudemos agora a divisão entre 322 e 37. A tabuada +(Figura~\ref{fg-alkw-322-37} na página \pageref{fg-alkw-322-37}) +revela imediatamente que o primeiro algarismo do quociente é 8. O +resto de $26 < 37$ revela que terminamos. Desejando a parte +fracionada da expansão decimal da divisão, continuamos. O zero que +justamos ao 26 representa o fato de que multiplicamos o resto 26 por +10. Por causa disso, precisaremos corrigir o quociente por via de uma +divisão por 10 --- o que é feito imediatamente com a adição do ponto +decimal. Encontramos o algarismo 7 e como resto obtemos $1 < +37$. Justapomos então um zero ao algarismo 1, obtendo o dividendo $10 +< 37$, revelando o algarismo zero da parte fracionada. Adicionamos +então novo zero, produzindo o algarismo 2 na parte fracionada. +Computando-se o resto, obtemos 26 novamente, revelando a dízima +periódica. O termo ``dízima'' significa a décima parte de alguma +coisa, mas no contexto em que estamos significa uma quantidade menor +que 1. O termo ``periódica'' é evidenciado pelo fato de que temos um +ciclo, o que representamos pelos colchetes --- ou seja, $322 \div 37 = +8.702[702] = 8.[702]$. A justificativa para esse sistema de +computação em papel é +% +\begin{align*} +\frac{322}{37} &= 8 + \frac{26}{37}\\ + &= 8 + \frac{260}{37} \cdot\frac{1}{10}\\ + &= 8 + \left(7 + \frac{1}{37}\right) \cdot\frac{1}{10}\\ + &= 8 + 7\cdot\frac{1}{10} + \frac{1}{37} \cdot\frac{1}{10}\\ + &= 8 + 7\cdot\frac{1}{10} + \left(\frac{100}{37} \cdot\frac{1}{100}\right) \cdot\frac{1}{10}\\ + &= 8 + 0.7 + (2 \cdot \frac{1}{100} + \frac{26}{37} \cdot\frac{1}{100}) \cdot\frac{1}{10}\\ + &= 8 + 0.7 + 0.002 + \frac{26}{37} \cdot\frac{1}{1000}\\ + &= 8 + 0.7 + 0.002 + 0.702 \cdot\frac{1}{1000}\\ + &= 8 + 0.702 + 0.000702 + \cdots +\end{align*} +% +\begin{figure}[!htb] + \centering +\begin{verbatim} +(*) A divisão de 322 por 37 + + 322 / 37 + -296 --> 8.[702] + ---- + 260 --> ponto decimal + -259 --> 7 + ---- + 10 --> 0 + -0 + -- + 100 --> 2 + -74 + --- + 260 --> dízima periódica + +(*) A tabuada de 37 + +| 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | +|----+----+-----+-----+-----+-----+-----+-----+-----| +| 37 | 74 | 111 | 148 | 185 | 222 | 259 | 296 | 333 | +\end{verbatim} +\caption{A divisão de 322 por 37.}\label{fg-alkw-322-37} +\end{figure} + +\subsection{A aritmética dos números racionais} + +Uma fração é uma espécie de número inteiro com uma unidade de medida +diferente da unidade universal. A ``unidade universal'' a que nos +referimos é o número 1. Por exemplo, o numeral 2 representa duas +unidades universais. Suponha que desejamos trabalhar com uma unidade +diferente --- por exemplo, seja nossa unidade a metade da unidade +universal. Então duas da nossa nova unidade faz uma unidade +universal. Se tenho 7 unidades da nossa nova unidade e quero somá-la +com mais 7 unidades da nossa nova unidade, então tenho 7 unidades da +unidade universal. Em outras palavras, existe uma clara conversão +possível entre unidades desde que todas sejam definidas em função da +unidade universal. + +O fato +% + $$\frac{a}{b} \times \frac{c}{d} = \frac{ab}{cd}$$ +% +decorre de definição matemática~\cite[capítulo~1, seção~3, + página~5]{mccoy}. O que fazemos a seguir é motivar essa definição, +mostrando que ela pode ser vista como natural --- pra alguma definição +de ``natural''. + +Definamos, por exemplo, que $1/4$ represente o inverso multiplicativo +do natural $4$, ou seja, $\inv(4) = 1/4$ é o número $x$ que soluciona +a equação $4x = x + x + x + x = 1$, o que é o mesmo que dizer que se +agruparmos quatro partes dessa parte chamada $1/4$, obtemos a unidade +universal inteira. Decorre imediatamente daí que o inverso +multiplicativo de $1/4$ é $\inv(1/4) = 4$. Assim temos +% + $$ 4 \times \inv(4) = \inv(4) \times 4 = 1,$$ +% +assumindo que multiplicação é comutativa. + +\begin{notation*} +Adotamos a convenção de não precisar escrever o símbolo da +multiplicação, que é o símbolo $\times$, sempre que estiver claro que +a justaposição de símbolos expressa o produto entre dois ou mais +termos. +\end{notation*} + +Assim, podemos deduzir +% +\begin{align*} + 4 \inv(4) &= 1\\ + (4 \inv(4)) (4 \inv(4)) &= 1\\ + 16 (\inv(4))^2 &= 1, +\end{align*} +% +e logo $\inv^2(4)$ é o inverso multiplicativo de 16, que é o mesmo que +dizer $(1/4)^2 = (1/4)(1/4) = 1/16$, já que $1/4$ é só uma segunda +notação para $\inv(4)$. + +Estendemos a definição pra que $5/4$, por exemplo, seja uma forma de +escrever cinco vezes o inverso multiplicativo de quatro, o que é o +mesmo que tomar cinco unidades universais e dividi-las em quatro +partes iguais. Fica determinado assim o significado de se tomar um +número natural $m$ e multiplicá-lo pelo inverso multiplicativo de um +número natural $n$. Em símbolos, a definição determina o significado +de +% + $$m \inv(n) = m \times \frac{1}{n}.$$ +% + +Agora perguntamos --- quanto é $5/4 \times 7/3$? + +Por definição, $5/4$ é a soma de cinco peças de tamanho $1/4$, ou +seja, $5 \times (1/4)$. Similarmente, $7/3 = 7 \times (1/3)$. Usemos +uma barra de sabão como ilustração da unidade universal. Repartindo a +barra em três partes iguais, qualquer uma delas é representada pelo +numeral $1/3$. Se partirmos cada um desses $1/3$ em quatro partes +iguais, teremos um total de $4 + 4 + 4 = 12$ partes novas, menores que +as anteriores --- o tamanho exato delas é $1/12$ porque com 12 delas +obtemos a barra de sabão inteira. Observamos que $1/3$, expresso por +essas partes novas menores, exige quatro delas, ou seja, $1/3 = 1/12 + +1/12 + 1/12 + 1/12$. Similarmente, repartimos as partes de tamanho +$1/4$ em três partes, obtendo uma novo pedaço da barra de sabão que +vem a ser também de tamanho $1/12$. Logo, $(1/4) = 1/12 + 1/12 + +1/12$. Assim, computamos +% +\begin{align*} + \frac{5}{4} \times \frac{7}{3} &= 5 \times \frac{1}{4} \times 7 \times \frac{1}{3}\\ + &= 5\times7\times \frac{1}{4} \times \frac{1}{3}\\ + &= 35 \times 3 \times \frac{1}{12}\times 4\times\frac{1}{12}\\ + &= 35 \times 3 \times 4 \times \frac{1}{12}\times \frac{1}{12}\\ + &= 420 \times \frac{1}{12}\times \frac{1}{12}\\ + &= 420 \times \inv(12) \times \inv(12)\\ + &= 420 \times \inv^2(12) = 420 \times \inv(12^2) = 420 \times \inv(144)\\ + &= 420 \times \frac{1}{144}\\ + &= \frac{420}{144}\\ + &= \frac{35}{12}, +\end{align*} +% +como desejado. + +Com a multiplicação definida, a divisão de frações é reduzida à +multiplicação. Em símbolos, definimos que +% + $$\frac{a/b}{c/d} = \frac{a}{b}\frac{d}{c},$$ +% +o que é natural, visto que $\inv(c/d) = d/c$. + +Agora perguntamos --- quanto é $3/4 + 7/6$? Com unidades diferentes, +não podemos somar. Mas $3/4 = 18/24$ e $7/6 = 28/24$, logo $3/4 + 7/6 += 46/24$. Subtração é similar. Isso mostra que a aritmética de +frações não é diferente da aritmética de inteiros. Quando colocamos +as frações em unidades equivalentes, podemos operará-las como se +inteiros fossem. + +\subsection{A aritmética dos números irracionais} + +Os números irracionais são de difícil aritmética. A matemática nunca +conseguiu oferecer uma linguagem expressiva o suficiente pra manipular +os números irracionais respeitando a tradição matemática em que +computações são executadas por via da escrita em função de uma +linguagem composta por um conjunto finito de símbolos. O número +$\sqrt{2}$, por exemplo, é um caso feliz no sentido de que usamos os +símbolos $\sqrt{\cdot}$ e $2$ como forma de expressá-lo. Em outras +palavras, apesar dos símbolos 0--9 não serem suficientes para escrever +$\sqrt{2}$ de forma finita, como a tradição matemática efetivamente +normatiza, conseguimos um resultado satisfatório ao introduzir ``novos +verbos'' em nossa linguagem --- como ``$\sqrt{\cdot}$''. É, aliás, +por isso que os matemáticos definem que $\sqrt{2}$ é um número +algébrico: pode ser expresso por uma linguagem algébrica. Outros +irracionais como $e$ ou $\pi$ são chamados de transcendentais porque +transcendem qualquer linguagem algébrica, ou seja, cada um deles +precisaria de um novo símbolo. É notório, entretanto, que os +trancendentais são vastamente mais abundantes na linha real (pra +alguma definição de ``abundantes'') que os algébricos. (Matemáticos +costumam dizer ``quase todos os números da linha real são +transcendentais'', sendo ``quase todos'' um termo definido na Teoria +da Medida.) Portanto, não ter uma linguagem com a qual escrever esses +números significa que a vasta maior parte dos números escapa a nosso +poder de expressão, ou seja, nossos sistemas operam um conjunto ínfimo +de números. Em 1936--1937, por exemplo, Alan Turing surpreende o +mundo com a descoberta dos números não-computáveis, números +transcendentais cujos algarismos jamais poderiam ser obtidos por um +programa de computador. A relevância do fato é que programa de +computador é apenas uma realização da expressibilidade dos nossos +sistemas de cálculo. Logo, a limitação se aplica a nós --- porque os +computadores são apenas uma realização do nossos sistemas de +raciocínio. Temos números ``demais'' na linha real no sentido de que +não temos (e não teremos) uma linguagem expressiva o suficiente pra +alcançá-los, o que nos leva a questionar nossa concepção intelectual +de ``número'' --- problema difícil. + +\subsection{O teorema fundamental da aritmética} + +Decorre do lema de Euclides. Essa é maior evidência de que Euclides +já conhecia o teorema fundamental. Ele provavelmente não o escreveu +como Gauss o fez em 1801 porque ele não tinha linguagem suficiente pra +isso, mas devia ter uma clara noção de que a teoria dos números +estaria implicada em seu lema. + +\begin{axiom*}[da boa ordem] +Todo subconjunto não-vazio dos números naturais possui um elemento mínimo. +\end{axiom*} + +\begin{lemma*}[de Euclides] +Se $p$ é um primo que divide $ab$, então $p$ divide $a$ ou $p$ divide $b$. +\end{lemma*} + +\begin{theorem*}[fundamental da aritmética] +Qualquer número natural é expresso unicamente por um produto de +números primos exceto pela ordem desses fatores. +\end{theorem*} + +\begin{proof} +Primeiro provamos a expressão por primos. Só depois nos preocupamos em +mostrar que é unica. Seja $E$ o conjunto de todos os naturais que não +podem ser expressos por um produto de primos. ($E$ é o conjunto dos +naturais \underline{e}stranhos.) Pelo axioma da boa ordem, existe um +natural mínimo $m$ em $E$. Esse $m$ não é primo: se fosse, não +estaria em $E$. Mas se $m$ é composto, então $m = m_1 m_2$ e $1 < m_1 +< m$ e $1 < m_2 < m$, implicando que nem $m_1$ nem $m_2$ estão em +$E$. Se não estão em $E$, então eles podem ser expressos por um +produto de primos, implicando que $m$ também pode. Logo, $m \in E$ é +uma contradição. + +A parte difícil do teorema é provar que são únicos. É difícil porque +a escrita dela é difícil, mas não é difícil compreender o que acontece +nela. + +Queremos mostrar que a fatoração é única no sentido especificado pelo +teorema. Assuma que existam naturais que possuam pelo menos duas +fatorações primas distintas. Seja $E$ (de ``\underline{e}stranhos'') o conjunto +composto por esses naturais. Então $E$ possui um menor elemento, +chame-o de $m$. Pela definição de $E$, o número $m$ pode ser escrito como +% + $$p_1^{e_1} \cdots p_r^{e_r} = m = q_1^{d_1} \cdots q_s^{d_s},$$ +% +sendo $p_i, q_i$ primos tal que tenhamos acima duas formas distintas +de escrever $m$. + +\begin{remark*} +Observe que podemos escrever a equação acima sem potências --- por +exemplo, se $e_1 = 3$, podemos escrever $p_1 p_1 p_1$ em vez de +$p_1^3$, mas aí o segundo $p_1$ deve ser escrito com índice $2$, já que é +o segundo a aparecer e, logo, $p_1^3$ é escrito como $p_1 p_2 p_3$, +sendo certo neste exemplo que $p_1 = p_2 = p_3$. Assim obtemos +% + $$p_1 p_2 \cdots p_r = m = q_1 q_2 \cdots q_s$$ +\end{remark*} + +\begin{remark*} +Comentário. Note que $r$ pode ser igual a $s$ ou diferente --- isto +é, nada se afirma sobre a quantidade de fatores de $m$ nessas duas +fatorações. +\end{remark*} + +Agora observe que $p_1$ é um primo que divide $m$. Portanto, $p_1$ tem +que dividir o lado direito da equação também, implicando que $p_1$ divide +tanto $m$ quanto a fatoração prima do lado direito --- ou seja, acabamos +de satisfazer as condições do Lema de Euclides. + +\begin{remark*} +Veja por quê. Escreva o Lema de Euclides na sua forma típica. Se $p$ +divide $ab$ e $p$ não divide $a$, então $p$ divide $b$. Seja $m$ o +produto $ab$. (Basta pegar qualquer uma das fatorações de $m$ e +escrevê-la como apenas dois fatores $a$, $b$ de forma que o fator $a$ +não contenha o primo $p$.) Então $p$ não divide $a$, mas vai ter que +dividir $b$ e $b$ é composto de primos $q_i$. Portanto, $p$ tem que +dividir algum primo $q_i$, que é a dedução que fazemos em seguida. +\end{remark*} + +Logo, Euclides garante que $p_1$ divide algum $q_i$, implicando que $p_1 += q_i$ pra algum $i$ satisfazendo $1 \leq i \leq s$. + +\begin{remark*} +Podemos tranquilamente assumir que $i = 1$. Basta pegar o +primo $q_i$ e escrevê-lo primeiro na fatoração-$q$ de $m$. +\end{remark*} + +Logo, $p_1$ aparece em ambas fatorações primas de $m$, o que nos permite +cancelá-lo em ambas, obtendo +% + $$\frac{m}{p_1} = p_2 ... p_r = q_2 ... q_s$$ +% +implicando, assim, que $m/p_1$ tem duas fatorações primas distintas e, +logo, $m/p_1$ pertence ao conjunto $E$. Mas $m/p_1$ é certamente +menor que $m$, violando o fato de que $m$ é o menor elemento de $E$. +Então $E$ não possui um menor elemento e, portanto, tem que estar +vazio. Logo, a fatoração de $m$ é única, como desejado. +\end{proof} + +\subsection{A versão {\em inversa} do teorema de Pitágoras} + +O teorema de Pitágoras afirma que se um triângulo tem um ângulo de +noventa graus, então seus lados satisfazem $c^2 = a^2 + b^2$, sendo +$c$ a hipotenusa. O {\em converso} do teorema de Pitágoras afirma que +se os lados de um triângulo qualquer satisfizerem $c^2 = a^2 + b^2$, +então o triângulo possui um ângulo de noventa graus. Infelizmente, o +converso do teorema também é chamado no Brasil e em Portugal de ``o +recíproco do Teorema de Pitágoras''. O problema é que existe um +terceiro teorema chamado ``{\em the reciprocal Pythagorean theorem}'' +que relaciona a altura $h$ de um triângulo retângulo relativo ao +ângulo reto, afirmando que +% + $$\frac{1}{h^2} = \frac{1}{a^2} + \frac{1}{b^2}.$$ + +A tradução (para português) do livro ``Calculus'' de James Stewart, +feita pela Cengage Learning em 2009, que é uma tradução da sexta +edição norte-americana, traduz ``{\em converse of the Pythagorean}'' +para ``a recíproca do teorema de Pitágoras''~\cite[problema~12, + apêndice~B, página~A14]{calculo}, o que me fez inicialmente achar +que se tratava do ``{\em the reciprocal Pythagorean theorem}''. +Felizmente, o mundo anglofônico também chama o {\em reciprocal + Pythagorean theorem} de {\em inverse Pythagorean theorem}, o que +traduzo --- a partir de agora --- para o ``inverso do teorema de +Pitágoras'', evitando assim uma tremenda confusão. + +O inverso do teorema de Pitágoras relaciona o inverso multiplicativo +do quadrado de cada cateto com a altura uma altura do triângulo. Pra +conhecê-lo, precisamos desenhar um triângulo para nomear seus lados e +escrever o teorema. Desenhe um triângulo com lados $a, b, c$ de forma +que $c$ seja a hipotenusa e $a, b$ os catetos. Trace a altura do +triângulo relativa ao ângulo reto e chame-a de $d$, ou seja, trace um +segmento de reta perpendicular à hipotenusa a partir do ângulo reto. +Agora olhe para o triângulo de duas perspectivas diferentes: na +perspectiva (1), tome o segmento $d$ como a altura do triângulo e, +assim, sua área é $cd/2$, já que $c$ é a base; na perspectiva (2), +tome $b$ como a altura do triângulo e, assim, sua área é $ab/2$. As +duas perspectivas dizem a área de um mesmo triângulo, logo $cd/2 = +ab/2$, que implica $cd = ab$. + +O teorema de Pitágoras afirma que $c^2 = a^2 + b^2$, o que implica +$1/b^2 + 1/a^2 = c^2(a^2 b^2)$. Mas como inferimos acima que $ab = +cd$, então $a^2b^2 = c^2 d^2$. Logo, $1/b^2 + 1/a^2 = c^2(c^2 d^2) = +1/d^2$, que é a afirmação do teorema. Em palavras, a soma dos +inversos (multiplicativos) do quadrado dos catetos é o inverso +(multiplicativo) do quadrado da altura $d$. + +%% Uma aplicação da recíproca é provar que um ângulo é reto? O +%% Teorema de Pitágoras já não faz isso? Faz. Não sei pra que serve +%% esse teorema. + +Eis uma versão trigonométrica da obtenção da recíproca do teorema de +Pitágoras. Seja $x$ o ângulo entre $a$ e $c$. Então $\sin x = d/a$ e +$a = d/\sin x$. Como uma segunda perspectiva, $\sin x = b/c$ e $b = c +\sin x$. Agora $$ab = \frac{d c\sin x }{\sin x} = cd,$$ como +desejado. + +\begin{exercise*} +Um triângulo retângulo tem catetos $y$ e $4$, hipotenusa $h$ e altura +$a$ perpendicular à hipotenusa. Expresse a altura com respeito a $h$. +\sol. O inverso do teorema de Pitágoras nos dá $1/a^2 = 1/y^2 + +1/16$. O teorema de Pitágoras nos dá $h^2 = y^2 + 16$, logo $y = +\sqrt{h^2 - 16}$. Assim, +% +\begin{align*} + \frac{1}{a^2} &= \frac{16 + y^2}{16y^2}\\ + a^2 &= \frac{16y^2}{16 + y^2}\\ + a &= \frac{4y}{\sqrt{16 + y^2}}\\ + &= \frac{4 \sqrt{h^2 - 16}}{\sqrt{h^2}}, +\end{align*} +% +como desejado. + +\end{exercise*} + +\begin{exercise*} +Um triângulo retângulo tem uma altura de 12 cm relativa ao ângulo +reto, ou seja, a altura de 12 cm é perpendicular à hipotenusa. +Expresse o tamanho da hipotensua com respeito ao perímetro do +triângulo. + +O perímetro $P = a = b + c$, sendo $c$ a hipotenusa. Então $c = P - a +- b$. Queremos eliminar $a$ e $b$. A versão inversa do teorema de +Pitágoras nos dá $1/12^2 = 1/a^2 + 1/b^2$. E agora? +\end{exercise*} + +\subsection{Fatoração {\em et cetera}} + +Descrevemos aqui uma série de fatos que usaremos inúmeras vezes. + +\subsubsection{Fatoração de polinômios quadráticos por completar o quadrado} + +Uma técnica pra se fatorar um polinômio quadrático é completar o +quadrado. Alguns polinômios são quadrados perfeitos. Por exemplo, +$x^2 + 2x + 1 = (x + 1)^2$. Logo, são fatoráveis por ``produtos +notáveis'', como são tipicamente chamados. Outros não são perfeitos +como $$p(t) = t^2 ++ \frac{7}{2}t + \frac{3}{2},$$ mas podemos adicionar uma constante a +eles que os torna produtos notáveis. A ideia é a seguinte. O termo +$t^2$ é claramente um quadrado de lado $t$. Se você estender um +retângulo pra cima e outro pra direita do quadrado $t$, você obterá +dois retângulos em que um lado tem tamanho $t$. O outro lado precisa +ser um número em que a área ocupada pelos retângulos resultem em +$\sfrac{7}{2}t$. Esse número é a metade de $\sfrac{7}{2}$. Assim +temos $t^2 + \sfrac{7}{4}t$, que ainda não é um quadrado perfeito +porque está faltando a área de um quadrado de lado $\sfrac{49}{16}$, +que é o quadrado da metade de $\sfrac{7}{2}$. Daí terminamos +com $$t^2 + \frac{7}{2}t + \frac{49}{16} = \left(t + +\frac{7}{4}\right)^2.$$ Como o polinômio original possui o termo +$\sfrac{3}{2}$, precisamos adicioná-lo ao quadrado e também subtrair o +termo \sfrac{49}{16} que adicionamos. Assim obtemos a igualdade +% + $$t^2 + \frac{7}{2}t + \frac{3}{2} = p(t) = \left(t + \frac{7}{4}\right)^2 + \frac{3}{2} - \frac{49}{16},$$ +% +como desejado. + +\subsubsection{Fatoração de polinômios quadráticos com coeficiente líder} + +Precisaremos calcular números como +% + $$\lim \frac{t^2 - 9}{2t^2 + 7t + 3}.$$ +% +Será preciso fatorar numerador e denominador aí. O numerador é uma +{\em diferença entre dois quadrados} em que se tem o produto dos +conjugados $(t + 3)(t - 3)$. +%% \footnote{Não se deve chamar isso de um produto de conjugados. É +%% uma terminologia problemática nesse caso. De uma forma geral, t^2 - +%% n = (t - \sqrt{n})(t + \sqrt{n}) pra todo $n$ inteiro e daí podemos +%% definir uma função $f$ tal que $f(a + b\sqrt{n}) := a -b\sqrt{n}$, +%% sendo $a, b$ números racionais --- digamos. Essa função é +%% tipicamente chamada de conjugação. Ela pode ser vista como uma +%% generalização da conjugação complexa restrita a inteiros +%% gaussianos, que não números complexos da forma $a + bi$, sendo $a, +%% b$ inteiros. A generalização, portanto, é relaxar os inteiros +%% gaussianos e permitir racionais. Se definirmos $f$ assim, obtemos +%% uma contradição quando $n$ é um quadrado perfeito. Por exemplo, +%% seja $n = 9$. Então $f(1 + 2\sqrt{9}) := 1 - 2\sqrt{9} = 1 - 6 = +%% -5$. Agora compute $f(1 - 2\sqrt{9}) := 1 + 2\sqrt{9} = 1 + 6 = +%% 7$.} +O denominador é menos claro. Quando se tem uma constante no +coeficiente líder, pode-se procurar por uma fatoração da forma $(2t + +a)(t + b)$. Observe que o problema é o mesmo que fatorar um polinômio +quadrático mônico, que é um polinômio de coeficiente líder igual a 1. + +Em mais detalhes, se +% + $$Lt^2 + 7t + 3 = (Lt + a)(t + b) = Lt^2 + (Lb + a)t + ab,$$ +% +então, pra encontrarmos uma fatoração (se existir), a pista mais +relevante é o termo $ab$. Se, por exemplo, $ab = 3$, deduzimos que só +há duas possibilidades --- $a = 1, b = 3$ ou $a = 3, b = 1$ porque 3 é +primo. É o caso acima. Queremos $ab = 3$ e $(2b + a) = 7$. Se +tentarmos $b=1$, não conseguimos porque $2b + a$ vai dar 5. Se +tentarmos $a=1$, conseguimos: $2b + a = 6 + 1 = 7$. Logo, $2t^2 + +7t + 3 = (2t + 1)(t + 3)$. Em outras palavras, o coeficiente líder +maior que 1 não chega a modificar o método de fatoração --- é só uma +pequena perturbação. O maior problema é quando o termo $ab$ oferece +muitas possibilidades. Por exemplo, fosse $ab = 24$, a coisa se +complica um pouco mais porque $24 = 1\times24 = 2\times12 = 4\times6 = +8\times3$, sendo que cada produto aí oferece duas possibilidades. +Várias possibilidades a verificar --- oito nesse caso. + +\subsubsection{Fatoração de soma e diferença de cubos} + +Outros produtos notáveis são a {\em soma de cubos} e a {\em diferença + de cubos}. Por exemplo, +% +\begin{align*} +a^3 + b^3 &= (a + b)(a^2 - ab + b^2)\\ +a^3 - b^3 &= (a - b)(a^2 + ab + b^2) +\end{align*} +% +Se lembrarmos de um, provavelmente lembramos do outro por inverter os +sinais nos lugares certos e fazendo a expansão pra confirmar o +resultado. Se esquecermos de ambos, podemos recuperá-los efetuando a +divisão longa de, por exemplo, $a^3 + b^3$ dividido por $a + b$: +% +\begin{verbatim} + a^3 + b^3 dividido por a + b + a^3 + a^2b a^2 + b^2 - ab + ---------- + b^3 - a^2 b + b^3 + a b^2 Logo, a^3 + b^3 = (a + b)(a^2 - ab + b^2). + ------------- + -a^2 b - a b^2 + -a^2 b - a b^2 + -------------- + 0 +\end{verbatim} +% +Se for útil, observe que quando queremos a soma, o termo linear é uma +soma. Quando queremos a diferença, o termo linear é uma subtração. +Se o termo linear é uma soma, o quadrático é uma subtração. Se o termo +linear é uma subtração, o quadrático é uma soma. Os sinais têm que se +inverter que é pra ocorrer uma cancelamento de termos não cúbicos: de +outra forma, não teríamos a identidade. + +\subsubsection{Fatoração envolvendo cubos e quadrados} + +Às vezes encontramos mais de uma identidade na mesma expressão. Por +exemplo, $x^6 - y^6 = (x^2)^3 - (y^2)^3$. É uma diferença de cubos, +mas também é uma diferença de quadrados, afinal +% + $$(x^3)^2 - (y^3)^2 = x^6 - y^6 = (x^2)^3 - (y^2)^3,$$ +% +isto é, exponenciação é comutativa --- embora não associativa. +Percebendo um caso desses, é preciso ver qual fatoração é mais +interessante. Tente ambas. + +\subsubsection{O teorema das raízes racionais} + +Dado um polinômio de coeficientes inteiros, o teorema garante que +qualquer raiz racional $p/q$ reduzida implica que $p$ é fator do termo +constante e que $q$ é fator do coeficiente líder. É possível, então, +--- fazendo uma busca por fatores --- saber se há raízes racionais. + +Por exemplo, suponha que desejamos pelo máximo local de $f(x) = -x^3 + +7x^2 -11x + 5$. Se houver uma raiz racional $\pm p/q$ de $f(x)$, +então $p$ divide $5$ e $q$ divide 1, logo $p \in \{\pm 1, \pm 5\}$, $q += \pm 1$, o que nos dá candidatos $r \in \{\pm 1, \pm 5\}$ e assim +descobrimos que são raízes $r = 1$ e $r = 5$. Então $(x - 1)$ fatora +$f(x)$. Dividindo $f(x)$ por $(x - 1)$, obtemos +% +\begin{align*} + -x^3 + 7x^2 -11x + 5 &= (x - 1)(-x^2 + 6x - 5)\\ + &= -(x - 1)(x^2 - 6x + 5)\\ + &= -(x - 1)(x - 1)(x - 5)\\ + &= -(x - 1)^2 (x - 5), +\end{align*} +% +o que significa que $x = 1$ é uma raiz de multiplicidade 2, o que +significa que $x = 1$ é um mínimo local, logo o máximo local está +entre em (1, 5). Pra descobrir o máximo local exatamente, precisamos +das raízes de $f'(x) = -3x^2 + 14x - 11$. O fato de $x = 1$ ser um +mínimo local revela que $x=1$ é raiz de $f'(x)$, o que nos permite +fatorar $f'(x)$. Obtemos +% + $$-3x^2 + 14x - 11 = (x - 1)(-3x + 11),$$ +% +implicando que o máximo local tem que estar em $x = 11/3$. + +\subsubsection{O método de Horner} + +\lipsum[1] + +\subsubsection{Manipulação algébrica por racionalização} + +Para calcular +% + $$\lim_{h \to 0} \frac{\sqrt{4 + h} - 2}{h},$$ +% +podemos multiplicar pelo conjugado do numerador, que é $\sqrt{4 + h} + +2$. Obtemos +% +$$\lim_{h \to 0} \frac{\sqrt{4 + h} - 2}{h} + = \lim \frac{4 + h - 4}{h\sqrt{4+h}+2} + = \lim \frac{1}{\sqrt{4+h}+2}.$$ +% +Compreenda a cultura matemática. Por que se chama ``racionalização''? +Seria talvez por que a operação transforma a expressão numa função +racional? (Qual a definição de função racional?) O termo +``racionalização'' poderia se chamar ``derradicalização'' porque o +objetivo é remover um {\em radical} e não transformar a expressão numa +função racional. Entretanto, às vezes essa ``derradicalização'' +ocorre no numerador e às vezes, no denominador. Muitas vezes o +executor da álgebra não explicita exatamente que racionalização ele +deseja, assumindo que a audiência compreenderá. + +Trocamos um radical no numerador por um radical no denominador, o que +parece lucro nenhum. Obtém-se o lucro ao perceber que, no exemplo +acima, a racionalização é claramente desejada no numerador porque o +objetivo ali é computar um limite, o que não é possível quando ambos +numerador e denominador se aproximam de zero. Com a racionalização, o +limite é trivialmente obtido --- $\sfrac{1}{4}$. + +\begin{remark*} +Quando se racionaliza uma expressão, sempre se obtém uma diferença de +quadrados. Memorizando o fato, não precisamos calculá-lo. +\end{remark*} + + + +\subsection{Desigualdades} + +Precisamos de bastante intimidade com desigualdades. Por que não +podemos multiplicar uma desigualdade por $-1$? Porque não produz +verdades: por exemplo, $2 < 3$ não implica $-2 < -3$, mas certamente +implica $-3 < -2$: a relação se inverte no lado negativo. +Multiplicação por números positivos maiores que um pode ser feita. Já +computar inversos multiplicativos inverte as desigualdades, mas só se +o inverso for positivo. Por exemplo, $2 < 3$, mas multiplicar essa +desigualdade por $-1/2$ produziria a falsidade $-1 > -3/2$. + +\subsubsection{A desigualdade triangular} + +Uma desigualdade famosa é a tringular~\cite[teorema~7, apêndice~A, + página~A8]{calculo}. Se $x$ e $y$ são dois números positivos, então +certamente $|x + y| = |x| + |y|$. Se ambos forem negativos, também +teremos $|x + y| = |x| + |y|$. Agora, se os sinais deles se invertem, +isso faz com com que $x + y$ seja um número menor que $|x| + |y|$. +Assim, +% + $$|x + | \leq |x| + |y|,$$ +% +como desejado. + +\subsubsection{O uso de desigualdades em limites} + +Provar limites requer habilidade com desigualdades. Por exemplo, +provar que $\lim 4 - \sfrac{3x}{5} = 7$ à medida que $x\to -5$ requer +mostrar que $|4 - \sfrac{3x}{5} - 7| < e$. Some $4 - 7$, fatore o +$-3$, coloque-o em evidência fora do valor absoluto, divida a +desigualdade por $3$. Abra o valor absoluto em duas desigualdades. +Multiplique ambas por 5 e obtenha $|x - (-5)| < \sfrac{5e}{3}$. + +Agora considere provar $\lim 1/x = 1$ com $x\to 1$. Teremos que nos +restringir ao redor de $x=1$, mas --- sem tomar cuidado --- +terminaremos indo ao lado negativo do domínio, o que faz a função +descer sem limite, prejudicando nossas desigualdades. Por exemplo, +restrinja $|x - 1| < 1$ e observe que a restrição implica $0 < x < 2$, +produzindo $1/2 < 1/x < \text{{\tt indefinido}}$. Em outras palavras, +a restrição $|x - 1| < 1$ é folgada demais e nos leva ao ponto $x = 0$ +de discontinuidade da função. Basta nos restringirmos de forma mais +apertada --- um raio de 1/2 resolveria. Mas podemos sempre ser mais +conservador usando, por exemplo, um raio de 1/4. Obteríamos $-1/4 < x +- 1 < 1/4$ implicando $4/5 < 1/x < 4/3$, o que nos dá a restrição +$1/|x| < 4/3$. Daí $d = \min(4/3, 3e/4)$ servirá bem. + +Estamos fora de contexto aqui: nem definimos o que é limite e já +estamos falando das dificuldades com eles. A mensagem é --- +desenvolva-se com desigualdades porque elas são fundamentais na +análise matemática, especialmente se você se interessa por um estudo +além-Cálculo. + +No problema 36 da Seção 2.3~\cite[página~96]{stewart}, precisamos +provar que $\lim 1/x = 1/2$ com $x \to 2$. Uma estratégia pra este é +muito parecida com a do problema anterior. Restrinja $|x - 2| < 1/4$ +e obtenha $1/|2x| < 2/7$. Daí $d = \min(2/7, 7e/2)$ servirá bem. + +Aproveite o momento e observe a dica do problema +37~\cite[página~96]{stewart}. O problema é provar que $\sqrt{x} \to +\sqrt{a}$ com $x \to a$, assumindo $a > 0$. A dica é que $|\sqrt{x} - +\sqrt{a}| = |x - a|/(\sqrt{x} + \sqrt{a})$. O problema não elabora +porque elaborar consome parágrafos e parágrafos, mas a dica pode até +ser omitida porque ela é uma simples manipulação algébrica. Estamos +interessados em mostrar $|\sqrt{x} - \sqrt{a}| < e$, mas precisamos de +uma conexão com $|x - a|$. Racionalize a expressão $\sqrt{x} - +\sqrt{a}$, obtendo $(x - a)/(\sqrt{x} + \sqrt{a})$. O numerador pode +ser negativo, mas sempre que ele for, também será a expressão +$\sqrt{x} - \sqrt{a}$. Essas duas expressões também são sempre +positivas sempre que uma delas for positiva. Então $|\sqrt{x} - +\sqrt{a}|$ é positiva se e somente se $|x - a|$ também for, o que nos +dá a equação da dica. + +Eis uma prova elegante do fato. Seja $d = e\sqrt{a}$. Então +% +$$|\sqrt{x} - \sqrt{a}| = \left|\frac{x - a}{\sqrt{x} + \sqrt{a}}\right| + = \frac{|x-a|}{\sqrt{x} + \sqrt{a}} + \leq \frac{|x - a|}{\sqrt{a}} + < \frac{d}{\sqrt{a}} + < e.$$ +% +Essa prova nos leva a conclusões importantes. A restrição não precisa +ser simétrica: observe que a prova acima toma $d$ {\em menor} que um +fator de $e$. Devemos ler a prova da direita pra esquerda. É lá na +direita que está a assunção de que $|x - a| < d$. Daí manipulação +algébrica nos leva ao lado esquerdo, provando que $|\sqrt{x} - +\sqrt{a}| < e$, como desejado. + +Elaboremos a observação sobre simetria relativa a $d$. Suponha que +digamos que $d = 1$. Então assumimos que $|x - a| < 1$, o que implica +$-1 < x - a < 1$, mas isso não nos ajuda porque valores negativos não +pertencem ao domínio de $\sqrt{x}$. A definição de limite não nos +obriga a trabalhar com restrições simétricas como $-1 < x - a < 1$. +Podemos tranquilamente restringir $a/2 < |x - a| (a + 1)/2$, que não é +simétrica --- o raio direito da desigualdade é maior que o raio +esquerdo. Essa restrição nos garante que +% + $$\frac{1}{\sqrt{x} - \sqrt{a}} < \frac{1}{\sqrt{4a/3} - \sqrt{a}},$$ +% +o que eventualmente nos daria $|\sqrt{x} - \sqrt{a}| < e$, usando-se a +dica do problema. Mas observe que essa solução é muito menos elegante +que a primeira. Essa prova bem arrumadinha, lida da direita pra +esquerda, é sempre importante à educação matemática porque bagunça faz +tudo mais difícil de entender. Se a solução elegante é difícil de +ler, então devemos estudar cada detalhe dela e aos poucos vê-la como +natural porque essa prática facilita a análise (ao invés de +complicá-la). + +\begin{exercise*} +Prove que $\lim \sqrt[4]{9 -x} = 0$ com $x \to 9$ pela esquerda. +Agora a ausência de simetria no intervalo delta é solicitada pelo +problema. Queremos assumir $9 - d < x < 9$ e mostrar que $|\sqrt[4]{9 + -x}| < e$, ou seja, $|\sqrt[4]{9-x}| < e$ implica $0 < \sqrt[4]{9-x} +< e$, que implica $0 < 9-x< e^4$, que implica $-e^4 < x - 9 < 0$, que +implica $-e^4 +9 < x < 9$. Tomando-se $d = e^4$, assumimos $9 - e^4 < +x < 9$ de forma assimétrica: estamos provando um limite pela esquerda. +Manipulação algébrica nos leva a $|\sqrt[4]{9 -x} - 0| f(x_2)$ whenever $x_1 < x_2$ in I.\defend + +\masciidef{} Let $f:A \to Y$, $g: B \to W$ be functions. Then we define +$(f+g)(x) = f(x) + g(x)$ where the domain is $A \cap B$. We define $(f - +g)(x) = f(x) - g(x)$ where the domain is $A \cap B$. We define $(fg)(x) += f(x)g(x)$, where the domain is $A \cap B$. We define $(f/g)(x) = +f(x)/g(x)$, where the domain is $\{x \in A \cap B : g(x) \neq +0\}$.\defend + +\masciidef{} Let $f: A \to B$, $g: X \to Y$. We define the composite function +$f \circ g$ as $(f \circ g)(x) = f( g(x) )$. The domain of the +composition is all $x \in X$ in which $g(x)$ is defined which goes to an +$a \in A$ in which $f(a)$ is defined. So, the domain is the intersection +of a subset of $Y$, the range of $g(x)$, and the set $A$; that is, the +domain of $f \circ g$ is $\text{Range}(g) \cap A$.\defend + +\subsection{Limits} + +\masciidef{} We say that $f$ approaches $L$ as $x$ approaches $a$ if and +only if for each $e > 0$ given, there is a $d > 0$ such that +% + $$0 < |x - a| < d \implies |f - L| < e.$$\defend + +\begin{remark*} +Em vez de letras $d$ e $e$, o típico é escrever $\delta$ e $\epsilon$, +mas não temos essas letras num teclado usual de hoje. Quando +começarmos a trabalhar com o número transcendental +$2.7182845904523536...$, também usaremos a letra $e$ pra +representá-lo. Não haverá nenhuma confusão porque o contexto deixa +bem claro a quem nos referimos. +\end{remark*} + +\masciidef{} We say that $f$ approaches $L$ from the left as $x$ +approaches $a$ from the left if and only if for each $e > 0$ given, +there is a $d > 0$ such that $$a - d < x < a \implies |f - L| < +e.$$\defend + +\masciidef{} We say that $f$ approaches $L$ from the right as $x$ +approaches $a$ from the right if and only if for each $e > 0$ given, +there is a $d > 0$ such that $$a < x < a + d \implies |f - L| < +e.$$\defend + +Uma coisa se aproxima de outra se e somente se a distância entre elas +disaparece ``à medida que o tempo passa''. Note que se a distância +entre $x$ e $a$ se tornar pequena, então torna-se pequena também a +distância entre $f$ e $L$. Se isso ocorre pra qualquer pequena +distância arbitrada, então o limite de $f$ é $L$. + +\begin{exercise*} +Provar limites pela definição é muito difícil na maioria das vezes. +Por exemplo, prove que $\lim x^2 - 1 = 3$ com $x \to -2$. Precisamos +de um $d$ que possa nos levar à desigualdade $$|x^2 - 1 - 3| = |x^2 - +4| = |(x + 2)(x - 2)| = |x + 2||x - 2| < e$$ pra todo $e$ positivo. +Pra ultrapassar o obstáculo desse produto, observe que estamos +interessados em valores de $x$ {\em muito} próximos de $-2$. +Portanto, podemos tranquilamente nos restrigir ao universo de busca em +que $d$ não é maior que 1, ou seja, podemos assumir que $|x + 2| < 1$, +obtendo $-1 < x + 2 < 1$, o que nos dá $-5 < x - 2 < -3 < 5$. Daí +deduzimos que $|x - 2|<5$, que é fator do produto que nos complica. O +outro fator é $|x + 2|$ e queremos que esse produto de distâncias seja +menor que $e$. Agora compreender a estratégia ficou mais fácil: se +assumirmos que $|x + 2| < e/5$, o que ocorre com o produto? O produto +nos dá o que desejamos: $$|x + 2||x - 2| < \frac{e}{5} \times 5 = +e.$$Logo, podemos tomar $d = \min(e/5, 1)$. Eis a prova. Seja $d = +\min(e/5, 1)$. Assuma que $|x - (-2)| < d = \min(e/5, 1)$. Se $e > +5$, então $d = 1$ e aí $|x - (-2)| = |x + 2| < 1$ e $|x+2||x-2| < 1 < +e$, como desejado. Já se $e \leq 5$, então $|x - (-2)| < e/5$ e aí +$|x + 2| < 1$. Como estamos interessamos em valores muito próximos de +$-2$, podemos restringir $x$ tal que $|x - (-2)| = |x + 2| < 1$, ou +seja, não nos afastamos uma unidade do valor $-2$. Nesse intervalo +restrito, podemos afirmar que $-1 < x + 2 < 1$ e $-5 < x - 2 < -3 < +5$, logo $|x - 2| < 5$. Multiplicando ambas desigualdades importantes +aqui, obtemos +% + $$|(^2 - 1) -3|= |(x + 2)(x - 2)|= |x + 2||x - 2| < e/5 \times 5 = e,$$ +% +como desejado. Isso prova. A leitura da prova também requer +cuidados. + +Como ler a prova? O delta escolhido é o menor valor dentre $e/5$ e +$1$. Se o adversário escolhe um $e$ muito grande --- maior ou igual a +5, por exemplo ---, escolhemos $d = 1$, partindo de $|x - (-2)| < 1$, +que implica $|x - 2| < 5$ e, assim, obtemos $|x + 2||x - 2| < 5$, como +desejado. Se o adversário escolhe $e$ pequeno --- menor que 5, por +exemplo ---, então tomamos um quinto desse $e$, partindo de $|x - +(-2)| < e/5$. Precisamos também da desigualdade $|x + 2| < 1$. Quando +próximo de $-2$, temos $|x + 2| < 1$ e podemos chegar perto o quanto +quisermos. Essa restrição implica $|x - 2| < 5$ --- subtraia 4 e +observe que $-3 < 5$. Daí multiplicamos as duas desigualdades, +obtendo $$|x + 2||x - 2| < 5\times\frac{e}{5} = e.$$ + +Isso é uma segunda escrita da prova, sem dúvida. Enfim, a função é +simples, mas a prova envolve habilidade com desigualdades, valor +absoluto e a definição epsilon-delta. +\qed\end{exercise*} + +\masciidef{} The line $x = a$ is called a vertical asymptote of the +curve $y = f(x)$ if at least one of the following statements is true: +$\lim f = \infty$ as $x \to a$, $\lim f = \infty$ as $x \to a^-$, $\lim +f = \infty$ as $x \to a^+$, $\lim f = - \infty$ as $x \to a$, $\lim f = +- \infty$ as $x \to a^-$, $\lim f = \infty$ as $x \to a^+$.\defend + +\begin{remark} +Em palavras, pra descobrir assíntotas, basta procurar por quais +valores do domínio a função tende a $\pm \infty$, ou seja, quais +valores (do domínio) fazem a função crescer ou decrescer sem limite. +\end{remark} + +\masciith{} Let $c$ be a constant and suppose $\lim f$ and $\lim g$ as $x \to +a$ exist. Then the following are true: (1) $\lim(f + g)$ = $\lim f + +\lim g$; (2) $\lim(f - g)$ = $\lim f - \lim g$; (3) $\lim(c f)$ = $c +\lim f$; (4) $\lim(fg)$ = $\lim f \lim g$; (5) $\lim f/g$ = $(\lim +f)/(\lim g)$ as long as $\lim g \neq 0$; (6) $\lim f^n = (\lim f)^n$, +where $n > 0$; (7) $\lim c = c$; (8) $\lim x = a$ (as $x \to a$); (9) +$\lim x^n = a^n$, as $x \to a$ and $n > 0$; (10) $\lim \sqrt[n]{x}$ = +$\sqrt[n]{a}$ as $x \to a$ and $n > 0$, and once $n > 0$, assume $a > +0$. (11) $\lim \sqrt[n]{f}$ = $\sqrt[n]{\lim f}$ as $x \to a$ and $n > +0$, and once $n$ is even, assume $f > 0$.\theend + +\begin{remark*} +Observe que essas propriedades só se aplicam quando $\lim f$ e $\lim +g$ existem. Se não existirem, o teorema não procede. Em outras +palavras, antes de sair aplicando essas verdades, verifique que as +condições procedem. Por exemplo, suponha que $\lim f(x)/x^2 = 5$ com +$x \to 0$. Encontre $\lim f(x)$. O que se pode fazer aí? Não se +pode assumir que o limite de $f(x)$ existe porque isso não foi dado; o +que foi dado é que o quociente tem limite 5. Entretanto, sabemos que +$\lim x^2 = 0$ existe e é zero. Assim, podemos deduzir: +% +\begin{align*} + 0 &= 5 \times 0\\ + &= \lim \frac{f(x)}{x^2} \lim x^2\\ + &= \lim \frac{f(x)}{x^2}x^2 \qquad\text{porque ambos limites existem}\\ + &= \lim f(x). +\end{align*} +% +Pode-se pedir também por $\lim f(x)/x$, mas a mesma estratégia acima +resolve: sabemos que $\lim x = 0$. +\end{remark*} + +\begin{remark*} Esse é o problema 56 da Seção 2.3 de Stewart, edição 6. Na +versão brasileira do livro, há um erro de digitação em que se dá um +limite com $x\to 1$ e se pede por $x\to 0$. Esse erro é interessante +porque é preciso se convencer de que o problema não tem solução. O +que acontece num ponto do domínio não garante nada do que acontece num +outro ponto {\em qualquer}. Provar o fato é fácil --- só mostrar um +contra-exemplo. +\end{remark*} + +\masciiexe{} If $p$ is a polynomial, show $\lim p(x)$ = $p(m)$ as $x \to +m$. \pit The general formula for a polynomial is +% + $$p(x) = a_0 + a_1 x + a_2 x^2 + ... + a_n x^n.$$ +% +We now apply the limit laws +% +\begin{align*} +\lim p(x) &= \lim a_0 + \lim a_1 x + \lim a_2x^2 + ... + \lim a_n x^n\\ + &= a_0 + a_1 m + a_2 m^2 + ... + a_n m^n\\ + &= p(m) +\end{align*} +% +This shows that every polynomial is continuous, but we define continuity +a little later. Before, we do exercises to practice our understanding of +limits.\exeend + +\masciiexe{} If $r$ is a rational function, show that $\lim r(x) = +r(m)$, as $x \to m$, for every number $m$ in the domain of $r$. \pit +From the previous exercise, we have that every polynomial is +continuous. A rational function is the quotient of two polynomials; so, +the problem is very similar. We can represent the limit of a rational +function as +% +\begin{align*} +\lim r(x) &= \lim \bigg( + \frac{a_0 + a_1 x + a_2 x^2 + ... + a_n x^n} + {b_0 + b_1 x + b_2 x^2 + ... + b_n x^n} \bigg)\\ + &= \frac{\lim a_0 + \lim a_1x + \lim a_2 x^2 + ... + \lim a_n x^n} + {\lim b_0 + \lim b_1x + \lim b_2 x^2 + ... + \lim b_n x^n}\\ + &= \frac{a_0 + a_1 m + a_2 m^2 + ... + a_n m^n} + {b_0 + b_1 m + b_2 m^2 + ... + b_n m^n}\\ + &= r(m) +\end{align*} +\exeend + +\masciith{} A function $f \to L$ as $x \to a$ if and only if $f \to L$ +as $x \to a^-$ and $f \to L$ as $x \to a^+$.\theend + +\masciith{} If $f \leq g$ when $x$ is near $a$, but $x \neq a$, and +the $\lim f$ and $\lim g$ both exist as $x \to a$, then $\lim_{x \to + a} f \leq \lim_{x \to a} g$.\theend + +\begin{theorem*}[do Confronto] +Se $f(x) \leq g(x) \leq h(x)$ quando $x$ está próximo de $a$, exceto +possivelmente em $a$, e $\lim f(x) = L = \lim h(x)$, então $\lim g(x) += L$. +\end{theorem*} + +\begin{remark*} +Esse é o Teorema do Confronto, também chamado de Teorema do Sanduíche. +Parece que alguns também o chamam de Teorema do Imprensamento. +\end{remark*} + +Um caso bem fácil de aplicação desse teorema é quando se pede o limite +de uma função trigonométrica multiplicada por um outra função --- cujo +limite seja fácil calcular. Por exemplo, calcule $\lim q(x) \cos +20\pi x$ com $x\to 0$ sabendo-se que $\lim q(x) = 0$. O trabalho é +fácil porque sabemos que $ -1 < \cos 20 \pi x < 1$. Logo, se +multiplicarmos essa desigualdade por $q(x)$, obtemos $-q(x) < q(x)\cos +20\pi x < q(x)$ e daí o Teorema do Confronto implica $\lim q(x) \cos +20\pi x = 0$, como desejado. + +\begin{remark*} +Às vezes um problema nos pede um limite que podemos reconhecer com +experiência. Por exemplo, +% + $$\lim \frac{(4 + h)^2 - 16}{h}$$ +% +é a derivada de $x^2$ no ponto $x = 4$, ou seja, em $(4, 16)$. Então +o limite é $f'(4) = 2x = 8.$ O que Stewart espera, entretanto, é que +cancelemos o $h$ do denominador. +\end{remark*} + +\begin{exercise*} +Existe número real $a$ tal que +% + $$\lim_{x \to -2} \frac{3x^2 +ax + a + 3}{x^2 + x - 2}$$ +% +exista? O exercício pede que identifiquemos em que situação um limite +existe ou não existe. Se o denominador tende a zero e o numerador não +tende a zero (com $x \to -2$), então essa função racional sobe ou +desce sem limite. A única chance pro limite existir então é quando o +numerador é igual a zero, ou seja, $3x^2 +ax + a + 3 = 0$ com $x = +-2$. Queremos então $12 -a + 3 = 0$ ou $a = 15$. Essa é a chance. +Precisamos agora ter certeza de que o limite existe quando $a = 15$, +ou seja, investiguemos +% + $$\lim_{x \to -2} \frac{3x^2 +15x + 18}{x^2 + x - 2}.$$ +% +O denominador é fatorável com $(x + 2)(x - 1)$ e o numerador é +fatorável com $(3x + 9)(x + 2)$. (Divida $3x^2 +15x + 18$ por $x + 2$ +por divisão longa e obtenha $3x + 9$.) Assim obtemos +% + $$\lim_{x \to -2} \frac{3x + 9}{x - 1} = \frac{3}{-3} = -1.$$ +% +Existe $a = 15$ em que o limite é $-1$. +\end{exercise*} + +\begin{exercise*} +Prove $\lim f(x) = 0$ com $x \to 0$ sendo +% +\[f(x) = \begin{cases} + x^2 & \text {se $x$ é racional},\\ + 0 & \text {se $x$ é irracional}. + \end{cases}\] +% +O exercício parece querer uma aplicação do Teorema do Confronto. A +função é claramente descontínua em todos os pontos, mas o limite na +origem existe provavelmente porque a reta de pontos isolados $f(x) = +0$ se encontra com a parábola de pontos isolados $f(x) = x^2$. Os +pontos se aglutinam infinitamente lá, sem deixar buracos. É o que +sugere minha intuição. + +São fatos que $\lim 0 = 0 = \lim x^2$. Logo, +% + $$0 \leq f(x) \leq x^2$$ +% +pra todo $x$ real. Assim, +% + $$0 = \lim 0 \leq \lim f(x) \leq \lim x^2 = 0$$ +% +e então o Teorema do Confronto implica $\lim f(x) = 0$, como desejado. +\end{exercise*} + +\begin{exercise*} +Seja +% +\[f(x) = \begin{cases} + 0 & \text {se $x$ é racional},\\ + 1 & \text {se $x$ é irracional}. + \end{cases}\] +% +Prove que $\lim f(x)$ não existe quando $x \to a$, sendo $a$ um número +real. O autor quer que a gente saiba como provar que um limite não +existe pela definição precisa de limite. Fazemos isso por +contradição. Se o limite exitisse, a desigualdade-delta implicaria a +desigualdade-epsilon pra qualquer epsilon. Como o limite não existe, +algum epsilon fracassa a desigualdade. Suponha que o limite existe e +é $L$. Seja $e = 1/2$. Então $|x| < d$ implica $|f(x) - L| < 1/2$, o +que implica $- 1/2 < f(x) - L < 1/2$. Tome um $x$ racional em $(-d, +d)$. Daí $f(x) = 0$ e obtemos $L < 1/2$. Agora tome um $x$ +irracional e deduza $1/2 < L$. Nenhum número $L$ é capaz de +satisfazer essa contradição, então $L$ não existe. Logo, não há +limite. +\end{exercise*} + +\begin{remark*} +Quando um limite não existe, há a evidência de que --- à medida que +nos aproximamos de um ponto $a$ do domínio ---, a função $f(x)$ tende +a uma coisa de um jeito e tende a outra coisa de outro jeito. Na +linha real, os dois jeitos típicos de se aproximar de um ponto no +domínio é pela esquerda e pela direita. +\end{remark*} + +\begin{exercise*} +Mostre um exemplo em que $\lim f(x)g(x)$ existe, mas $\lim f(x)$ e +$\lim g(x)$ não existem. Pegue uma função $f(x)$ que seja $-1$ pra +$x$ negativo e 1 pra $x$ positivo. O limite em zero não existe. +Inverta o sinal na definição de $g(x)$. Agora, se multiplicamos +$f(x)g(x)$, obtemos a função constante $-1$, cujo limite em zero +obviamente existe. +\end{exercise*} + +\begin{exercise*} +Um disco precisa ser fabricado com área $1000 \cm^2$. Logo seu raio é +$10\sqrt{10/\pi} \cm$. Queremos permitir um erro de $5 \cm^2$ na +fabricação, ou seja, pode-se produzir com área no intervalo $(995, +1005) \cm^2$. Qual o erro que se permite no raio? A área tem que +satisfazer $995 < \pi r^2 < 1005$. Isolando $r$, +obtemos $$\sqrt{\frac{995}{\pi}} 0$. Por +hipótese, $\lim f(a + h) = f(a)$, então existem $d > 0$ tal que $0 < +|h| 0$. Compute $f(0) = -1 < 0$. A função é contínua, então +ela tem que cruzar o eixo $x$ em $[-2, 0]$. +\end{exercise*} + +\begin{exercise*} +Suponha $f$ contínua em $[1,5]$ e que as únicas soluções da equação +$f(x) = 6$ são $x = 4$ e $x = 1$. Se $f(2) = 8$, prove que $f(3) > +6$. Prove por contradição. Suponha que $f(3) \leq 6$. Faça um +desenho do gráfico. Desenho o ponto (1, 6), (2, 8) e (4, 6). A +função é contínua. Se $f(3) = 6$, violamos a hipótese das únicas +soluções. Se $f(3) < 6$, então o Teorema~\ref{thm:ivt} implica que +tem que haver $c$ em $(2, 3)$ tal que $f(c) = 6$: a função teria que +descer de $f(2)=8$ até $f(3) < 6$, o que faz com que ela +necessariamente passe por um ponto $c$ satisfazendo $f(c) = 6$. +\end{exercise*} + +\section{Derivatives} + +\masciidef{} The derivative of a function $f$ at a point $x = a$, written +$f'(a)$ is defined to be +%v +\begin{equation}\label{def:derivative} + f'(a) = \lim_{h \to 0} \fr{f(a + h) - f(a)}{h}. +%e +\end{equation} +\defend + +This definition comes from a similar one. The derivative is the +function that describes the slope of a tangent to a curve in some +point. If we consider a curve $f$ at some point $a$ and draw a tangent +to $f$ at the point $a$, then you can estimate the slope by +$$\fr{f(x) - f(a)}{x - a},$$ for some $a$ near $x$. That's an +estimate. We would get a closer estimate if we choose a number $x$ +closer to $a$ than the previous. If we choose $x$ exactly equal to +$a$, we get a division by zero and we go beyond what the definition of +limit lets us do. Considering the limit of the expression as $x$ +approaches $a$, we get $$f'(a) = \lim_{x \to a} \fr{f(x) - f(a)}{x - + a},$$ which is the derivative of the function $f$ at a point $a$ +with a substitution of $h$ for $x - a$. + +Let $h = x - a$, then $x = h + a$. Notice that as $x$ approaches $a$, +$x - a$ approaches 0. So if $x$ approaches $a$, then $h$ approaches +0. So replace $x$ by $h + a$ noticing that $h$ approaches 0 as $x$ +approaches $a$ and we get Equation~\ref{def:derivative}. So both +definitions are equivalent. + +\newcommand{\Dx}{\Delta x} +\newcommand{\Dy}{\Delta y} +\newcommand{\D}[1]{\Delta{#1}} +\newcommand{\Du}{\Delta u} +\newcommand{\Dv}{\Delta v} + +\begin{theorem*} + A derivada de $ax$ é $a$. +\end{theorem*} +\begin{proof} +Por definição, + \begin{align*} + \lim_{h \to 0} \frac{f(x + h) - f(x)}{h} &= \lim \frac{a(x + h) - ax}{h}\\ + &= \lim \frac{ax + ah - ax}{h}\\ + &= \lim \frac{a h}{h}\\ + &= a \lim \frac{h}{h}\\ + &= a, + \end{align*} +como desejado. +\end{proof} + +\begin{theorem*} + A derivada de $ax^2$ é $2ax$. +\end{theorem*} +\begin{proof} +Por definição, + \begin{align*} + \lim_{h \to 0} \frac{f(x + h) - f(x)}{h} + &= \lim \frac{a(x + h)^2 - ax^2}{h}\\ + &= \lim \frac{a(x^2 + 2xh + h^2) - ax^2}{h}\\ + &= \lim \frac{\cancel{ax^2} + 2axh + ah^2 - \cancel{ax^2}}{h}\\ + &= \lim \frac{\cancel{h}(2ax + ah)}{\cancel{h}}\\ + &= \lim 2ax + ah\\ + &= \lim 2ax\\ + &= 2ax, + \end{align*} +como desejado. +\end{proof} + +\begin{theorem*} + A derivada de $ax^3$ é $3ax^2$. +\end{theorem*} +\begin{proof} +Por definição, + \begin{align*} + \lim_{h \to 0} \frac{f(x + h) - f(x)}{h} + &= \lim \frac{a(x + h)^3 - ax^3}{h}\\ + &= \lim \frac{a(x^3 + 3x^2h + 3xh^2 + h^3) - ax^3}{h}\\ + &= \lim \frac{\cancel{ax^3} + 3ax^2h + 3axh^2 + ah^3 - \cancel{ax^3}}{h}\\ + &= \lim \frac{\cancel{h}(3ax^2 + 3axh + ah^2)}{\cancel{h}}\\ + &= \lim 3ax^2 + 3axh + ah^2\\ + &= 3ax^2, + \end{align*} +como desejado. +\end{proof} + +\begin{remark*} +Relevante é o Teorema Binomial. +\end{remark*} + +\begin{remark*} +Os dados coletados são + +\begin{table}[htb] +\centering +\begin{tabular}{r|c} +função & derivada \\\toprule +$ax^1$ & $ax^0 = a$\\ +$ax^2$ & $3ax^1 = 2ax$\\ +$ax^3$ & $3ax^2$\\ +$\vdots$ & $\vdots$\\ +$ax^n$ & $nax^{n-1}$\\\bottomrule +\end{tabular} +\caption{A regra da potência.} +\label{tb:regra-potência} +\end{table} +\end{remark*} + +\undef\d\newcommand{\d}{\frac{d}{\dx}} + +\begin{theorem*}[regra da soma] +Se $f$ e $g$ são deriváveis, então +% +$$\d (f(x) + g(x)) = \d f(x) + \d g(x)$$ +% +\end{theorem*} +\begin{proof} +Seja $F(x) = f(x) + g(x)$. Por definição, +% +\begin{align*} + \d (f(x) + g(x)) &= \lim_{h \to 0} \frac{F(x + h) - F(x)}{h}\\ + &= \lim \frac{f(x + h) + g(x + h) - (f(x) + g(x))}{h}\\ + &= \lim \frac{f(x + h) + g(x + h) - f(x) - g(x)}{h}\\ + &= \lim \left(\frac{f(x + h) - f(x) + g(x + h) - g(x)}{h}\right)\\ + &= \lim \frac{f(x + h) - f(x)}{h} + \lim \frac{g(x + h) - g(x)}{h}\\ + &= \d f(x) + \d g(x), +\end{align*} +% +como desejado. +\end{proof} + +A regra do produto é mais envolvente. Stewart oferece uma analogia +que é bem útil. Suponha que $f$ e $g$ sejam sempre positivas, o que +nos permite pensar em $fg$ como uma área, como uma a área de um +retângulo. É uma analogia pra dar um sentido geométrico à variação +$\Delta (fg)$ e nos ajudar a escrever a prova do fato. + +\begin{theorem*}[regra do produto] +Se $u = f(x)$ e $v = g(x)$ são diferenciáveis, então +% + $$\d f(x)g(x) = (uv)' = u'v + u v' = f'(x)g(x) + f(x)g'(x).$$ +% +\end{theorem*} + +\begin{proof} +Se $x$ variar uma quantidade pequena, como $\Dx$, então as variações +de $u$ e $v$ são $\Du = f(x + \Dx) - f(x)$ e $\Dv = g(x + \Dx) - +f(x)$. Logo, a variação do produto é +% +\begin{align*} + \D{(uv)} &= (u + \Du)(v + \Dv) - uv\\ + &= \cancel{uv} + u\Dv + v\Du + \Du\Dv - \cancel{uv}\\ + &= u\Dv + v\Du + \Du\Dv, +\end{align*} +% +Agora divida essa equação por $\Dx$ e compute o limite à medida que +$\Dx \to 0$. Obtemos +% +\begin{align*} + (uv)' &= \lim_{\Dx \to 0} \frac{\D{(uv)}}{\Dx}\\ + &= \lim_{\Dx \to 0} \frac{u\Dv + v\Du + \Du\Dv}{\Dx},\\ + &= \lim_{\Dx \to 0} \left(\frac{u\Dv}{\Dx} + \frac{v\Du}{\Dx} + \frac{\Du\Dv}{\Dx}\right),\\ + &= \lim_{\Dx \to 0} \left(u\frac{\Dv}{\Dx} + v\frac{\Du}{\Dx} + \Du\frac{\Dv}{\Dx}\right),\\ + &= u\lim_{\Dx \to 0}\frac{\Dv}{\Dx} + v\lim_{\Dx \to 0}\frac{\Du}{\Dx} + \left(\lim_{\Dx \to 0}\Du\right)\frac{\Dv}{\Dx},\\ + &= u\lim_{\Dx \to 0}\frac{\Dv}{\Dx} + v\lim_{\Dx \to 0}\frac{\Du}{\Dx} + \cancel{0 \cdot \frac{\Dv}{\Dx}},\\ + &= uv' + vu', +\end{align*} +% +como desejado.\end{proof} + +\begin{remark*} +Por que $\Du \to 0$? Porque $\Du = f(x + \Dx) - f(x)$. Em palavras, +$\Du$ vai pra zero quando $\Dx$ vai pra zero. +\end{remark*} + +\begin{remark*} +Observe que parte da sequência de equações foi escrita de trás pra +frente. Pra expressar o limite de uma soma como uma soma de limites, +precisamos saber se o limite dos termos de fato existe. Mas, se +soubermos que o limite dos termos de fato existe, a prova está +essencialmente terminada. +\end{remark*} + +A regra do quociente também aparece com aplicação direta da definição +de derivada como o limite da razão de variações. Suponha uma pequena +variação em $x$, o que implica uma pequena variação em $u$ e $v$. +Compute então a variação do quociente $u/v$ e deixe a álgebra +trabalhar --- que é computar a subtração das frações já que temos uma +diferença de quocientes envolvida aqui. + +\begin{theorem*}[regra do quociente] +Se $u = f(x)$ e $v = g(x)$ são diferenciáveis, então +% + $$\left(\frac{u}{v}\right)' = \frac{u'v - u v'}{v^2}.$$ +% +\end{theorem*} +\begin{proof} +Comece considerando a variação do quociente, que por definição é +% +\begin{align*} + \D{\left(\frac{u}{v}\right)} + &= \frac{u + \Du}{v + \Dv} - \frac{u}{v}\\ + &= \frac{v(u + \Du) - u(v + \Dv)}{v(v + \Dv)}\\ + &= \frac{\cancel{uv} + v\Du - \cancel{uv} - u\Dv}{v(v + \Dv)}\\ + &= \frac{v\Du - u\Dv}{v(v + \Dv)}. +\end{align*} +% +Agora divida tudo por $\Dx \to 0$ e obtenha +% +\begin{align*} + \lim \frac{\D{\left(\frac{u}{v}\right)}}{\Dx} + &= \lim \left(\frac{1}{\Dx} \frac{v\Du - u\Dv}{v(v + \Dv)}\right)\\ + &= \lim \left(\frac{v\frac{\Du}{\Dx} - u\frac{\Dv}{\Dx}}{v(v + \Dv)}\right)\\ + &= \frac{\lim\left(v\frac{\Du}{\Dx} - u\frac{\Dv}{\Dx}\right)}{\lim v(v + \Dv)}\\ + &= \frac{v\lim\frac{\Du}{\Dx} - u\lim\frac{\Dv}{\Dx}}{v\lim(v + \Dv)}\\ + &= \frac{vu' - uv'}{v^2}, +\end{align*} +% +como desejado. +\end{proof} + + +\begin{exercise*} +Encontre o ponto onde duas retas perpendiculares entre si, tangentes à +parábola $x^2$, se encontram no eixo $y$. O ponto existe, como +ilustra a Figura~\ref{fg-x2-perpendicular-tangents}. +% +\begin{figure}[!htb] + \centering + \includegraphics[width=0.8\textwidth, angle=0]{images/x2-perpendicular-tangents.pdf} + \caption{O ponto $(0, -1/4)$ é a interseção entre as tangentes à + curva $x^2$ que são perpendiculares.} + \label{fg-x2-perpendicular-tangents} +\end{figure} +% +\sol. Sendo perpendiculares, o produto das inclinações das tangentes +é $-1$, ou seja, no lado positivo a inclinação é $2a$ e no lado +negativo, $- 1/(2a)$. Seja $a > 0$. A reta tangente no lado positivo +é $y - a^2 = 2a(x - a) = 2ax - 2a^2$, implicando $y = 2ax - a^2$. +Similarmente, no lado negativo, obtemos a reta tangente $y - (-a)^2 = +(-1/(2a))(x - (- a))$, implicando $y = (-1/(2a)x) + a^2 -1/2$. +Estamos interessados no ponto de encontro entre as tangentes no eixo +$y$, se elas de fato se encontram lá. Iguale as equações de ambas +tangentes e coloque $x = 0$, obtendo +% +\begin{align*} + 2ax - a^2 &= -\frac{1}{2a}x + a^2 -\frac{1}{2}\\ + 2a^2 &= \frac{1}{2}\\ + a^2 &= \frac{1}{4}\\ + a &= \pm \frac{1}{2}, +\end{align*} +% +o que nos revela que as tangentes relativas aos pontos $x = - 1/2$ e +$x = 1/2$ são perpendiculares se encontram no eixo $y$. Elas têm +inclinação $-1$ e $1$, logo quando $x=0$, obtemos $y = - 1/4$, como +desejado. +\end{exercise*} + +\begin{exercise}\label{exe:hiperbole} +Considere a hipérbole $xy = c$. Marque qualquer ponto na curva. +Trace a reta tangente à curva ao ponto. Essa reta forma um triângulo +retângulo sendo os eixos $x, y$ os catetos. Mostre que a coordenada +$x$ do ponto é o ponto médio entre a origem a inserseção entre a reta +tangente e eixo $x$. Em seguida, mostre que a área do triângulo é uma +constante~\cite[exercício~76, seção~3.1]{calculo}. +% +\begin{figure}[!htb] + \centering + \includegraphics[width=0.8\textwidth]{images/hyperbole-triangle-constant-area.pdf} + \caption{Não importa que ponto na tangente escolhemos, a área do + triângulo é sempre $2c$.} + \label{fg-hyperbole-triangle} +\end{figure} + +\sol. Mostraremos primeiro que a coordenada da interseção entre a +tangente e o eixo $x$ é $2p$, sendo $p$ a coordenada $x$ do ponto +escolhido. Seja o que ocorrer no lado positivo da hiperbóle, ocorrerá +no lado negativo porque a hipérbole é uma função ímpar. Seja $p > 0$. +A derivada é $y' = - c/x^2$, logo $y'(p) = -c/p^2$. A reta tangente tem +equação +% +\begin{align*} + y - \frac{c}{p} &= - \frac{c}{p^2}(x - p)\\ + y &= -\frac{cx}{p^2} + \frac{2c}{p} +\end{align*} +% +e intercepta o eixo $x$ quando $y = 0$. Logo, +% +\begin{align*} + 0 &= -\frac{cx}{p^2} + \frac{2c}{p}\\ + \frac{cx}{p^2} &= \frac{2c}{p}\\ + x &= 2p, +\end{align*} +% +como desejado. Pra mostrar que a área do triângulo é constante, +precisamos da altura dele. A altura é obtida quando $x = 0$. Obtemos +% +\begin{equation}\label{eq:hiperbole-altura} +y = 2c/p. +\end{equation} +% +Logo, a área do triângulo é +% + $$\frac{1}{2} 2p \frac{2c}{p} = 2c,$$ +% +uma constante. +\end{exercise} + +\begin{exercise}\label{exe:hiperbole2} +Let $t(x)$ be the equation of the tangent line to the curve $1/x$ at +the point $(x, 1/x)$. Let $u(x)$ be the function that maps $x$ to the +intersection that $t(x)$ makes with the $y$-axis. Compute the +derivative of $u(x)$ at the point $x=1$. +% +\begin{figure}[!htb] + \centering + \includegraphics[width=0.8\textwidth, angle=0]{images/tangent-intercepts-vertical-axis.pdf} + \caption{À medida que o ponto $A$ se move pra direita, o ponto $B$ + desce em direção à origem. O problema está perguntando --- quão + rápido $B$ está descendo quando $A$ passa pelo ponto $x = 1$?} + \label{fg:how-fast-B-goes-down} +\end{figure} +% +The problem is asking me to find out how fast the intersection between +the $y$-axis and the tangent $t(x)$ is going down as it passes by $x = +1$ as we move $x$ to the right, as depicted by +Figure~\ref{fg:how-fast-B-goes-down}. + +\sol. The derivative of $1/x$ is $- 1/x^{2}$. It looks like I need +to use a general point $x = a$, otherwise I can't get an algebraic +formula for $u(x)$. The slope of the tangent at $(a, 1/a)$ will be +$-1/a^2$. Now the tangent line is +% +\begin{align*} + t(x) - \frac{1}{a} &= -\frac{1}{a^2}(x - a)\\ + t(x) &= -\frac{x}{a^2} + \frac{1}{a} + \frac{1}{a} = \frac{-x + 2a}{a^2}. +\end{align*} +% +It turns out the function $u(x)$ being the function that measures how +high $t(x)$ intercepts the vertical axis, we'll end up having $u(a)$ +and not $u(x)$ because we'll fix $x$ and let $a$ vary, since the +interception happens at $x = 0$. Therefore, +% + $$u(a) = t(0) = \frac{2a}{a^2} = \frac{2}{a}.$$ +% +I want the derivative of $u(a)$ at $a = 1$, +% +\begin{align*} + u'(a) = \frac{-2}{a^2}. +\end{align*} +% +At $a=1$, we get $u'(1) = 1$. The slope of $u(a)$ looks reasonable +because it is always negative and because it goes to zero as $a$ grows +without a bound. +\end{exercise} + +\begin{remark*} +Usando o exercício~\ref{exe:hiperbole}, sabemos que a tangente à curva +$1/x$ toca o eixo $y$ na altura $y = 2/p$ já que $c=1$ na hipérbole +$1/x$. Assim, o exercício~\ref{exe:hiperbole2} é solucionado +meramente computando a derivada de $2/p$, que é $-2/p^2$ e quando +$p=1$, a derivada é $-2$, como desejado. +\end{remark*} + +\subsection{The chain rule} + +Suppose I write +% + $$f(x) = x^2.$$ +% +This means that $f$ is a function of $x$. Now, if I say: differentiate +$f$ with respect to $t$, someone would write +% + $$\fr{df}{dt} = 2x \fr{dt}{dx}$$ +% +because +% + $$\fr{df}{dt} = \fr{df}{dx} \fr{dx}{dt}.$$ +% +I'd like to justify this. Looking at Stewart, he says that it's +reasonable to consider derivatives as rates of change; that's alright +with me. + +Also, he says that the derivative of a composition of functions +$h(g(x))$ is the product of the derivatives $h$ and $g$. So +% + $$[h(g(x)]' = h'(g(x)) g'(x) x'$$ +% +but since we're differentiating with respect to $x$, we get +% + $$[h(g(x)]' = h'(g(x)) g'(x)$$ +% +because $x' = 1$. + +In the function $f$, however, where's $t$? I think that we have to +suppose that $x$ is a function of $t$: $x(t)$. So we rewrite $f$ as +% + $$f(x) = x(t)^2.$$ +% +Now, differentiating it, we need the chain rule which would say +% + $$\fr{df}{dt} = 2x(t) \fr{dx}{dt}.$$ +% +But, the truth is that here $x$ has no relationship with $t$ --- we +didn't specify any, so it doesn't make any sense to draw such a +relationship here. However, these relationships exist in related +rates problems, so there to express the chain rule using Leibniz +notation is useful and that's why we do it. + +Now, I'd like to investigate why the chain rule is as it is, +without resorting to a formal proof of it. I want an intuitive +idea of why the rate of change of a composition is the product of +the rate of change of each of the functions involved in the +composition. + +It's funny that the for a function $a(x) = b(x)c(x),$ the derivative of +$a(x)$ is not the product of the derivatives of $b(x)$ and $c(x)$, but +if $a(x) = b(c(x))$, then it is --- the derivative of $a(x)$ is the +product of the derivatives of $b(x)$ and $c(x)$. + +Consider $f(x(t))$; that is, the composition of $f$ and $x$ and $t$. I +want the rate of change of $f$ with respect to $t$. But $f$ is related +to $t$ through $x(t)$. So I reason: if $x$ changes twice as fast +compared to the changes in $t$, and $f$ changes three times as fast +compared to the changes in $x(t)$, then we would expect $f$ to change +six times as fast compared to $t$. + +If $t$ causes a double change in $x$, and $x$ causes a triple change in +$f$, then $t$ causes a ``sixple'' change in $f$. This is a principle of +mathematics. I think that this is called the Counting Principle. + +The chain rule expresses a chain of dependences between functions. Such +dependence is resolved by the operation of multiplication because the +dependence is an instance of the counting principle. + +The same does not happen to the product of two functions. The derivative +of $f(x)g(x)$ cannot be obtained by an application of the chain rule. If +so, then in order for us to be able to differentiate any function, we +need the product rule, and the chain rule. + +\subsection{Related rates} + +Related rates involve direct applications of the chain rule. Suppose +that oxygen is being pumped into a balloon --- let it be spherical, so +that we can use the volume of a sphere which is widely known. Suppose +that the rate which oxygen goes in is 10 cubic meters per second --- +whatever. Now, as the balloon grows in volume, the volume grows --- +evidently --- and the radius of the balloon also grows. We may ask: how +fast is the radius growing when the diameter of the balloon is 1 meter? + +The rate at which oxygen is pumped is a derivative +% + $$\fr{dV}{dt} = 10 \fr{m^3}{s}.$$ +% +We know that volume of a sphere is described by +% + $$V = \fr{4}{3} \pi r^3$$ +% +which connects volume to the radius. We want the rate of growth of the +radius, so we're looking for a derivative of the volume with respect to +the radius; we were given the derivative of the volume with respect to +time. We then express the change in volume with respect to the change in +the radius by using the chain rule. That is, +% +\begin{align*} + \fr{dV}{dt} &= \fr{dV}{dr} \fr{dr}{dt}\\ + &= 4 \pi r^2 \fr{dr}{dt} +\end{align*} +% +Connection established. We now solve for $dr/dt$. +% + $$\fr{dV}{dt} \fr{1}{4 \pi r^2} = \fr{dr}{dt}.$$ +% +But since $\fr{dV}{dt} = 10 \fr{m^3}{s}$, we have +% + $$\fr{{10 m^3/s}}{4 \pi r^2} = \fr{dr}{dt}.$$ +% +When the diameter is 1 meter, the radius is 0.5 meters, so +% +\begin{align*} + \fr{{10 \frac{m^3}{s}}}{4 \pi (0.5)^2} &= \fr{dr}{dt}\\ + \fr{10}{\pi} &= \fr{dr}{dt}, +\end{align*} +% +so the radius of the balloon is growing at a speed of $\fr{10}{\pi}$ +meters per second. + +\subsection{Linearizations}\label{sec:linearization} + +Suppose that we want to find the tangents to +$$\fr{x}{x + 1}$$ that touch the point (1,2). We would first compute +the derivative of the curve which is +% + $$\fr{1}{(x + 1)^2}.$$ +% +Now, these tangents will look like +% + $$y - f(a) = f'(a) (x - a).$$ +% +This is the point-slope formula of a line. We know that the slope of a +line is found by using two points of the line and computing +% + $$\fr{y_2 - y_1}{x_2 - x_1} = s,$$ +% +so $y_2 - y_1 = s (x_2 - x_1).$ Here, however, we only have one point, +but we also have a form for the slope. At a point $x = a$, we have +% + $$y_2 - f(a) = \fr{1}{(a + 1)^2} (x_2 - a),$$ +% +so for these tangents to touch (1,2) it must be true that +% + $$2 - \fr{a}{(a + 1)} = \fr{1}{(a + 1)^2} (1 - a).$$ +% +Now, which numbers $a$ are solutions to this equation? They're $-2 - +\sqrt{3}$, and $-2 + \sqrt{3}$. This gives us two lines; they are +% +\begin{align*} +y - \fr{(-2 - \sqrt{3})}{(-2 - \sqrt{3} + 1)} &= + \fr{(x - (-2 - \sqrt{3}))}{(-2 - \sqrt{3} + 1)}^2\\ +y - \fr{(-2 + \sqrt{3})}{(-2 + \sqrt{3} + 1)} &= + \fr{(x - (-2 + \sqrt{3}))}{(-2 + \sqrt{3} + 1)}^2. +\end{align*} +% +Now, because these two lines are tangents to the curve, they share +nearby points when $x$ is close enough to 1. So, under these +circumstances, we may say that +% + $$f(x) = L(x) = f(a) + f'(a)(x - a),$$ +% +for $x$ nearby $x = a.$ + +\subsection{Sobre a palavra ``tangente''} + +A linearização de uma curva, o que analisamos na +Seção~\ref{sec:linearization}, é a obtenção de uma reta tangente a uma +curva $f(x)$. O nome ``tangente'' é usado primeiramente +trigonometria. Por que a palavra ``tangente'' reaparece na +linearização local de uma curva? A palavra vem do Latim {\em tangens} +que significa tocar. Usando o círculo unitário, desenhe um ângulo +agudo no primeiro quadrante e chame-o de $\alpha$. A linha reta que +determina $\alpha$ tem uma inclinação, que é +% + $$\frac{\sin\alpha}{\cos\alpha} = \tg \alpha.$$ +% +Quando calculamos a inclinação de uma reta tangente a uma curva +$f(x)$, obtemos exatamente a tangente de um ângulo $\alpha$ formado +pela reta tangente à curva $f(x)$ e o eixo $x$. + +Quando computamos uma aproximação da inclinação da reta tangente, +fazemos referência a retas ``secantes''. O termo ``secante'' vem do +Latim ``secans'', que significa cortar. No círculo unitário, a reta +secante corta o círculo. Ao estimarmos a inclinação de uma reta +tangente a uma curva, uma secante tende toca a curva em dois pontos, +ou seja, corta um pedaço da curva. + +Veja também a Seção~\ref{sec:sine-cosine} pra compreender o ``co'' em +``cosseno''. + +\subsection{Differentials} + +If $y = f(x)$, where $f$ is a differentiable function, then the +differential $dx$ is an independent variable; that is, $dx$ can be given +the value of any real number. The differential $dy$ is then defined in +terms of $dx$ by the equation +% + $$dy = f'(x) dx$$ +% +So $dy$ is a dependent variable; it depends on the values of $x$ and +$dx.$ If $dx$ is given a specific value and $x$ is taken to be some +specific number in the domain of $f$, then the numerical value of $dy$ +is determined. + +Suppose that $P$ is a point on a curve $f(x)$ with coordinates ($x$, +$f(x)$) and that $Q$ is some point a little further on the curve with +coordinates $(x + \Delta x, f(x + \Delta x)).$ Let $dx = \Delta +x$. Then, the change in $y$ is +% + $$\Delta y = f(x + \Delta x) - f(x).$$ +% +Certainly, because $f(x + \Delta x)$ is the height of the point $Q$; +then, if we subtract the height of the point $P$, we get the change in +$y$ as we moved from $P$ to $Q$. + +Now, $dy$ expresses the change in the linearization of $f(x)$, which for +a concave down curve with positive slope, would be larger than $\Delta +y$. + +In a concave down graph with positive slope, for example, let $L(x)$ be +a tangent to the curve at $P$. So $\Delta y < dy$. The value of $\Delta +y$ is simply $f(x + \Delta x) - f(x)$, so the value of $dy$ should be +something like $L(x + \Delta x) - L(x)$. However, the value of $dy$ is +$f'(x) dx$. So it must follow that +%v + $$L(x + \Delta x) - L(x) = f'(x) \dx.$$ +%e + +%% \subsection{Newton's method} + +%% Newton's method is a clever way to extract good approximations of roots +%% of equations if you have a good clue of where the root is. Without the a +%% good clue, there may not be any good result. + +%% The point slope form of a line is %cm + +%% y - f(x_1) = f'(x_1)(x - x_1), + +%% where x_1 is a given number. If we set y = 0 in this equation, then we +%% find the root of it; the number x in which y = 0. If the slope is not +%% zero, we may write %align by = + +%% 0 - f(x_1) = f'(x_1)(x - x_1) +%% - f(x_1) = f'(x_1)(x - x_1) +%% - f(x_1)/f'(x_1) = x - x_1 +%% - f(x_1)/f'(x_1) + x_1 = x + +%% \fr{- f(x_1)}{f'(x_1)} = x - x_1 +%% \fr{- f(x_1)}{f'(x_1)} + x_1 = x - x + + + + +%% 0 - f(x_01 + +%% Exercise. Start with x_1 = -1, and find the real root of f(x) = x^3+x+1=0. + +%% Solution. A formula for the slope is 3x^2 + 1, so a tangent line is %cm + +%% y - f(-1) = (3x^2 + 1)(x - x_1), + +%% which in turn gives us easily a root x = -3/4 if we set y = 0. So -3/4 +%% becomes our next guess. We write %cm + +%% y - f(-3/4) = (3(-3/4)^2 + 1)(x - (-3/4)) +%% 0 - 0.671875 = 2.6875x + 2.015625 +%% 2.6875 = 2.6875x +%% 1 = x + +\subsection{More on differentiation} + +\masciith{extreme value theorem} If $f$ is continuous on a closed +interval $[a,b]$, then $f$ attains an absolute maximum value $f(c)$ and +an absolute minimum value $f(d)$ at some numbers $c$ and $d$ in +$[a,b]$.\theend + +\masciith{fermat's theorem} If $f$ has a local maximum or minimum at +$c$, and if $f'(c)$ exists, then $f'(c) = 0$. \theend + +\masciiproof We need to assume a local maximum and show the conclusion, +then a local minimum and show the conclusion, but both phases are +similar, so we'll write only one. + +Let $f(c)$ be a local minimum. So $f(c) \leq f(x).$ Later.\profend + +\masciidef{} A critical number of a function $f$ is a number $c$ in the +domain of $f$ such that $f'(c)$ or $f'(c)$ does not exist. \defend + +\masciith{fermat's theorem} If has a local maximum of minimum at $c$, +then $c$ is a critical number of $f$. \theend + +From this, and supposing that we have implemented an algorithm to +compute derivatives of functions, then we can write a program that can +answer the critical numbers of a function. + +\masciith{} Let $f(x)$ be continuous on a closed interval $[a,b]$. (1) +Compute all critical points in $(a,b)$. (2) Compute the values of $f$ at +% + $$x = a \text{ and } x = b.$$ +% +Now, the largest computed value in (2) and (3) is the absolute maximum; +the smallest is the absolute minimum. \theend + +%e + +\masciiexe{} Show that 5 is a critical number of +%v + $$g(x) = 2 + (x - 5)^3,$$ +%e +and show that $g(x)$ has no local extremum at $5.$ + +{\em Solution.} A critical number $c$ is one in which $g'(c) = 0$ or $g'(c)$ +does not exist. We have $g'(5) = 0,$ so $5$ is a critical number. + +Assume that $5$ is a local maximum. Then $g(5) \geq g(x)$ for all $x$ in +some open interval $(5 - d, 5 + d),$ where $d > 0.$ Let $x < 5.$ Then +%align by < +%v +\begin{align*} + x - 5 &< 0\\ + (x - 5)^3 &< 0\\ + 2 + (x - 5)^3 &< 2. +\end{align*} +%e +Let $x > 5.$ Then +%v +\begin{align*} + x - 5 &> 0\\ + (x - 5)^3 &> 0\\ + 2 + (x - 5)^3 &> 2. +\end{align*} +%e +So there's no neighborhood of $5$ such that $g(5) \geq 2.$ \exeend + +\masciiexe{} Prove that $x^3 + x - 1 = 0$ has exactly one real root. + +{\em Solution.} Let $f(x) = x^3 + x - 1.$ Notice that $f(0) = -1$ and that $f(1) =$ +$1.$ Since polynomials are continuous, then there is a $c$ in $(0,1)$ such +that $f(c) = 0,$ so $c$ is a root. + +Now, suppose that there are two roots, a and $b.$ Since they're roots, +it's true that $f(a) = 0 = f(b).$ Notice that $f$ is continuous on $[a,b]$ and +differentiable at $(a,b)$ so there's a number $d$ in $[a,b]$ such that $f'(d) =$ +$0.$ But $f'(x) = 3x^2 + 1 \geq 0$ for all $x,$ so no real $d$ is possible, and +therefore, it's false that there are two roots, so there's only +one. \exeend + +\masciiexe{} If $f(x)$ has a minimum value at $c,$ show that $-f(x)$ has +a maximum value at $c.$ + +{\em Solution.} If $f$ has a minimum at $c,$ then $f(c) \leq f(x)$ for all $x$ +in the domain of $f.$ Multiply this inequality by $-1$ to get $-f(c) +\geq -f(x)$ for all $x$ in the domain of $f.$ So $c$ is a maximum for +$-f(x).$ \exeend + +\masciiexe{} A cubic function is a polynomial of degree $3;$ that is, it +has the form $f(x) = mx^3 + nx^2 + ox + p$, where $m \neq 0.$ Show that a +cubic function can have no more than two critical numbers. How many +local extrema can a cubic function have? + +{\em Solution.} Polynomials are differentiable, so there is no real number $c$ +to which $f'(c)$ does not exist. Notice that $f'(x) = 3mx^2 + 2nx + o$ +which is is a quadratic equation which has only two roots maximum, so no +more than two critical numbers is possible. Every local extremum is a +critical number, so no more than two would be possible. \exeend + +\subsection{The mean value theorem} + +Rolle's theorem says that a differentiable function that goes up and +down has some $c$ such that $f'(c) = 0.$ The up and down criteria is that +$f(a) = f(b)$ for a domain $[a,b].$ So let's write the theorem. + +\masciith{} Let $f$ be a function that satisfies: $f$ is continuous on the +closed interval $[a,b], f$ is differentiable on the open interval $(a,b),$ +$f(a) = f(b).$ Then there is a number $c$ in $(a,b)$ such that $f'(c) = 0.$ + +\masciiproof{} We prove in three cases. Case one: let $f(x)$ be a +constant $k.$ Then $f'(x) = 0$ and so any number $c$ in $(a,b)$ can be +taken. Case two: let $f(x) > f(a)$ for some $x$ in $(a,b).$ I'm bored +here. Let's move on. \profend + +The Mean Value Theorem should be called perhaps the Same Slope Theorem. +I don't really know why the word ``mean'' was chosen; perhaps there's +more to it than what I know right now. The theorem says that if $f$ is +very nice on $[a,b],$ then there is a number in the interval to which a +tangent to the curve has the same slope as the secant $AB$ --- that is, +a secant line from the $a$ to $b.$ The tangent would be parallel to this +secant line, then. + +\masciith{mean value theorem} Let $f$ be continuous on $[a,b]$ and +differentiable on $(a,b).$ There is a $c$ in $(a,b)$ such that $$f'(c) = +\fr{f(b)-f(a)}{b-a}.$$ \theend + +\masciiexe{} Suppose that $f(0) = -3$ and $f'(x) \leq 5$ for all $x.$ How +large can $f(2)$ possibly be? + +{\em Solution.} We're given one point and a restriction for the slope of the +function. Then we're asked how large can $f(2)$ be? Geometrically, plot +the number $(0,-3)$ and take your ruler and position it as if you were +going to draw a line with slope $5$ --- the maximum slope you can. Then, +see how large $f(2)$ could be. + +Now, precisely. In the interval $[0,2],$ there is a number $c$ such that +%align by = +%v +\begin{align*} + f'(c) &= \fr{f(2)-f(0)}{2-0}\\ + &= \fr{f(2)+3}{2}. +\end{align*} +%e +But we're looking for the highest value of $f(2),$ so we will use our +highest slope possible: $5.$ That is, +%v +\begin{align*} + 5 &= \fr{f(2)+3}{2}\\ + 10 &= f(2) + 3\\ + 7 &= f(2). +\end{align*} +%e +Très mignon, non? \exeend + +\masciith{} Let $f'(x) = 0$ for all $x$ in $(a,b).$ Then $f$ is constant. \theend + +\masciiproof{} Let $x_1$ and $x_2$ be any two distinct numbers in +$(a,b),$ so $x_1 < x_2.$ Since $f$ is differentiable on $(a,b)$ it is +differentiable on $(x_1, x_2)$ and therefore continuous on $[x_1, x_2].$ +By the mean value theorem, there's $c$ in $[x_1, x_2]$ such that $$f'(c) += \fr{f(x_2)-f(x_1)}{x_2-x_1}.$$ + +Since $f'(x) = 0$ for all $x,$ then $f'(c) = 0.$ So +%v +\begin{align*} + 0 &= \fr{f(x_2)-f(x_1)}{x_2-x_1}\\ + &= f(x_2) - f(x_1)\\ + f(x_1) &= f(x_2). +\end{align*} +%e +So $f$ has the same value at any two distinct numbers $x_1, x_2$ in $(a,b),$ +which by definition means that $f$ is constant. \profend + +\masciicor{} Let $f'(x) = g'(x)$ for all $x$ in $(a,b).$ Then $f - g$ is +constant on $(a,b).$ That is, $f(x) = g(x) + c$ where $c$ is a +constant. \corend + +\masciiproof{} Let $F(x) = f(x) - g(x).$ Then +%v + $$F'(x) = f'(x) - g'(x) = 0$$ +%e +for all $x$ in $(a,b).$ So $f(x) - g(x)$ is constant.\profend + +\masciiexe{} Let $f(x) = 1 - x^{2/3}.$ Show that $f(-1) = f(1)$ but +there is no number $c$ in $(-1, 1)$ such that $f'(c) = 0.$ \exeend + +\masciiexe{} Let $f(x) = \sqrt[3]{x}$ be defined on $[0,1].$ Find all +values that satisfy the mean value theorem. + +{\em Solution.} The function is differentiable on $(0,1),$ so by the +mean value theorem there is a $c$ in $(0,1)$ such that +%v +\begin{align*} + f'(c) &= \fr{f(0)-f(1)}{-1}\\ + f'(c) &= 1. +\end{align*} +%e +Which number $c$ would be this one? It's true that $f'(x) = +\fr{x^{-2/3}}{3}.$ So +%v +\begin{align*} + \fr{c^{-2/3}}{3} &= 1\\ + c^{-2/3} &= 3\\ + \fr{1}{\sqrt[3]{c^2}} &= 3\\ + \fr{1}{c^2} &= 27\\ + \fr{1}{27} &= c^2\\ + \pm \sqrt{\fr{1}{27}} &= c. +\end{align*} +%e +But only $\sqrt{\fr{1}{27}}$ is applicable because $0 < c < 1.$ +\exeend + +\masciiexe{} Show that $x^5 + 10x + 3 = 0$ has exactly one real root. + +{\em Solution.} Let $p(x) = x^5 + 10x + 3.$ We first show that there is a real +root. Notice that $p(-1) = -8$ and $p(1) = 14.$ By the intermediate value +theorem, there is a $c$ in $(-1,14)$ such that $p(c) = 0,$ so $c$ is a root. + +Now suppose that there are two roots: $a$ and $b.$ Since they're roots, +it's true that $f(a) = 0 = f(b).$ So, by Rolle's theorem, there is a $d$ +in $(a,b)$ such that $f'(d) = 0.$ Let's find $d.$ Since $p'(x) = 5x^4 + +10 \geq 0$ for all $x,$ it turns out that no such $d$ is +possible. Therefore, there is no two real roots $a$ and $b.$ So there's +only one. \exeend + +\masciiexe{} Show that $x^5 -6x + c = 0$ has only one root in $[-1,1].$ + +{\em Solution.} Let $f(x) = x^5 -6x + c.$ Suppose $f(x) = 0$ has two roots a +and $b$ in $[-1,1].$ Then $f(a) = 0 = f(b)$ so by Rolle's theorem there +is a $d$ in $(a,b)$ with $f'(d) = 0.$ So $0 = f'(d) = 5d^4 - 6$ which +implies $$d = \pm \sqrt[4]{\fr{6}{5}}$$ which are both outside $(a,b)$ +because $(a,b)$ subset $[-1,1]$ and $d$ is not in $[-1,1].$ So $f(x)$ +can have at most one root in $[-1,1].$ + +This problem is different from the previous one because in the previous +one, we're supposed to show that there is one root, and here there could +be none in that particular interval. For example, if $c = 5,$ we have +$f(x) = x^5 - 6x + 5,$ so $x = 1$ is a root, but if $c > 5,$ then there +are no more roots in that interval. Similarly, if $c = -5,$ we have +$f(x) = x^5 -6x - 5$ and so $x = -1$ is a root, but if $c < -5,$ then +there are no more roots in that interval. + +A good exercise here is to ponder how someone would come up with a +question like that. That is, how to construct equations from roots in a +particular interval such that the equation has a particular degree? + +Take a function such as $f(x) = x^2 - 1.$ We know that the roots of this +function are $-1$ and $1,$ so +% + $$F(x) = \int f(x)\ dx = \fr{x^3}{3} -x + c$$ +% +will have local extrema at $-1$ and $1.$ Now, if $F(-1) > 0$ and $F(1) < +0,$ then by the intermediate value theorem, we know that there is a +number $-1 < d < 1$ such that $F(d) = 0.$ Because we constructed $F(x)$ +from $f(x),$ we know that $F(x)$ has only the local extrema we want, so +no more roots can exist in that interval. + +Now, how can we make sure that $F(-1) > 0$ and $F(1) < 0?$ Well, at +$-1,$ we have +% + $$\fr{-1^3}{3} + 1 + c > 0,$$ +% +so +% + $$c > \fr{1}{3} - 1 = \fr{-2}{3},$$ +% +and at $1,$ we have +% + $$\fr{1^3}{3} - 1 + c < 0,$$ +% +so +% + $$c < - \fr{1}{3} + 1 = \fr{2}{3}.$$ +% +So we need a number $c$ such that + + $$- \fr{2}{3} < c < \fr{2}{3}.$$ + +Now, suppose that you want your final equation to have a particular +degree $n.$ Then, look for a derivative of degree $n - 1.$ For example, +suppose that $n = 101.$ Then we need a function of degree $100.$ For +example, $x^{100} - 1$ will have roots at $-1$ and $1.$ What if you want +to work with an arbitrary interval for the root to fall in? + +Suppose you want an interval like $(-m,m).$ Then let $x = m$ and +%align by = +%v +\begin{align*} + x &= m\\ + x - m &= 0\\ + (x - m)^2 &= 0. +\end{align*} +%e +So evidently, we have $\pm m$ as a root. Then we integrate the function to +get +%v + $$F(x) = \fr{x^3}{3} - m x^2 + x m^2 + c.$$ +%e +Now by the intermediate value theorem, this is a function which has a +root in $(-m, m)$ for some particular values of $c.$ To find out which +values of $c$ we need to choose, we compute +%v +\begin{align*} + \fr{-m^3}{3} -m (-m^2) + (-m) m^2 + c &< 0\\ + \fr{-m^3}{3} -2 m^3 + c &< 0\\ + c &< \fr{m^3}{3} + 2m^3. +\end{align*} +%e +For the other part, +%v +\begin{align*} + \fr{m^3}{3} -m (m^2) + (m) m^2 + c &> 0\\ + \fr{m^3}{3} - m^3 + m^3 + c &> 0\\ + c &> \fr{-m^3}{3}. +\end{align*} +%e +So, +% + $$\fr{-m^3}{3} < c < \fr{m^3}{3} + 2m^3.$$ + +I wouldn't believe this if I were you. This seems rather +fallacious. \exeend + +\masciiexe{} Show that $x^4 + 4x + c = 0$ has at most two real roots. + +{\em Solution.} A similar reasoning. Assume it has three: $a, b, c.$ Then it's +true that $0 = f(a) = f(b) = f(c).$ So by Rolle's theorem, there is a +$d$ in $(a,b)$ such that $f'(d) = 0,$ and there is an $e$ in $(b,c)$ +such that $f'(e) = 0.$ The derivative of the function is $g(x) = x^3 + +4,$ and we must find two reals roots of this function; they would be $d$ +and e. However, one root of $g(x)$ is $$x = \sqrt[3]{-4},$$ because +%v +\begin{align*} + x^3 + 4 &= 0\\ + x^3 &= -4\\ + x &= \sqrt[3]{-4}. +\end{align*} +%e +Now, let $x < \sqrt[3]{-4}.$ Then +%v +\begin{align*} + x^3 &< -4\\ + x^3 + 4 &< 0, +\end{align*} +%e +and let $x > \sqrt[3]{-4},$ so +%v +\begin{align*} + x^3 &> -4\\ + x^3 + 4 &> 0. +\end{align*} +%e +So to the left of $\sqrt[3]{-4}, g(x)$ is negative, and to the right +$g(x)$ is positive. So, $g(x)$ will touch the $x$-axis only once; there +can't be two real roots, then. Therefore, $f(x)$ has at most two real +roots. \exeend + +\masciiexe{} Show that a polynomial of degree $3$ has at most $3$ real +roots. + +{\em Solution.} A polynomial of degree $3$ is of the form +%v + $$ax^3 + bx^2 + cx + d.$$ +%e +Assume that it has four real roots. Then it's true that +%v + $$0 = f(a) = f(b) = f(c) = f(d).$$ +%e +So by Rolle's theorem, there are numbers $p$ in $(a,b), q$ in $(b,c),$ +$r$ in $(c,d)$ such that $0 = f'(p) = f'(q) = f'(r).$ But $f'(x)$ is a +second degree polynomial with three real roots which is not +possible. \exeend + +\masciiexe{} Show that a polynomial of degree $n$ has at most $n$ real +roots. + +{\em Solution.} We know that a polynomial of degree $1$ has $1$ real +root. So, if we try to prove this by induction, at least we know +that the proposition is true for $n = 1.$ + +Now, suppose that the proposition is true for some $n = k.$ Let $p(x)$ +be of degree $k + 1.$ Suppose that $p(x)$ has more than $k + 1$ real +roots; they are $r_1, r_2,$ ..., $r_{k+1}, r_{k+2}.$ Then +%v + $$0 = p(r_1) = ... = p(r_{k+2})$$ +%e +and by Rolle's theorem it's true that +%v + $$0 = p'(c_1) = ... = p'(c_{k+1}).$$ +%e +But if $p$ is of degree $k + 1,$ then $p'$ is of degree $k,$ and cannot +have $k + 1$ roots. So it's not true that $p(x)$ has more than $k + 1$ +real roots. Therefore, it has less or equal to $k + 1$ roots. + +Proofs by induction may seem fallacious sometimes. One could object here +that we cannot base our argument on the fact that $p'$ of degree $k$ +cannot have $k + 1$ roots because it is the same thing that we're trying +to prove. + +That's an unfair objection, however, because we tested for $n = 1$ and +it was true; then we assumed to be true for all polynomials of $k$th +degree that they don't have $k + 1$ roots, so it's true under that scope +of the proof. From that assumption, we showed that the same could not +happen to $p$ of degree $k + 1$ and with everything altogether, we +concluded that a polynomial of degree $n$ has at most $n$ roots. + +In fact, I seldom use the letter $n$ twice in a proof by induction; +instead, I use $k$ for the assumption when I'm trying to show that +something is true for $k + 1.$ This way I avoid getting confused with +the $n$ of the proposition and raise the objection that I'm assuming +what I'm trying to prove. \exeend + +\masciiexe{} Suppose that $f$ is differentiable on $\reals$ and has two +roots. Show that $f'$ has at least one root. + +{\em Solution.} If this proposition is true, then it means that a +differentiable function of degree $2$ or more changes direction at at +least in one point. Call the roots of $f$ by $a$ and $b.$ So +%v + $$f(a) = 0 = f(b).$$ +%e +By Rolle's theorem, we have that $f'(c) = 0$ for some $c$ in $(a,b).$ +\exeend + +\masciiexe{} Suppose that $f$ is twice differentiable on $\reals$ and +$f$ has three roots. Show that $f''$ has at least one real root. + +{\em Solution.} Let $a, b,$ and $c$ be in $\complex$. So +%v + $$0 = f(a) = f(b) = f(c).$$ +%e +By Rolle's theorem, we have $f'(d) = 0$ for some $d$ in $(a,b)$ and +$f'(e) = 0$ for some $e$ in $(b,c).$ So these are two real roots of +$f'.$ Since $f$ is twice differentiable, we can differentiate $f'$ to +get $f''.$ Since $f'(d) = 0 = f'(e),$ then by Rolle's theorem, there is +an $i$ in $(d,e)$ such that $f''(i) = 0,$ so $f''$ has at least one real +root. We may try to generalize this. \exeend + +\masciith{} Suppose that $f$ has $n$ roots, and is differentiable on +$\reals n - 1$ times. Then $f^{(k)}$ has $n - k$ real roots where $0 < k +\leq n - 1.$ \theend + +Let's test our generalization. Let $f(x) = x^7 - 1.$ This polynomial has +$7$ roots and is $7 - 1$ times differentiable on $\reals$. Then, by our +generalization, it must be true that $f'(x) = x^6$ has $7 - 1$ real +roots, $f''(x) = x^5$ must have $7 - 2$ real roots, $f^{(3)}(x) = x^4$ +must have $7 - 3$ real roots and so on until $f^{(6)} = x$ which must +have one real root. The generalization seems to work. Can we prove this +now? Hmm, I don't know. \theend + +%v-- + +\subsection{Even more on differentiation} + +It's interesting to notice that the mean value theorem is used in many +applications. There is a variety of problems in which the mean value +theorem can be used; one challenge is to recognize when you can use it; +we'll describe some interesting problems in which the mean value theorem +can be used as a path to the solution. Let's start by looking at the +proof of the following theorem. + +\masciith{} If $f'(x) > 0$ on some interval $B,$ then $f$ is increasing +on $B.$ If $f'(x) < 0$ on $B,$ then $f$ is decreasing on $B.$ \theend + +\masciiproof{} Let $x_1, x_2$ be in $B$ such that $x_1 \neq x_2,$ so we +may assume that $x_1 < x_2.$ We must show that $f(x_1) < f(x_2).$ Assume +that $f'(x) > 0,$ and notice that $f$ is differentiable on $[x_1,x_2].$ +So by the mean value theorem, there is a $c$ in $[x_1,x_2]$ such that +%v + $$f'(c)(x_2 - x_1) = f(x_2) - f(x_1).$$ +%e +Notice that $f'(c) > 0$ and notice that $x_2 - x_1 > 0$ too. So the left +side of the equation above is positive and therefore the right side must +be as well; that is, $f(x_2) > f(x_1),$ and we're done. For a decreasing +function, we need only repeat the proof flipping the notation +around. \profend + +Let's see more problems in which I think that the mean value theorem +would provide a way to a solution. The next three are of a pretty +interesting type of problem, and we already solved one of the same kind, +I think. + +\masciiexe{} Suppose $f(1) = 10$ and $f'(x) \geq 2$ for $1 \leq x \leq +4,$ how small can $f(4)$ possibly be? \exeend + +\masciiexe{} Suppose $f$ is continuous on $[2,5]$ and $1 \leq f'(x) \leq +4$ for all $x$ in $(2,5).$ Show that $3 \leq f(5) - f(2) \leq 12.$ +\exeend + +\masciiexe{} Does there exist a function $f$ such that $f(0) = -1, f(2) += 4,$ and $f'(x) \leq 2$ for all $x?$ \exeend + +%v++ +\masciiexe{} Show that $\tan{x} > x$ for $0 < x < \pi/2.$ + +{\em Solution.} We're going to show that $\tan(x) - x > 0.$ We know that +% + $$\tan(x) = \fr{\sin(x)}{\cos(x)}.$$ +% +As $x \to 0, \tan(x) \to 0.$ As $x \to \pi/2, \tan(x) - x \to \infty$ so +if I can show that $\tan(x) - x$ is increasing on $(0, \pi/2),$ then we +know that +% + $$f(x) = \tan(x) - x > 0$$ +% +is true for all $x$ in $(0, \pi/2)$ which makes $\tan(x) > x$ true for +all $x$ in $(0, \pi/2).$ We look into $f'(x)$ then. We have +% + $$f'(x) = \sec^2(x) - 1 = 1/\cos^2(x) - 1$$ +% +which is only zero when $\cos^2(x) = 1$ which happens at $x = 0,$ but 0 +is not in $(0, \pi/2).$ So, for $x$ in $(0, \pi/2),$ $f'(x)$ is always +positive. Therefore, $\tan(x) - x > 0$ for all $x$ in $(0, \pi/2)$ and +so $\tan(x) > x$ for all $x$ in $(0, \pi/2).$ \exeend + +\masciiexe{} Prove that for all $x > 1,$ +% + $$2 \sqrt{x} > 3 - \fr{1}{x}.$$ +%v-- + +{\em Solution.} We will show that $2 \sqrt{x} - 3 + 1/x > 0$ for $x > +1.$ When $x = 1$ we have $f(x) = 0.$ As $x \to \infty, f(x) \to \infty.$ +It's true that +%v + $$f'(x) = \fr{1}{\sqrt{x}} - \fr{1}{x^2}.$$ +%e +Now, when $f'(x) = 0?$ Never. We have that +%v + $$\fr{1}{\sqrt{x}} > \fr{1}{x^2},$$ +%e +for all $x > 1.$ So $f'(x) > 0$ for all $x > 1.$ So $f(x)$ is always +increasing on $(1,\infty),$ so $2 \sqrt{x} > 3 - 1/x$ for all $x > 1.$ +\exeend + +\masciiexe{} Suppose that $f$ and $g$ are continuous on $[a,b]$ and +differentiable on $(a,b).$ Suppose also that $f(a) = g(a)$ and $f'(x) < +g'(x)$ for $a < x < b.$ Prove that $f(b) < g(b).$ + +{\em Solution.} We're going to consider $h(x) = f(x) - g(x).$ What's +$h(a)?$ It's +%v + $$h(a) = f(a) - g(a) = 0,$$ +%e +because $f(a) = g(a).$ It's true that $h(x)$ is continuous and +differentiable on $(a,b),$ so we can apply the mean value theorem to say +that there exists a number $c$ in $(a, b)$ such that %align by = +%v +\begin{align*} + h'(c)&= f'(c) - g'(c)\\ + &= \fr{h(b) - h(a)} {b - a}\\ + &= \fr{f(b) - g(b) - f(a) + g(a)} {b - a}. +\end{align*} +%e +We know that $b - a > 0.$ We also know that $f'(c) - g'(c) < 0$ because +$f'(x) < g'(x)$ for $a < x < b.$ So it must be true that +% + $$f(b) - g(b) - f(a) + g(a) < 0,$$ +% +otherwise $f'(c) - g'(c)$ would be positive. So, we write %align by < +%v +\begin{align*} + f(b) - g(b) - f(a) + g(a) &< 0\\ + f(b) - g(b) - (f(a) - g(a)) &< 0\\ + f(b) - g(b) - 0 &< 0\\ + f(b) &< g(b), +\end{align*} +%e +as desired. \exeend + +\masciiexe{} Show that $\sqrt{ 1 + x} < 1 + x/2$ if $x > 0.$ + +{\em Solution.} We'll look into $f(x) = \sqrt{1 + x} - 1 - x/2 < 0.$ At +$0,$ we have $\sqrt{1} - 1 = 0.$ As $x \to \infty,$ we have $f(x) \to +-\infty.$ So we must show that $f'(x)$ is always decreasing. + +We have +%v + $$f'(x)= \fr{1}{2\sqrt{1+x}}-\fr{1}{2}.$$ +%e +Is it ever zero? It is when $\sqrt{1 + x} = 1$ which only happens when +$x = 0,$ but we don't care about $x = 0.$ We must show then +%v + $$2 \sqrt{1 + x} > 2.$$ +%e +That is, we can show that $\sqrt{1 + x} > 1$ for all $x > 0.$ It indeed +is because $\sqrt{1 + x} > 1$ implies $1 + x > 1$ which is true whenever +$x >$ $0.$ So $f'(x) < 0$ for all $x > 0.$ So we're done.\exeend + +\masciiexe{} Suppose $f$ is an odd function and is differentiable +everywhere. Prove that for every positive number $b,$ there exists a +number $c$ in $(-b,b)$ such that +%v + $$f'(c) = \fr{f(b)}{b}.$$ +%e + +{\em Solution.} By the mean value theorem, there's a $c$ in $(-b, b)$ +such that +%v + $$f'(c) = \fr{f(b)-f(-b)}{b+b}.$$ +%e +But since $f$ is odd, then we may rewrite that as %align by = +%v +\begin{align*} + f'(c) &= \fr{f(b)+f(b)}{b+b}\\ + &= \fr{2f(b)}{2b}\\ + &= \fr{f(b)}{b}, +\end{align*} +%e +as desired. \exeend + +\masciiexe{} Prove that $|\sin{a} - \sin{b}| \leq |a - b|$ for all $a$ +and $b$ in $\reals$. + +{\em Solution.} By the mean value theorem, there's a $c$ in $(a, b)$ +such that +%v + $$\sin'(c) = \fr{\sin(b)-\sin(a)}{b-a}.$$ +%e +We know that $\sin'(c) = \cos(c)$ and that $|\cos(c)| \leq 1.$ Now, take +the absolute value of the equation above to get %align by = +%v +\begin{align*} + |\cos(c)| &= \bl|\fr{\sin(b)-\sin(a)}{b-a}\br|\\ + &= \fr{|{\sin(b) - \sin(a)}|}{|{ b - a}|}\\ + |b - a||\cos(c)| &= |\sin(b) - \sin(a)|. +\end{align*} +%e +Since $|\cos(c)| \leq 1,$ then it's true that +%v + $$|b - a| \geq |\sin(b) - \sin(a)|.$$ +%e +\exeend + +\masciiexe{} If $f'(x) = m$ for all $x,$ where $m$ is a constant, show +that $f(x) = mx + n$ for some constant $n.$ \exeend + +\masciiexe{} A number $m$ is called a fixed point of $f$ if $f(m) = m.$ +Prove that if $f'(x) \neq 1$ for all real numbers $x,$ then $f$ has at +most one fixed point. \exeend + +\masciith{} Suppose $f''$ is continuous near $c.$ Then if $f'(c) = 0$ +and $f''(c) > 0,$ then $f$ has a local minimum at $c,$ and if $f'(c) = +0$ and $f''(c) < 0,$ then $f$ has a local maximum at $c.$ \theend + +Notice that the theorem does not mention any case when $f''(c) =$ $0.$ +That's because we cannot say much when this is the case. The same +situation happens when $f''(c)$ does not exist. But the first derivative +handles all these difficulties. + +\masciiexe{} Assume that all functions in this proposition are twice +differentiable and that their second derivatives are never zero. If $f$ +and $g$ are concave upward on $B,$ show that $f + g$ is concave upward +on $B.$ \exeend + +\masciiexe{} Assume that all functions in this proposition are twice +differentiable and that their second derivatives are never zero. If $f$ +is positive and concave upward on $B,$ show that $[f(x)^2]$ is concave +upward on $B.$ \exeend + +\masciiexe{} Assume that all functions in this proposition are twice +differentiable and that their second derivatives are never zero. If $f$ +and $g$ are positive, increasing, concave upward functions on $B,$ show that +fg is concave upward on $B.$ \exeend + +\masciiexe{} Assume that all functions in this proposition are twice +differentiable and that their second derivatives are never zero. +Suppose that $f$ and $g$ are both concave upward on $(-\infty, \infty).$ +Under what condition on $f$ will the composite function $h(x) = f(g(x))$ +be concave upward? \exeend + +\masciiexe{} Show that a cubic function always has exactly one point of +inflection. If it has three roots, show that the $x$ coordinate of the +inflection point is $(x_1 + x_2 + x_3)$ / $3.$ \exeend + +\masciiexe{} Prove that if $(m,f(m))$ is a point of inflection of $f,$ +and $f''$ exists in an open interval containing $m,$ then $f''(m) = 0.$ +Stewart suggests: apply the first derivative test and fermat's theorem +to the function $g = f'.$ \exeend + +\masciiexe{} Show that if $f(x) = x^4,$ then $f''(0) = 0,$ but $(0,0)$ +is not an inflection point of the graph of $f.$ \exeend + +\masciiexe{} Show that $g(x) = x |x|$ has an inflection point at $(0,0)$ +but $g''(0)$ does not exist. \exeend + +\masciiexe{} Suppose that $f''$ is continuous and $f'(m) = f''(m) = 0,$ +but $f''(m) > 0.$ Does $f$ have a local maximum or minimum at $m?$ Does +$f$ have a point of inflection at $m?$ \exeend + +\masciiexe{} Find a function $f$ whose $f'$ and $f''$ are always +negative. \exeend +% +% Solution. Let f'' be -1, for example. It's always negative. Now, f' +% could be something like -x, which is always negative too. Now, f can be +% something like (-x^2)/2. %end + +\masciiexe{} Find a cubic function $f(x) = mx^3 + nx^2 + px + q$ that +has a local maximum of $3$ at $-2$ and a local mininum of $0$ at $1.$ + +{\em Solution.} The requirements for $f'(x)$ are $f'(-2) = 0, f'(1) = 0$ +and $f'(x) = 3mx^2 + 2nx + p.$ Also, $f(-2) = 3$ and $f(1) = 0.$ So we +need %align by = +%v +\begin{align*} + -8m + 4n - 2p + q &= 3\\ + m + n + p + q &= 0\\ + 12m - 4n + p + 0 &= 0\\ + 3m + 2n + p + 0 &= 0. +\end{align*} +%e +This system gives us $m = 2/9, n = 1/3, p = -4/3, q = 7/9.$ So the +function that we want is $f(x) = (2/9) x^3 + (1/3) x^2 - (4/3) x + +(7/9).$ \exeend + +\subsection{Limits at infinity} + +\masciidef{} Let $f$ be a function defined on some interval +$(m,\infty).$ Then +%v + $$\lim_{x \to \infty} f(x) = L$$ +%e +means that for every $e > 0,$ there is a number $n$ such that +%v + $$\text{if } x > n \text{ then } |f(x) - L| < e. $$ +%e +\defend + +\masciidef{} Let $f$ be a function defined on some interval +$(-\infty,m).$ Then +%v + $$\lim_{x \to -\infty} f(x) = L$$ +%e +means that for every $e > 0,$ there is a number $n$ such that +%v + $$\text{if } x < n \text{ then } |f(x) - L| < e. $$ +%e +\defend + +\masciidef{} Let $f$ be a function defined on some interval +$(m,\infty).$ Then +%v + $$\lim_{x \to \infty} f(x) = \infty$$ +%e +means that for every positive $M,$ there is a number $n$ such that +%v + $$\text{if } x > n \text{ then } f(x) > M. $$ +%e +\defend + +\masciith{} If $r > 0$ is a rational number, then +%v + $$\lim_{x \to \infty} \fr{1}{x^r} = 0.$$ +%e +If $r > 0$ is a rational number such that $x^r$ is defined for all $x,$ +then +%v + $$\lim_{x \to \infty} \fr{1}{x^r} = 0.$$ +%e +\theend + +\subsection{Drawing functions} + +We have enough tools to draw functions now. Let's look into the things +which we need to draw functions. We need the critical numbers. With the +critical numbers, we break the real line up into intervals delimited by +the critical numbers. We then look at the first derivative of the +function at each of these intervals; we then determine whether $f$ is +increasing on each of these intervals. + +So we now have a clue of the way that the function travels in the plane +of Descartes, but we need to know when it goes up and when it comes down +and when it simply slows down and keeps going: we the extreme values; we +need the local maxima, local minima and the absolute ones if they exist. + +But to find the local extrema we need only the first derivative. We +observe the critical points in which the function changes sign; that is, +when it changes from increasing to decreasing or from decreasing to +increasing. + +\subsubsection{An algorithm} + +Let $f(x)$ be a function. Determine the domain of $f(x).$ Then look for +$y$-intercepts, if possible, and find out where the curve touches the +$y$-axis. Mark these points. + +Look for symmetry. Is it odd? Is it even? Find out, if you can, and +keep that in mind making wise decisions: if it's even or odd, we draw +only for $x \geq 0$ and we use a mirror later. + +Look for periodicity. Is there a period? Which one? + +Look for asymptotes. Are there vertical ones? Are there horizontal ones? +Find them. Are there slant asymptotes? If so, find them. + +Compute $f'(x).$ Find all critical numbers. Solve $f'(x) = 0.$ Break the +real line into as many intervals as possible from the +solutions. Determine where $f'(x)$ is positive and where $f'(x)$ is +negative. Find all local maxima and all local minima. + +Compute $f''(x).$ Find all inflection points by computing whether +$f''(x) > 0$ or $f''(x) < 0.$ Look at $f'(x)$ when $f''(x) = 0.$ +Convince yourself that you need not a new division of the real line to +look into $f''(x).$ + +Draw $f(x);$ sketch the asymptotes; plot the intercepts, maximum and +minimum points, and inflection points. Make the curve pass through these +points, rising and falling according to the information given by +$f'(x),$ and according to the information given by $f''(x).$ If +additional accuracy is desired near any point, you may compute the value +of $f'(x)$ there, since they should be close enough; notice that the +tangent indicates the direction in which $f(x)$ goes. + +\subsection{Slant asymptotes} + +\masciidef{} A slant asymptote is a line $y = mx + b$ of a function +$f(x)$ if and only if +%v + $$\lim_{x \to \infty} (f(x) - (mx + b)) = 0.$$ +%e +This definition says that if the two curves --- $f(x)$ and $y$ --- get +closer and closer as $x \to \infty,$ then $y$ is a slant asymptote of +$f(x).$ One way to compute where two curves get closer and closer is to +find out whether the distance from the points in one curve to the other +--- that's what the definition does, in fact. \defend + +Perhaps the challenge is when to recognize that we have a slant +asymptote. For example, we'll have slant asymptotes when the degree of +the numerator of a rational function is one more than the degree of the +denominator. + +\masciiexe{} Show that +%v + $$f(x) = \fr{x^3}{x^2 + 1}$$ +%e +has a slant asymptote. + +{\em Solution.} Perform long division to find that +%v + $$f(x) = \fr{x^3}{x^2 + 1} = x - \fr{x}{x^2 + 1}.$$ +%e +Notice that +%v + $$- \fr{x}{x^2 + 1} \to 0 \text{ as } x \to \infty.$$ +%e +So $f(x) - x \to 0$ as $x \to \infty,$ and $y = x$ is a slant asymptote +of $f(x).$ \exeend + +\masciiexe{} Draw $f(x) = x^{2/3} (6 - x)^{1/3}.$ + +{\em Solution.} We'll follow exactly what we defined above. We need the +critical numbers, so we will find out where $f'(x)$ fails to exist, and +where $f'(x) = 0.$ Let $u = x^{2/3}, v = (6 - x)^{1/3}.$ So %align by = +%v +\begin{align*} + f'(x)&= u'v + uv'\\ + &= (2/3) x^{-1/3} (6 - x)^{1/3} + x^{2/3} (-1/3) (6 - x)^{-2/3}\\ + &= \fr{4-x}{\sqrt[3]{x(6-x)^2}}. +\end{align*} +%e +So we now know that the we have critical at $x = 0, x = 4,$ and $x = 6.$ +Our intervals are %table + +%v++ +% +% interval | 4 - x | cbrt{x} | cbrt{(6 - x)^2} | f'(x) | f(x) +% x < 0 | + | - | + | - | +% 0 < x < 4 | + | + | + | + | +% 4 < x < 6 | - | + | + | - | +% 6 < x | - | + | + | - | +% +%v-- + +Now we know where it goes up and down, and so we have the local minima +and the local maxima. We have a local minimum at $x = 0$ because it goes +down in the negative side of $x$ and goes up after touching $x = 0.$ We +have a local maximum at $x = 4$ because note that as it goes over $x = +4,$ it changes from going up to going down. + +Now, what does $f(x)$ look like? So far, I can say that it comes down +from the left side and it will have a cusp at $0$ because the $f$ is +continuous at $x = 0,$ but not differentiable there --- we have a +vertical tangent there ---, so that's a fair guess. From that point, it +goes up and to +%v + $$f(4) = (2 \cdot 2)^{2/3} 2^{1/3} = 2^{5/3} \approx 3.1748,$$ +%e +and it is differentiable at that $f(4),$ so I can say that it has a +``smooth'' high point at $y \approx 3.1748,$ and then it comes down +forever with a nondifferentiable point at $x = 6$ which gives us a +vertical tangent there as well. Let's see if we can get more +information. + +Can $f''(x)$ gives us any more clues? Yes, $f''(x)$ can tell us about +the concavities of $f(x).$ Computing $f''(x),$ we get +%v + $$f''(x) = \fr{-8}{x^{4/3}(6-x)^{5/3}}.$$ +%e +Now we check where $f''(x)$ is positive and where it is negative. It is +never zero, but it may be undefined at $x = 0$ and $x = 6.$ Building a +table, we see the following behavior. %table + +%v++ +% +% interval | -8 | x^{4/3} | (6 - x)^{5/3} } | f''(x) +% x < 0 | - | + | + | - +% 0 < x < 6 | - | + | + | - +% 6 < x | - | + | - | + +% +%v-- + +So it's positive when $x > 6,$ and negative to the left side. So $f$ is +concave down when $x < 0,$ concave down when $0 < x < 6$ and concave up +when $x > 6.$ Now we're able to draw a accurate enough graph.\exeend + +\masciiexe{} Suppose you're given a formula for a function $f.$ How can +you tell where $f$ is increasing or decreasing? How do you determine +where the graph of $f$ is concave upward or concave downward? How do you +locate the inflection points? + +{\em Solution.} First, look at $f'.$ Break the real line in as many +intervals as necessary given by the zeroes of $f'$ and where $f'$ is not +defined --- the critical numbers of $f.$ If $f'$ has $n$ critical +numbers, you get $n + 1$ intervals. Pick a number in each of these +intervals and notice where $f'$ is positive and negative. If positive, +then $f$ is increasing, if negative, then $f$ is decreasing. + +Second, look at $f''.$ Find the critical numbers of $f'.$ Break the real +line into as many intervals as required by the number of critical +numbers of $f'.$ Notice where it is positive, and where it is +negative. Where it is positive, $f$ is concave upward; otherwise, +downward. + +Third, using the second part, notice where it changes sign; we have an +inflection point only at the points where it changes sign. \exeend + +\subsection{Optimizing things} + +If you have a function that describes something, then you can look for +the absolute maximum and mininum and you'll have a clue of where in the +input of the function you have a maximization or a minimization of the +output. Finding minima and maxima values is actually not too hard, but +finding the functions is sometimes tricky, as we should expect, because +to describe phenomena in the universe requires considerable skills. + +\masciiexe{} Find two integers whose difference is $100$ and whose +product is a minimum. + +{\em Solution.} Let $x, y$ be integers with $x < y.$ Then $y - x = 100.$ +We want to minimize $f(x) = xy.$ We know that $y = 100 + x.$ So $f(x) = +x(100 + x)$ and $f'(x) = 2x + 100.$ Now $f'(x)$ is zero when $x = -50,$ +and there $y = 150.$ + +So $150 - 50 = 100$ and the product is $150 \cdot 50 = 7500.$ We're +done. We could object to this solution saying that we're not sure +whether $x = -50$ is a minimum, but possibly a local extremum. That's +futile, though, because $f(x)$ is a parabola concave upward, so I know +that where $f'(x) = 0,$ we do have a local mininum. \exeend + +\masciiexe{} Find the point on the line $y = 4x + 7$ that is closest to +the origin. + +{\em Solution.} Here we're required to develop a distance function, and +for the plane of Descartes, we have the famous +%v + $$d = \sqrt{(a - 0)^2 + (b - 0)^2}.$$ +%e +We want the distance from a point on y curve to the origin. To find the +distance, we need the point $(a,b)$ which is common for both functions; +that is +%v + $$d = \sqrt{x^2 + (4x + 7)^2}.$$ +%e +Now, differentiating $d$ is harder than differentiating $d^2 = x^2 + (4x + +7)^2$, so we will work with $d^2$ because they both share the same +minimum --- but notice that this is not true in general; for example, +$f(x) = x^2 - 1$ and $f(x)^2 = (x^2 - 1)^2$ don't share minima. We have +$(d^2)' = 2x + 8(4x + 7)$ which has a zero when $x = -28/17,$ so the +point is $(-28/17, 7/17).$ \exeend + +\masciiexe{} Find the points on the hyperbola $y^2 - x^2 = 4$ that are +closest to the point $(2,0).$ + +{\em Solution.} I'd like to see the hyperbola first. So I'm going to +graph it. This hyperbola is symmetric about the $x$-axis and about the +$y$-axis because $y^2 - x^2 = 4 = (-y)^2 - (-x)^2.$ Let's consider just +the $y > 0$ of the plane of Descartes. + +We know that the curve touches $y = 2$ because if $x = 0,$ then $y = +\sqrt{4}.$ As $x \to \infty,$ $y \to \infty,$ so there's no horizontal +asymptote --- nor any vertical one. There may be slant asymptotes. + +We compute +%v + $$y' = \fr{x}{\sqrt{4 + x^2}},$$ +%e +which is zero when $x = 0,$ so $x = 0$ is the only critical number. We +compute +%v + $$y''= \fr{\sqrt{4 + x^2} - x^2 (4 + x^2)^{-1/2}}{4 + x^2},$$ +%e +which is never negative. From $y'$ and $y'',$ we conclude the following +table. %table + +% interval | y' | y'' +% x < 0 | - | + +% 0 < x | + | + + +So, there's a local minimum at $0,$ and no inflection points. What about a +slant asymptote? If there's one, and it's $g(x),$ then it must be true +that +%v + $$\lim_{x \to \infty} \sqrt{4 + x^2} - g(x) = 0.$$ +%e +Suspecting that $g(x) = x$ will do, we let $q(x) = \sqrt{4 + x^2} + x.$ +Then %align by = +%v +\begin{align*} + \sqrt{4 + x^2} - x &= (\sqrt{4 + x^2} - x) \cdot \fr{q(x)}{q(x)}\\ + &= \fr{4 + x^2 - x^2 } {\sqrt{4 + x^2} + x}\\ + &= \fr{4 }{\sqrt{4 + x^2} + x}\\ + &= 0, +\end{align*} +%e +as $x \to \infty$ because $(4 + x^2) \to \infty,$ and $\sqrt{4 + x^2}$ +as well, and certainly does $x.$ So $g(x) = x$ is a slant asymptote. Now +we have a pretty good idea of what it looks like. Let's begin then. The +distance from $(2,0)$ to the hyperbola is given by +%v + $$d = \sqrt{ (x - 2)^2 + y^2 }.$$ +%e +To work with only one variable, we must notice the points we are +interested in considering are simply the points of the hyperbola, so we +may replace $y^2$ in $d$ by $4 + x^2.$ So +%v + $$d = \sqrt{ (x - 2)^2 + 4 + x^2 }.$$ +%e +But it's easier to work with +%v + $$d^2 = (x - 2)^2 + 4 + x^2,$$ +%e +and we can since they share the same minimum. We now minimize $d^2$ by +computing $(d^2)' = 4x - 4,$ which is zero when $x = 1.$ So the closest +points to $(2,0)$ are $(1,\sqrt{5})$ and $(1,-\sqrt{5}).$ \exeend + +\masciiexe{} Find the dimensions of the rectangle of largest area that +can be inscribed in a circle of radius $r.$ + +{\em Solution.} The formula of a circle is $x^2 + y^2 = r^2.$ We can +position this circle at the origin of the plane of Descartes. Then we +can work with $y = \sqrt{r^2 - x^2}$ which is half of the circle. Notice +that the height of the rectangle will touch the circle --- it's +inscribed, and it only makes sense this way, since we want to maximize +the area. So, if a rectangle has area $A(x,y) = xy,$ then we will be +working with +%v + $$A(x) = 2x \sqrt{r^2 - x^2}.$$ +%e +Now we have a function of one variable which we wish to maximize. To +maximize it, we take its derivative which is +%v + $$A'(x) = 2 \sqrt{r^2 - x^2} - \fr{2 x^2}{\sqrt{r^2 - x^2}}.$$ +%e +This function is zero when $x = \fr{\sqrt{2} r}{2}.$ So the largest +area is +%v + $$A(x) = \sqrt{2} r \sqrt{r^2 - \fr{r^2}{2}}.$$ +%e +\exeend + +\masciiexe{} Find the area of the largest isosceles triangle that can be +inscribed in the ellipse +%v + $$\fr{x^2}{a^2} + \fr{y^2}{b^2} = 1.$$ +%e +{\em Solution.} Without computing too much, let's develop the algorithm +required. The area of a triangle is +%v + $$A(x,h) = \fr{xh}{2}.$$ +%e +In order to work with a single variable, we need h with respect to $x.$ +We know that one side of the triangle will have length $\sqrt{h^2 + +x^2}.$ We know that the height of the triangle will always touch the +ellipse, so +%v + $$h = y.$$ +%e +We can replace $y$ by computing %align by = +%v +\begin{align*} + x^2 + \fr{a^2 y^2} {b^2} &= a^2\\ + b^2 x^2 + a^2 y^2 &= b^2 a^2\\ + a^2 y^2 &= b^2 a^2 - b^2 x^2\\ + y^2 &= b^2 - \fr{b^2 x^2} {a^2}\\ + y &= \sqrt{b^2 - \fr{b^2 x^2}{a^2}}. +\end{align*} +%e +Therefore, +%v + $$A(x) = \fr{ x \sqrt{b^2 - \fr{b^2 x^2 }{ a^2}} }{2}.$$ +%e +Now maximize it to get all $x$ such that $A'(x) = 0.$ Hopefully, there's +only one that makes sense. The answer will be with respect to the +constants $a$ and $b.$ Plug the answer in $A(x)$ to get the largest +area. + +Hmm, nope. This solution is fallacious. The solution assumes that the +triangle will only take the space possible in half of the ellipse. We +may get a larger triangle by using the other half too; I don't know if +that wouldn't happen, though. I don't know. \exeend + +\subsection{Applications to economics} + +Suppose that the cost of feeding $x$ people in Brazil is described by +%v + $$C(x) = 0.3 x^3 - 2x^2 + 20.$$ +%e +This function has a local minimum at $x = 4 + 4/9.$ We could, therefore, +think that this is the exact point that we should produce --- so that we +can take advantage of low cost level, but as we shall see, there is +another interesting point of this function which seems to be the an +optimized way to produce with respect to cost per unit. + +Let's consider the function +%v + $$c(x) = C(x)/x,$$ +%e +which is called the average cost function. By dividing $C(x)$ by $x,$ we +are looking at the cost per unit. That is, if a supplier gives us a +discount for buying a lot, we simply pretend that the price per unit is +lower. Therefore, looking at $c(x),$ we would want to produce $x$ units +such that $x$ is a local minimum of $c(x).$ Correct? + +We see that the minimum of $c(x)$ is not the same minimum of $C(x).$ Why +would it be? They are different functions. Also, let's take both minima +and compute how much it would cost to produce $x$ units in both +functions. + +The average cost function is +%v + $$c(x) = C(x)/x = 0.3 x^2 - 2x + 20/x$$ +%e +and it intersects the marginal cost function at $x \approx 4.78.$ Now, +let's compare. We have $C(4.78) \approx 7.06,$ while $C(4 + 4/9) \approx +6.83.$ But we have $c(4.78) \approx 1.47,$ while $c(4 + 4/9) \approx +1.53.$ + +So, it is worth producing a little more in order to get a lower unit +cost --- even though the cost of production is increasing a bit. Perhaps +because this function is a little unusual, it shows this behavior, or +perhaps it doesn't make much sense otherwise. + +Notice that picking a local minimum at the cost function doesn't make +too much sense. Suppose, for instance, that the minimum shows up close +to $0.$ Will us produce almost nothing just to get the best price? +Probably not. Also, notice that $C(x)$ is a very unusual cost function; +most cost functions don't have local minima, I'd say --- it's very +unusual to buy, say, $10$ and pay $10,$ and then getting a cost of $5$ for +buying $20$ from the same supplier. + +\subsection{Sigma notation} + +We're about to study about integrals. It will be useful, therefore, to +look into sigma notation used in Riemann sums. If we want to write $2^3 ++$ $3^3 + ... + n^3,$ we pick an index $i$ and we replace the sum by +%v + $$\sum_{i = 2}^n i^3.$$ +%e +The letter $n$ used in the sum must not be confused with the letter $n$ +used in limit expressions which is seen in Riemann sums. Suppose that +we're computing an approximation of the area under some curve $f.$ We +write +%v +$$A\approx f(x_1) \Delta x + f(x_2) \Delta x + f(x_3) \Delta x + f(x_4) \Delta x.$$ +%e +Using $n$ rectangles, we get +%v + $$A \approx f(x_1) \Delta x + ... + f(x_n) \Delta x.$$ +%e +To write this as a sum, we let $i$ be an iterator, and so $i$ goes from +$1$ to $n.$ That is +%v + $$A \approx \sum_{i = 1}^n f(x_i) \Delta x.$$ +%e +Now, if we want to increase $n$ forever, we say so by writing +%v + $$A = \lim_{n \to \infty} \sum_{i = 1}^n f(x_i) \Delta x.$$ +%e +Notice now that we have an exact area. These sums are called Riemann +sums because Bernhard Riemann was calculating ``areas'' this way, I +think. It is indeed a very remarkable technique. What we call a Riemann +sum, though, is always an approximation to an area; that's what we call +it today. Perhaps Riemann was already taking limits to find exact areas. + +By the way, the word ``exact'' used in conjunction with area is a +mathematical exactness. We defined the area under a curve to be the +integral of the curve over some interval --- so, the function must be +continuous on that interval. So it is exact because it is by definition +anyway. The definition of an integral, as we shall see, is what we see +above: the limit, as $n \to \infty$, of a Riemann sum with $n$ +rectangles. + +\section{Integrals} + +We start with the definition of a definite integral. Let's first observe +what the definition is; let's look at its words and symbols, and after +that, let's talk about ways of thinking of it. + +\masciidef{} Let $f$ be a continuous function defined on $[a, b].$ Break +this interval into $n$ equal pieces so that each piece will have a +length of $\Delta x = (b - a)/n.$ Let $x_0, ..., x_n$ be the endpoints +of these subintervals and we choose arbitrary points $x_1^*, ..., x_n^*$ +in these subintervals an define the integral of $f$ from $a$ to $b$ as +%v +$$\int_a^b f(x)\ dx = \lim_{n \to \infty} \sum^n_{i=1} f(x_1^*) \Delta x.$$ +\defend +%e + +When $f(x) \geq 0$ for all $x$ in $[a,b],$ then a definite integral is +an area; that is, a definite integral is a number; it signifies a +quantity; an amount of squares of some unit such as meters. If that's +not the case, then we may get a difference of areas, or perhaps a +completely negative area. The latter case if when $f(x) \leq 0$ for all +$x$ in $[a,b].$ None of these cases is any problem; it's a matter of +interpretation. Mathematics is not really concerned with these +interpretation; mathematics is concerned with definitions and theorems, +but I don't mean mathematicians. I believe that mathematicians are very +much concerned with these interpretations, but ``negative area'' is not +problem for a mathematician. If a negative balance in your account if +money that you owe, then a negative area is an area that you don't have. + +We talk about these arbitrary points in the definition because they are +really arbitrary; that is, we can pick any points in these subintervals +whatsoever. In cases when our function is a table of values, then we +will of course pick the points in which we have values; a table of +values is a very discontinuous function. What I mean is that we have a +finite number of points in which the function is defined, so the +function is not continuous anywhere. So we can't integrate it; but we +can get an approximation, anyway; as Riemann used to do. In situations +such as this one described, we are indeed picking arbitrary points. In +an abstract case; in cases where we're dealing with mathematical +functions, we will indeed choose equally spaced points if we're going to +integrate directly through Riemann's technique. The truth is that for +mathematical functions, we integrate using our integration methods, but +numerical integration is always useful for when we don't have a +continuous function to work with. + +Some discontinuities can be resolved. For example, suppose that a +function is continuous on an interval $[a,c)$ and continuous on an +interval $(c,b].$ That is, the function is continuous on $[a,b]$ except +at $c.$ Suppose now that the limit of the function as we approach $c$ +exists and has value $L.$ Then we may, simply... hah, I don't know if we +can do what I'm thinking. For a non-abstract case, indeed; but for an +abstract function, I don't know. What I had in mind was to patch the +function, but if we patch it, we have now a continuous function and then +of course we can integrate. + +When we use Riemann's technique to integrate, we often pick the +midpoints of the $n$ subintervals we choose. That's because for some +common functions, we actually get a pretty good approximation of the +area by picking the midpoints. + +\subsection{Properties of integrals} + +In our definition of the definite integral, we assumed that the lower +limit is a point on the $x$-axis which is more to the left of the upper +limit, but a Riemann sum makes sense even if the lower limit is greater +than the upper limit. Suppose we want to integrate over an interval +$[a,b],$ but we want to start from the right and add to the left; then +$\Delta x$ changes from $(b - a)/n$ to $(a - b)/n.$ So +%v + $$\int_b^a f(x)\ dx = - \int_a^b f(x)\ dx.$$ +%e +Also, if a $= b,$ then $\Delta x = 0$ so +%v + $$\int_a^a f(x)\ dx = 0.$$ +%e +Also, integrating a constant, is the same as computing the area of a +rectangle because a constant function is a straight line. So, if the +interval is $[a,b],$ then the integral will be equal to $c (b - a),$ +where $c$ is any constant. Also, the sum of two integrals is equal to +the integral of the sum of two functions over the same interval. + +You can always concatenate adjacent intervals as says the property +%v + $$\int_a^c f(x)\ dx + \int_c^b f(x)\ dx = \int_a^b f(x)\ dx.$$ +%e +If $f(x) \geq 0$ for $[a,b],$ then +%v + $$\int_a^b f(x)\ dx \geq 0.$$ +%e +This makes total sense, no? Similarly, if $f(x) \geq g(x)$ for $[a,b],$ then +%v + $$\int_a^b f(x)\ dx \geq \int_a^b g(x)\ dx.$$ +%e +Suppose now that $m \leq f(x) \leq M$ for $[a,b],$ where $m$ and $M$ are +constants. Then, by using the property defined above, we can write +%v + $$\int_a^b m\ dx \leq \int_a^b f(x)\ dx \leq \int_a^b M\ dx,$$ +%e +which in turn implies that %cm +%v + $$m (b - a) \leq \int_a^b f(x)\ dx \leq M (b - a).$$ +%e +which has a meaningful geometric interpretation. This property is very +useful to estimate integrals. It also allows us to start a chain of +reasoning if we're dealing with areas or integrals, since all integrals +have this property. + +Suppose for instance, that we want to estimate the area +%v + $$\int_1^4 \sqrt{x}\ dx.$$ +%e +Since $\sqrt{x}$ is defined on $[1,4],$ then we can use the ``closed +interval theorem'' to get the absolute minimum and absolute maximum of +the function in this interval. So it's true that %align by \leq +%v +\begin{align*} + 1 (4 - 1) &\leq \int_1^4 \sqrt{x}\ dx \leq 2 (4 - 1)\\ + 3 &\leq \int_1^4 \sqrt{x}\ dx \leq 6. +\end{align*} +%e +So the area we're looking for indeed lies between the $3$ and $6$ units +square, or is $3$ or $6$ units square. + +Let's estimate some integrals now, using Riemann sums. Suppose that +$f(x)$ $= 2 - x^2$ for $0 \leq x \leq 2.$ We will take the right +endpoints as heights for the rectangles. We have each $\Delta x = 2/4 = +1/2.$ So our heights will be computed from $1/2, 2/2, 3/2, 4/2.$ The +$i$th height will be $i/2$ from $i=1$ to $i=4.$ So +%v +$$\sum_{i=1}^4\fr{1}{2} \bl[ 2 - \bl( \fr{i}{2} \br)^2 +\br] = \fr{1}{4}$$ +%e +Now, if we would use $n$ rectangles, then we would get a $\Delta x =$ +$2/n.$ Each height will be computed from $2/n, 4/n, 6/n, ..., 2n/n.$ So, +we get a formula for a Riemann sum, which when taking the limit, we find +%v +$$\lim_{n\to \infty} \sum_{i=1}^n \fr{2}{n} \bl[2 - +\bl(\fr{2i}{n}\br)^2 \br] = \fr{4}{3} = 1 + \fr{3}{9}.$$ +%e +Suppose that $f(x) = 3x - 7$ for $0 \leq x \leq 3.$ Let's compute the +integral by using Riemann sums. We will break the interval down in $n$ +pieces, so each piece will be $3/n.$ Using the right endpoints, we will +compute the heights from $3/n, 6/n,$ 9n, ..., 3n/n. In general, we will +compute the heights from 3i/n from $1$ to $n.$ In symbols, we have +%v +$$\lim_{n\to \infty} \fr{3}{n} \sum_{i=1}^n \fr{9i}{n} = \fr{27}{2}$$ +%e +Suppose that $f(x) = x - 2 \sin(2x)$ for $0 \leq x \leq 3.$ In general, +$\Delta x$ $= 3/n.$ So the heights will be computed from $3i/n$ from $1$ +to $n.$ In symbols, we have the integral equal to +%v +$$\lim_{n\to \infty} \fr{3}{n} \sum_{i=1}^n \fr{3i}{n} - 2 +\sum_{i=1}^n \sin\bl(\fr{6i}{n} \br)$$ +%e +I don't know how to compute the second sum. The sine function seems to +complicate matters to me. I would, of course, start by looking for a +pattern there, and rewrite the sine function as a new sum involving the +pattern of values that I found by computing many sine function calls +from the values that interests us; perhaps this way we would be able to +get rid of the sine expression. + +Let us now turn ourselves to the midpoint rule. Suppose that we want to +compute the area under $2 - x^2$ for $0 \leq x \leq 2$ with $4$ +rectangles. Dividing a distance of $2$ in $4$ pieces will yield a $1/2$ +distance for each piece. We are interested in the midpoints of each of +these pieces, so we will start with the midpoint between $0$ and $1/2$ +which is $1/4;$ the next will be $(1/2 + 1)/2 = 3/4;$ the next will be +5/4. In general, we have $(2i + 1)/4$ where $i$ ranges from 0 to +3. Therefore, we have +%v +$$\sum_{i=0}^3 \fr{1}{2} \bl[2 - \bl( \fr{2i + 1}{4} \br)^2 \br] = 1.375$$ +%e +which is a pretty good approximation, considering the amount of +rectangles we're using. + +\masciiexe{} Estimate $\int_0^{10} \sin( \sqrt{x} )\ dx.$ + +{\em Solution.} We will compute a Riemann sum with $5$ rectangles by +using midpoints to compute heights. So we write +%v +$$\int_0^{10}\sin( \sqrt{x} )\ dx \approx \sum_{i=0}^4 2 ( \sin( \sqrt{2i+1} )) \approx 6.64.$$ +%e +Because the interval goes from $0$ to $10,$ we chose to divide it in $5$ +pieces so that we can get simple looking expressions; we have, for +example, $\Delta x = 2,$ and the heights, computed from midpoints, are +expressed 2i $+ 1$ where $i$ goes from $0$ to $4.$ The integral itself +is approximately $6.28,$ so we have a pretty good approximation. \exeend + +\masciiexe{} Estimate $\int_1^2 \sqrt{1 + x^2}\ dx.$ + +{\em Solution.} We will compute a Riemann sum using $10$ rectangles. We +will have a $\Delta x = 1/10.$ We will compute the heights by using the +midpoints of each subinterval. The first left endpoint is $1,$ and the +second is $1 + 1/10 = 11/10.$ The second left endpoint is $11/10 + 1/10 += 12/10,$ and it goes on like that. The first midpoint is $(1 + 11/10)/2 += 21/20.$ The second midpoint is $(12/10 + 13/10)/2 = 25/20.$ + +It is not clear to me what the $i$th midpoint will be. We will then +develop some algebra here to see if we can have a general form for +midpoints, and then come back to solve this problem. \exeend + +\subsection{Interval patterns in Riemann sums} + +The length of each rectangle is usually computed by dividing the +interval $[r,s]$ in $n$ pieces. So $\Delta x = (s - r)/n.$ Now, what is +the first point of the interval? It is certainly $r.$ The next point +will be $r + (s - r)/n,$ and the next will be $r + 2(s - r)/n,$ and the +next will be $r + 3(s - r)/n.$ Therefore, the $i$th will be $r + i(s - +r)/n.$ We are interested as well in the midpoints. + +So we need to half of the sum of two adjacent points. That is, +%v +$$\fr{\bl[r+ \fr{(i - 1)(s - r)}{n}\br] + + \bl[r + \fr{i (s - r)}{n}\bl]}{2}.$$ +%e +But notice that this is a formula for midpoints, not a pattern. We want +a pattern as well, so that we can write a Riemann sum right away. In +order to find a pattern, we will look at some values of $i.$ When $i = 1,$ +we have +%v +$$\fr{1}{2}\bl( \bl[r + 0 \cdot \fr{s - r}{n}\br] + + \bl[r + \fr{s - r}{n}\br] \br) = + \fr{1}{2} \bl(2r + \fr{s - r}{n}\br) = + r + \fr{s - r}{2n}$$ +%e +and the sequence goes as +%v +$$r+ \fr{(s - r)}{2n}, r + \fr{3(s - r)}{2n}, r + +\fr{5(s - r)}{2n}, ..., r + \fr{(2i + 1)(s - r)}{2n},$$ +%e +where $i$ starts at zero. Now, we must discover what is the last value +of $i.$ Would it be simply $n?$ Or perhaps $n - 1?$ I say that we will +have $n$ midpoints; I also say that the first is obtainable by $i = 0,$ +so the last must be obtainable by $i = n - 1.$ No? I think so. We're now +with enough tools to work on that previous problem. + +%% For that, we will look at an example to see what kind of last value we +%% end up with. Suppose, for instance, that we are working with an interval +%% [1,2]. Then, the last right endpoint will be 1 + n(2 - 1)/n = 2. So, if +%% we're computing right endpoints, i goes from 1 to n. If we are computing +%% left endpoints, then the last endpoint is 1 + (n - 1)(2 - 1)/n. +%% Therefore, the last midpoint will be the midpoint between the last +%% left endpoint and the last right endpoint. That is, %align by = + +%% r + n(s - r)/n + r + (n - 1)(s - r)/n +%% = 2r + (s - r) + (n - 1)(s - r)/n +%% = 2r + (n(s - r) + (n - 1)(s - r))/n +%% = 2r + ( (s - r)(n + n - 1) )/n +%% = 2r + ( (s - r)(2n - 1) )/n + +\masciiexe{} Estimate $\int_1^2 \sqrt{1 + x^2}\ dx.$ + +{\em Solution.} We will compute a Riemann sum using $10$ rectangles. We +will have a $\Delta x = 1/10.$ By the work we've done above, we will +have the heights as +%v + $$r + \fr{(2i + 1)(s - r)}{2n}$$ +%e +where $r = 1, s = 2,$ and $n = 10.$ Then, we write the Riemann sum as +%v +$$\fr{1}{10} \sum_{i=0}^{9} + \sqrt{1 + \bl(1 + \fr{2i + 1}{20}\br)^2} + \approx 1.81$$ +%e +\exeend + +\masciiexe{} Evaluate $\int_{-1}^5 1 + 3x\ dx.$ + +{\em Solution.} We now want the integral really; but since we don't have +techniques yet, we will compute it as Riemann used to do. By the work we +developed above, and knowing that we're working with $n$ subinterval of +length $6/n,$ our heights will be +%v + $$r + \fr{(2i + 1)(s - r)}{2n},$$ +%e +where $r = -1, s = 5,$ so +%v + $$-1 + \fr{3(2i + 1)}{n},$$ +%e +and then we can compute +%v +$$\lim_{n \to \infty} \fr{6}{n} \sum_{i=1}^n \bl[1 + 3\bl(-1 + \fr{3(2i + 1)}{n}\br)\br] = 42,$$ +%e +Now, if we're suspicious of the formula above for the midpoints, let's +pick the right endpoints which will be the following sequence $-1 + 6/n, +-1 + 2 \cdot 6/n, -1 + 3 \cdot 6/n,$ ..., $-1 + 6i/n.$ So we write +%v +$$\lim_{n \to \infty} \fr{6}{n} \sum_{i=1}^n \bl[1 + 3\bl(-1 + \fr{6i}{n}\br)\br] = 42,$$ +%e +and as a final check, let's carefully compute as %align by = +%v +\begin{align*} +\int_{-1}^5 1 + 3x\ dx &= \lim_{n\to \infty} \fr{6}{n} \sum_{i=1}^n \bl[1 + 3\bl(-1 + \fr{6i}{n}\br)\br]\\ + &= \lim_{n\to \infty} \fr{6}{n} \sum_{i=1}^n \bl[1 - 3 + \fr{18i}{n}\br] \\ + &= \lim_{n\to \infty} \fr{6}{n} \sum_{i=1}^n -2 + \fr{6}{n} \sum_{i=1}^n \fr{18i}{n}\\ + &=\lim_{n\to \infty} \bl(-12 + \fr{60 + 48}{n^2} \sum_{i=1}^n i\br) \\ + &=\lim_{n\to \infty} \bl[-12 + \fr{108}{n^2} \bl(\fr{n(n+1)}{2}\br)\br] \\ + &=\lim_{n\to \infty} \bl[-12 + 108 \bl(\fr{1}{2} + \fr{1}{n}\br)\br] \\ + &=-12 + 54 = 42. +\end{align*} +%e +So perhaps we may now trust the pattern developed above for midpoints. +\exeend + +\masciiexe{} Prove that +%v + $$\int_0^{\pi/4} \sin^3{x}\ dx \leq \int_0^{\pi/4} \sin^2{x}\ dx.$$ +%e +{\em Solution.} We know that $\sin(x) \geq 0$ for all $x$ in +$[0,\pi/4].$ So $\sin^3(x) \geq 0.$ Since $\sin(x) \leq 1$ for all $x$ +real, then $\sin^3(x) \leq 1$ for all $x$ real. So $\sin^3(x) \leq +\sin^2(x)$ for all $x$ in $[0,\pi/4].$ So +%v + $$\int_0^{\pi/4} \sin^3{x}\ dx \leq \int_0^{\pi/4} \sin^2{x}\ dx.$$ +%e +\exeend + +I have to prove that $ab \leq a$ if and only if $0 \leq b \leq 1.$ I +don't know how to prove that right now. + +\masciiexe{} Prove that +%v + $$\int_1^2 \sqrt{5 - x}\ dx \geq \int_1^2 \sqrt{x + 1}\ dx.$$ +%e +{\em Solution.} We must show that $f(x) = \sqrt{5 - x} \geq g(x) = +\sqrt{x + 1}$ for all $x$ in $[1,2].$ We have $f(1) = 2 \geq g(1) = +\sqrt{2}.$ At $x = 2,$ we have $f(2) = \sqrt{3} \geq \sqrt{3} = g(2).$ +Now notice that +%v +$$f'(x)= \fr{-1}{2 \sqrt{5 - x}} \text{ and } g(x) = \fr{1}{2\sqrt{x+1}}.$$ +%e +So $f(x)$ is an always decreasing function, while $g(x)$ is an always +increasing function. This means that if they cross each other, they only +do so once, and we will know that to the left of the crossing point, we +have $f(x) \geq g(x),$ and to the right, we have $f(x) \leq g(x).$ This +interesting point is $x = 3.$ So, $f(x) \leq g(x)$ for all $x$ in +$[1,2].$ \exeend + +\masciiexe{} Prove that +%v + $$2 \leq \int_{-1}^1 \sqrt{1 + x^2}\ dx \leq 2 \sqrt{2}.$$ +%e +{\em Solution.} Let $f(x) = \sqrt{1 + x^2}.$ So $f(-1) = \sqrt{2}.$ +Notice that our domain is $-1 \leq x \leq 0$ union $0 \leq x \leq 1.$ +Start with $0 \leq x \leq 1.$ Square it to get $0 \leq x^2 \leq 1$ which +implies +%v + $$1 \leq x^2 + 1 \leq 2.$$ +%e +Since every term of the inequality above is positive, we may take the +square root of each of them to get +%v + $$1 \leq \sqrt{x^2 + 1} \leq \sqrt{2}.$$ +%e +Now integrate that to get +%v +$$\int_{-1}^21\ dx \leq \int_{-1}^1 \sqrt{x^2 + 1}\ dx + \leq \int_{-1}^1 \sqrt{2}\ dx,$$ +%e +which implies +%v + $$2\leq \int_{-1}^1 \sqrt{x^2 + 1}\ dx \leq 2 \sqrt{2}.$$ +%e +as desired. \exeend + +\masciiexe{} Prove that +%v +$$\fr{\pi}{6} \leq \int_{\pi/6}^{\pi/2} \sin(x)\ dx \leq \fr{\pi}{3}.$$ +%e +{\em Solution.} We'll try constructing the result. The distance that we +will integrate is $\pi/2 - \pi/6 = \pi/3.$ We will work backwards to +find which constants we should integrate. For instance, we need a +constant $m$ such that $m(\pi/2 - \pi/6) = \pi/6;$ so $m = 1/2.$ Also, +we need a constant $M$ such that $M(\pi/2 - \pi/6) = \pi/3;$ so $M = 1.$ +Now, consider the inequality +%v + $$m = 1/2 \leq x \leq 1 = M.$$ +%e +We know that $\sin(\pi/6) = 1/2$ and that $\sin(\pi/2) = 1.$ So it's +true that $1/2 \leq \sin(x) \leq 1$ for all $x$ in $[\pi/6,\pi/2].$ So +we now integrate this inequality above to write %align by \leq +%v +\begin{align*} + \int_{\pi/6}^{\pi/2}\fr{1}{2}\ dx + &\leq \int_{\pi/6}^{\pi/2} \sin(x)\ dx + \leq \int_{\pi/6}^{\pi/2} 1\ dx\\ + \fr{\pi}{6}&\leq \int_{\pi/6}^{\pi/2} \sin(x)\ dx + \leq \fr{\pi}{3}. +\end{align*} +%e +So we have a procedure here. We discovered the constants that would work +by computing $m(u - l) = d,$ where $u$ is the upper limit and l is the +lower limit, and $d$ is the desired constant. We solve for $m,$ and +we're ready to set up the inequality of integrals, and integrate each +term. \exeend + +\masciiexe{} Estimate +%v + $$\int_1^2 \fr{1}{x}\ dx.$$ +%e +{\em Solution.} The method here is to look for the absolute minimum and +maximum. We may use the ``extreme value theorem'' of continuous +functions. Mininum and maximum, respectively, are, $1/2$ and $1.$ So +%v + $$\fr{1}{2} (2 - 1) \leq \int_1^2 \fr{1}{x}\ dx \leq 1 (2 - 1).$$ +%e +\exeend + +\masciiexe{} Estimate +%v + $$\int_0^2 \sqrt{x^3 + 1}\ dx.$$ +%e +{\em Solution.} Minimum and maximum, respectively, are $1$ and $3.$ So +%v + $$2 \leq \int_0^2 \sqrt{x^3 + 1}\ dx \leq 6.$$ +%e +\exeend + +\masciiexe{} Estimate +%v + $$\int_{\pi/4}^{\pi/3} \cos(x)\ dx.$$ +%e +{\em Solution.} We have $\cos(\pi/4) = \sqrt{2}/2,$ and $\cos(\pi/3) = +1/2.$ So +%v + $$\fr{1}{2}\bl(\fr{\pi}{3}- \fr{\pi}{4}\br) \leq + \int_{\pi/4}^{\pi/3} \cos(x)\ dx \leq \fr{1}{2}\bl(\fr{\pi}{3} - + \fr{\pi}{4}\br)$$ +%e +which implies +%v +$$\fr{\pi}{48} \leq \int_{\pi/4}^{\pi/3} \cos(x)\ dx \leq \fr{\pi}{24}.$$ +%e +\exeend + +\masciiexe{} Estimate +%v + $$\int_{\pi/4}^{3\pi/4} \sin^2(x)\ dx.$$ +%e +{\em Solution.} The minimum is $1/2$ at $\pi/4$ and $3\pi/4,$ and the +maximum is $1$ at $\pi/2.$ I'm afraid I need the property +%v +$$\int_{\pi/4}^{3\pi/4}\sin^2{x}\ dx = 2 \int_{\pi/4}^{\pi/2} \sin^2{x}\ dx.$$ +%e +I'm pretty confident that this is true, but I have no formal argument. I +say that the derivative of $\sin^2(x)$ is $2 \sin(x) \cos(x).$ Now I can +prove, using the derivative, that from $\pi/4$ to $\pi/2,$ the function +is increasing, and decreasing from $\pi/2$ to $3\pi/4.$ I can also prove +that in these two intervals, the slope is only different by a sign. That +is, in the same velocity that it goes up, it also goes down on the other +interval. So, the area it covers is the same in both +intervals. Therefore, the property above follows. Now, instead of +estimating the left side of the equation, we estimate the right side. So +we write +%v +$$\fr{1}{4}\bl(\fr{\pi}{2} - \fr{\pi}{4}\br) \leq \int_{\pi/4}^{\pi/2} +\sin^2{x}\ dx \leq 1 \bl(\fr{\pi}{2} - \fr{\pi}{4} \br)$$ +%e +We multiply the inequality by $2$ so that %align by \leq +%v +\begin{align*} + \fr{\pi}{8}&\leq \int_{\pi/4}^{\pi/2} \sin^2{x}\ dx + \int_{\pi/4}^{\pi/2} \sin^2{x}\ dx \leq \fr{\pi}{2} \\ + \fr{\pi}{8}&\leq \int_{\pi/4}^{3\pi/4} \sin^2{x}\ dx \leq \fr{\pi}{2}. +\end{align*} +%e +\exeend + +The idea of looking for absolute minimum and absolute maximum helps +quite a bit, but it will become troublesome as we work with not so well +behaved functions; we may, nevertheless, break the badly behaved +function into as many pieces as necessary and then look for minimum and +maximum in these smaller closed intervals in which the function behaves +somewhat well. So, as we can see, we cannot work with too complicated +functions; only with somewhat bladly behaved ones. + +\masciiexe{} Prove that +%v + $$\int_a^b x\ dx = \fr{b^2 - a^2} {2}.$$ +%e +{\em Solution.} We start with the definition of the integral and $try$ to find +the result. The definition says that %align by = +%v +\begin{align*} + \int_a^bx\ dx &= \lim_{n \to \infty} \sum_{i=1}^n \fr{b-a}{n} \bl[a + \fr{i(b-a)}{n}\br]\\ + &=\lim_{n \to \infty} \fr{b-a}{n} \bl[\sum_{i=1}^n a + \sum_{i=1}^n \fr{i(b-a)}{n}\br]\\ + &=\lim_{n \to \infty} \fr{b-a}{n} \bl[an + \fr{b-a}{n} \fr{n (n+1)}{2} \br]\\ + &=\lim_{n \to \infty} a (b-a) + \lim_{n \to \infty} \bl(\fr{b-a}{n}\br)^2 \fr{n (n+1)}{2}\\ + &=a (b-a) + \lim_{n \to \infty} \fr{(b-a)^2}{2} \bl(1 + \fr{1}{n}\br)\\ + &=a (b-a) + \fr{(b-a)^2}{2}\\ + &=\fr{2a (b-a) + (b-a)^2} {2}\\ + &=\fr{2ab - 2a^2 + b^2 - 2ab + a^2}{2}\\ + &=\fr{- 2a^2 + b^2 + a^2}{2}\\ + &=\fr{b^2 - a^2}{2}. +\end{align*} +%e +\exeend + +\masciiexe{} Prove that +%v + $$\int_1^3 \sqrt{x^4 + 1}\ dx \geq \fr{26}{3}.$$ +%e +{\em Solution.} I need the fact that +%v + $$\int_a^bx^2\ dx = \fr{b^3 - a^3}{3},$$ +%e +to prove the above. Assume so. Now notice that $f(x) = x^2$ has minimum +and maximum, respectively, as $1$ and $9$ in $[1,3].$ Also, we have +$\sqrt{2}$ and $\sqrt{82}$ as a minimum and maximum, respectively, of +$\sqrt{x^4 + 1}.$ So, we know now that +%v +$$\int_1^3\sqrt{x^4 + 1}\ dx \geq \int_1^3 x^2\ dx = \fr{80}{3} \geq \fr{26}{3}.$$ +%e +\exeend + +%% Exercise. Prove that %cm + +%% \int_0^{\pi/2} x sin x\ dx <= \fr{\pi^2}{8}. + +%% Solution. We know that %cm + +%% \int_0^{\pi/2} x^2\ dx = \fr{\pi^3}{24}. + +%% My computer tells me that %cm + +%% \fr{\pi^3}{24} =~ 1.29 \text{ and } \fr{\pi^2}{8} =~ 1.23. + +\masciiexe{} Prove that +%v + $$\int_a^b c f(x)\ dx = c \int_a^b f(x)\ dx,$$ +%e +where $c$ is a constant. + +{\em Solution.} Straightforwadly, we write %align by = +%v +\begin{align*} + \int_a^bc f(x)\ dx &= \lim_{n \to \infty} \sum_{i=1}^n c f(x_i) \Delta x\\ + &=\lim_{n \to \infty} c \sum_{i=1}^n f(x_i) \Delta x\\ + &=c \lim_{n \to \infty} \sum_{i=1}^n f(x_i) \Delta x\\ + &=c \int_a^b f(x)\ dx, +\end{align*} +%e +where $\Delta x = (b -a)/n.$ \exeend + +\masciith{} If $f(x)$ is continuous, then +%v + $$\bl|\int_a^b f(x)\ dx \br| \leq \int_a^b | f(x) |\ dx $$ +%e +\theend + +\masciiproof{} The function $f(x)$ takes values on the interval $[a,b].$ +At each of these values, the function gives us a real number. So we may +use the property of real numbers to say that $-|f(x)| \leq f(x) \leq +|f(x)|$, so we may write %align by \leq +%v +\begin{align*} + \int_a^b- |f(x)|\ dx &\leq \int_a^b f(x)\ dx \leq \int_a^b |f(x)|\ dx. +\end{align*} +%e +Notice now that $f(x)$ can yield negative and positive values, and +$|f(x)|$ only positive values. So we may write +%v + $$\bl|\int_a^bf(x)\ dx \br| \leq \int_a^b |f(x)|\ dx.$$ +%e +In other words, if $f(x) \geq$ for all $x$ in its domain, then we +stricly have an equation; but if $f(x)$ takes a negative value anywhere +in its domain, then we will stricly have an inequality. \profend + +\masciiexe{} Prove that +%v +$$\bl|\int_0^{2\pi} f(x) \sin(2x)\ dx \br| \leq \int_0^{2\pi} |f(x)|\ dx.$$ +%e +{\em Solution.} We now know that +%v +$$\bl|\int_0^{2\pi} f(x) \sin(2x)\ dx \br| \leq \int_0^{2\pi} |f(x) \sin(2x)|\ dx.$$ +%e +Since the integral is definite, it is a real number; so %align by \leq +%v +\begin{align*} +\bl|\int_0^{2\pi} f(x) \sin(2x)\ dx \br| &\leq \int_0^{2\pi} |f(x)| |\sin(2x)|\ dx. +\end{align*} +%e +Now notice that $|\sin(2x)| \leq 1,$ so because of this, it follows that +%v + $$\int_0^{2\pi} |f(x)| |\sin(2x)|\ dx \leq \int_0^{2\pi} |f(x)|\ dx.$$ +%e +We actually haven't proved that $|a| |b| \leq |a|$ when $|b| \leq 1.$ \exeend + +It is interesting to identify Riemann sums as integrals so that we can +easily compute them with the fundamental theorem of calculus. The next +exercise illustrates this. + +\masciiexe{} Compute +%v + $$\lim_{n\to \infty} \sum_{i=1}^n \fr{i^4}{n^5}.$$ +%e +{\em Solution.} In this case here, we may write +%v + $$\lim_{n \to \infty} 1/n \sum_{i=1}^n \fr{i^4}{n^4},$$ +%e +and claim that the interval is from $0$ to $1,$ and the integrand is +$x^4.$ In symbols, +%v + $$\lim_{n \to \infty} 1/n \sum_{i=1}^n \fr{i^4}{n^4} = \int_0^1 x^4\ dx. $$ +%e +\exeend + +As we have mentioned in previous pages, the sample points picked in a +Riemann sum need not be right endpoints, left endpoints, or +midpoints. We may pick whatever points in each subinterval of the +Riemann sum to compute the height of the rectangle --- as long as the +$\Delta x \to 0.$ The next exercise illustrates an unusual choice. + +\masciiexe{} Compute +%v + $$\int_1^2x^{-2}\ dx. $$ +%e +Hint: choose $x_i^*$ to be the geometric mean of $x_{i-1}$ and $x_i.$ +The geometric mean is the function $\sqrt{x_{i-1} x_i}.$ Also, use the +identity +%v + $$\fr{1}{m (m+1)} = \fr{1}{m} - \fr{1}{m+1}.$$ +%e +{\em Solution.} Let $x_i = 1 + i/n.$ This is our first endpoint. It is a right +enpoint. By the hint, we will choose the geometric mean as the sample +points. So let $x_i^* = \sqrt{x_{i-1} x_i}$. So %align by = +%v +\begin{align*} + \int_1^2x^{-2}\ dx &= \lim_{n \to \infty} \fr{1}{n} \sum_{i=1}^n \fr{1}{\sqrt{\bl[\bl(1 + \fr{i-1}{n}\br)\bl(1 + \fr{i}{n}\br)\br]^2}}\\ + &=\lim_{n \to \infty} \fr{1}{n} \sum_{i=1}^n \fr{1} { \bl(1 + \fr{i-1}{n}\br) \bl(1 + \fr{i}{n}\bl) }\\ + &=\lim_{n \to \infty} \fr{1}{n} \sum_{i=1}^n \fr{1} {\bl(\fr{n + i-1}{n}\br) \bl(\fr{n+ i}{n}\br) }\\ + &=\lim_{n \to \infty} \fr{1}{n} \sum_{i=1}^n \fr{n^2} { (n + i-1) (n+ i) }\\ + &=\lim_{n \to \infty} n \sum_{i=1}^n \fr{1} { (n + i-1) (n+ i) }. +\end{align*} +%e +Now let $m = n+i-1$ so that $m + 1 = n + i.$ By the hint, then, we have %align by = +%v +\begin{align*} + \lim_{n\to \infty} n \sum_{i=1}^n \bl( \fr{1} { n + i-1} - \fr{1} {n+ i} \br) + &=\lim_{n \to \infty} n \sum_{i=1}^n \fr{1} { n + i-1} - n \sum_{i=1}^n \fr{1} {n+ i} \\ + &=\lim_{n \to \infty} n \sum_{i=0}^{n-1} \fr{1} { n + i} - n \sum_{i=1}^n \fr{1} {n+ i} \\ + &=\lim_{n \to \infty} n \bl( \fr{1}{n} - \fr{1}{2n} \br)\\ + &=\lim_{n \to \infty} 1 - \lim_{n \to \infty} \fr{1}{2} = \fr{1}{2}. +\end{align*} +%e +\exeend + +\subsection{The fundamental theorem} + +The fundamental theorem of calculus is remarkable. The fundamental +theorem makes two claims, and so we will break it down in two theorems. + +\masciith{} Let $f$ be continuous on $[a,b].$ Define +%v + $$g(x) = \int_a^x f(t)\ dt,$$ +%e +for $a \leq x \leq b.$ Then $g(x)$ is continuous on $[a,b]$ and +differentianble on $(a,b)$ such that $g'(x) = f(x).$ \theend + +\masciiproof{} Let $x$ be in $(a,b).$ Let $x + h$ be in $(a,b)$ with $h +\neq 0.$ Then %align by = +%v +\begin{align*} + g(x+h)- g(x) &= \int_a^{x+h} f(t)\ dt - \int_a^x f(t)\ dt\\ + &=\bl( \int_a^{x} f(t)\ dt + \int_x^{x+h} f(t)\ dt \br) - \int_a^x f(t)\ dt\\ + &=\int_a^{x} f(t)\ dt + - \int_a^x f(t)\ dt + \int_x^{x+h} f(t)\ dt\\ + &=\int_x^{x+h} f(t)\ dt. +\end{align*} +%e +Since h $\neq 0,$ we may multiply this equation by $1/h.$ So +%v + $$\fr{g(x+h)- g(x)}{h} = \fr{1}{h} \int_x^{x+h} f(t)\ dt.$$ +%e +We now consider two cases; one in which $h > 0$ and one in which $h < +0.$ First, let $h > 0.$ Consider now the interval $[x, x + h].$ Since +$f$ is continuous, then by the extreme value theorem, there is a number +$u$ such that $f(u) = m$ is the absolute minimum of $f$ in $[x, x + h].$ +Similarly, there is a number $v$ such that $f(v) = M$ is the absolute +maximum of $f$ in $[x, x + h].$ Therefore, %align by \leq +%v +\begin{align*} + \int_x^{x+h} m\ dt &\leq \int_x^{x+h} f(t)\ dt \leq \int_x^{x+h} M\ dt\\ + mh &\leq \int_x^{x+h} f(t)\ dt \leq Mh\\ + f(u) h &\leq \int_x^{x+h} f(t)\ dt \leq f(v)h. +\end{align*} +%e +Since $h > 0,$ we may write +%v + $$f(u) \leq \fr{1}{h} \int_x^{x+h} f(t)\ dt \leq f(v),$$ +%e +which is the same as +%v + $$f(u) \leq \fr{ g(x + h) - g(x) }{h} \leq f(v).$$ +%e +Now, if we let $h \to 0^+,$ then we will be squeezing the interval +$[x,x+h],$ and so we would expect that eventually $f(u) = f(x),$ and +similarly for $f(v).$ In symbols, +%v + $$\lim_{h \to 0^+} f(u) = \lim_{u \to x^+} f(u) = f(x).$$ +%e +Similarly for $v,$ we have +%v + $$\lim_{h \to 0^+} f(v) = \lim_{v \to x^+} f(v) = f(x).$$ +%e +So we may write %align by \leq +%v +\begin{align*} + \lim_{h\to 0^+} f(u) &\leq \lim_{h\to0^+} \fr{g(x+h) - g(x)}{h} \leq \lim_{h\to0^+} f(v)\\ + f(x)&\leq \lim_{h\to0^+} \fr{g(x+h) - g(x)}{h} \leq f(x). +\end{align*} +%e +Therefore, by the squeeze theorem, we have +%v + $$\lim_{h\to0^+} \fr{g(x+h) - g(x)}{h} = f(x).$$ +%e + +Now let $h < 0,$ and consider the interval $[x + h, x].$ Since $f$ is +continuous, then by the extreme value theorem, there is a number $u$ in +$[x+h,x]$ such that $f(u) = m$ is the absolute minimum of $f$ in +$[x+h,x].$ Similarly, there is a number $v$ in $[x+h,x]$ such that +$f(v)=M$ is the the absolute maximum of f in $[x+h,x].$ So, %align by \leq +%v +\begin{align*} + \int_{x+h}^{x} m\ dt &\leq \int_{x+h}^{x} f(t)\ dt \leq \int_{x+h}^{x} M\ dt\\ + mh &\leq \int_{x+h}^{x} f(t)\ dt \leq Mh\\ + f(u) h &\leq \int_{x+h}^{x} f(t)\ dt \leq f(v)h. +\end{align*} + +Since $h < 0,$ we may write +%v + $$f(u) \geq \fr{1}{h} \int_{x+h}^{x} f(t)\ dt \geq f(v),$$ +%e +which is the same as +%v + $$f(v) \leq \fr{ g(x + h) - g(x) }{h} \leq f(u).$$ +%e +Now, if we let $h \to 0^-,$ then we will be squeezing the interval +$[x+h,x],$ and so we would expect that eventually $f(v) = f(x),$ and +similarly for $f(u).$ In symbols, +%v + $$\lim_{h\to0^-} f(v) = \lim_{v\to x^-} f(v) = f(x).$$ +%e +Similarly for $u,$ we have +%v + $$\lim_{h\to0^-} f(u) = \lim_{u\to x^-} f(u) = f(x).$$ +%e +So we may write %align by \leq +%v +\begin{align*} + \lim_{h\to0^-}f(v) &\leq \lim_{h\to0^-} \fr{ g(x+h)-g(x)} {h} \leq \lim_{h\to0^-}f(u)\\ + f(x)&\leq \lim_{h\to0^-} \fr{ g(x+h)-g(x)} {h} \leq f(x). +\end{align*} +%e +Therefore, by the squeeze theorem, we have +%v + $$\lim_{h\to0^-} \fr{ g(x+h)-g(x)} {h} = f(x).$$ +%e +Together with our previous result, we have +%v + $$\lim_{h\to0} \fr{g(x+h) - g(x)} {h} = f(x),$$ +%e +which shows that $f(x)$ is the derivative of $g(x),$ and therefore +$g(x)$ is differentiable on $(a,b)$ which implies that $g(x)$ is +continuous on $[a,b].$ \profend + +\masciith{} If $f$ is continuous on $[a,b],$ then +%v + $$\int_a^b f(x)\ dx = F(b) - F(a),$$ +%e +where $F$ is any antiderivative of $f;$ that is, $F$ is any function +such that $F'(x) = f(x).$ \theend + +\masciiproof{} Let +%v + $$g(x) = \int_a^x f(t)\ dt.$$ +%e +We know that $g'(x) = f(x).$ That is, $g(x)$ is an antiderivative of +$f(x).$ Suppose that $F(x)$ is any antiderivative of $f(x).$ We have a +theorem which says that any two antiderivatives of a function $f(x)$ +must differ only by a constant. So it is true that %align by = +%v +\begin{align*} + F(x) - g(x) &= c\\ + F(x) &= g(x) + c, +\end{align*} +%e +for $a \leq x \leq b.$ Both $F(x)$ and $g(x)$ are continuous on $[a,b].$ +Since both are continuous, we may write %align by = +%v +\begin{align*} + \lim_{x\to a^+} F(x) &= \lim_{x\to a^+} \bl( g(x) + c\br)\\ + F(a) &= g(a) + c. +\end{align*} +%e +Similarly, as $x \to b^-,$ we have %align by = +%v +\begin{align*} + \lim_{x\to b^-} F(x) &= \lim_{x\to b^-} \bl( g(x) + c \br)\\ + F(b) &= g(b) + c. +\end{align*} +%e +But notice that +%v + $$g(a)= \int_a^a f(t)\ dt = 0 \text{ and } g(b) = \int_a^b f(t)\ dt,$$ +%e +and $g(b)$ describes the area under $f$ from $a$ to $b$ which is what +we're interested in. We then write %align by = +%v +\begin{align*} + F(b) - F(a) &= (g(b) + c) - (g(a) + c)\\ + &= g(b) + c - g(a) - c\\ + &= g(b) + c - c\\ + &= g(b). +\end{align*} +%e +Therefore, +%v + $$F(b) - F(a) = g(b) = \int_a^b f(t)\ dt,$$ +%e +as desired. \profend + +So if we know the antiderivative of a function $f,$ then we can +integrate it easily using the second theorem of the fundamental theorem +of calculus. + +Outside mathematics, this theorem makes a lot of sense. If $v(t)$ is the +velocity of an object and $s(t)$ is its position at a time $t,$ then +$s'(t) =$ $v(t),$ so $s(t)$ is an antiderivative of $v(t).$ If we +integrate $v(t),$ then what we're doing is computing the area under +$v(t)$ which is the distance traveled. If the object moved from a to +$b,$ then $s(b) - s(a)$ is the distance traveled; that is, the integral +of $v(t)$ from $a$ to $b.$ In symbols, +%v + $$\int_a^b v(t)\ dt = s(b) - s(a).$$ +%e + +\masciiexe{} Differentiate +%v + $$h(x)= \int_0^{x^2} \sqrt{1 + r^3}\ dr.$$ +%e +{\em Solution.} Let $u = x^2.$ Since du/dx $= 2x$ an$d$ since +%v + $$\fr{dh}{dx}= \fr{dh}{du} \fr{du}{dx},$$ +%e +we have %align by = +%v +\begin{align*} + h'(x)&= \fr{d}{dx} \int_0^u \sqrt{1 + r^3}\ dr\\ + &= \sqrt{1 + u^3} \fr{du}{dx}\\ + &= 2x \sqrt{1 + x^6}. +\end{align*} +%e +\exeend + +\masciiexe{} Differentiate +%v + $$h(x) = \int_2^{1/x} \sin^4(t)\ dt.$$ +%e +{\em Solution.} Let $u = 1/x.$ Then %align by = +%v +\begin{align*} + h'(x) &= \fr{d}{dx} \int_2^u \sin^4(t)\ dt\\ + &= \sin^4(u) \fr{du}{dx}\\ + &= - \fr{\sin^4(1/x)}{x^2}. +\end{align*} +%e +\exeend + +\masciiexe{} Differentiate +%v + $$y = \int_3^{\sqrt{x}} \fr{\cos t}{t}\ dt.$$ +%e +{\em Solution.} Let $u = \sqrt{x}.$ Then $du/dx = 1/2\sqrt{x}.$ So %align by = +%v +\begin{align*} + y'&=\fr{d}{dx} \int_3^u \fr{\cos t}{t}\ dt\\ + &= \fr{\cos u}{u} \fr{du}{dx}\\ + &= \fr{\cos \sqrt{x}}{2 \sqrt{x} \sqrt{x}}\\ + &= \fr{\cos\sqrt{x}}{2x}. +\end{align*} +%e +\exeend + +\masciiexe{} Convince yourself that +%v + $$\int_{2x}^{3x}f(u)\ du = \int_{2x}^0 f(u)\ du + \int_0^{3x} f(u)\ du.$$ +%e +{\em Solution.} Suppose $x = 1.$ Then we have %align by = +%v +\begin{align*} + \int_{2}^{3}f(u)\ du &= \int_{2}^0 f(u)\ du + \int_0^{3} f(u)\ du\\ + &= - \int_{0}^2 f(u)\ du + \int_0^{3} f(u)\ du, +\end{align*} +%e +which does seem to be true. \exeend + +\masciiexe{} Find a function $f$ and a number $a$ such that +%v + $$6+ \int_a^x \fr{f(t)}{t^2}\ dt = 2 \sqrt{x},$$ +%e +for all $x > 0.$ + +{\em Solution.} The fundamental theorem gives us an easy differentiation +of the integral; so, we differentiate both sides of the equation to get +%align by = +%v +\begin{align*} + \fr{f(x)}{x^2} &= \fr{1}{x^{1/2}}\\ + f(x)&= x^2 \cdot x^{-1/2}\\ + f(x)&= x^{3/2}. +\end{align*} +%e +So this a function that seems to be the correct one. The problem here is +that we also must find $a$ because it is not true in general. How would we +find $a$? We assume we have found it already. Call it $a.$ So there is such +number; it is $a.$ Since it exists, we may compute +%v + $$6+ \int_a^a \fr{f(t)}{t^2}\ dt = 2 \sqrt{a},$$ +%e +and it's easy to do so because we know the integral is zero. So %align by = +%v +\begin{align*} + 6+ 0 &= 2 \sqrt{a}\\ + 3&= \sqrt{a}\\ + 9&= a. +\end{align*} +%e +It turns out that 9 is a unique solution to this problem. \exeend + +\masciiexe{} Suppose $h$ is a function such that $h(1) = -2, h'(1) = 2, +h''(1) = 3, h(2) = 6, h'(2) = 5, h''(2) = 13$ and $h''$ is continuous +everywhere. Evaluate +%v + $$\int_1^2 h''(u) du.$$ +%e +{\em Solution.} We know that +%v + $$\int_1^2 h''(u) du = h'(u) \br|_1^2 = 5 - 3 = 2,$$ +%e +don't we? So, we're done. This problem presents some superfluous +information; possibly to confuse us. \exeend + +\subsection{The substitution theorem} + +\masciith{} If $u = g(x)$ is a differentiable function whose range is an +interval $I$ and $f$ is continuous on $I$, then +%v + $$\int f(g(x)) g'(x) \dx = \int f(u) \du.$$ +%e +\theend + +\masciiproof{} Consider a function $F(g(x)),$ where $F'= f.$ By the +chain rule, we know that the derivative of $F(g(x))$ is $F'(g(x)) g'(x) += f(g(x)) g'(x),$ so if we let $u = g(x),$ then %align by = +%v +\begin{align*} + \int F'(g(x)) g'(x) \dx &= F(g(x)) + c \\ + &=F(u) + c \\ + &=\int F'(u) \du\\ + &=\int f(u) \du, +\end{align*} +%e +as desired.\profend + +%% It is interesting to consider the substitution rule graphically. Let us +%% pick an example. Consider $y = \sqrt{2x+1}$ from $0$ to $1.$ If we want +%% the area in terms of some function of $u,$ we must consider changing +%% three things: $(1)$ the function $y,$ indeed; $(2)$ the limits; $(3)$ +%% the $\dx$ of the integral. One puzzling thing is the change in the +%% $\dx;$ we tend to think of the $\dx$ as a mere piece of notation. + +%% In the definition of the integral, we see that the dx represents the +%% $\Delta x$ of the Riemann sum. The Riemann sum evaluates to a different +%% number if we change the $\Delta x.$ Here, if we change the limits, we +%% change the interval in which we're integrating; so, if you think of a +%% Riemann sum, it's easier to realize that the $\Delta x$ may also change; +%% we might be increasing the width of the $\Delta x$ or decreasing it. + +%% Let us compute the area under $f$ from $0$ to $1.$ Let $f(x) = +%% \sqrt{2x+1}.$ Let $u(x) = 2x + 1.$ So $f(x) = f(u(x)).$ We know that +%% %v +%% $$\int f(u(x)) u'(x) \dx = \int f(u) \du$$ +%% %e +%% by the substitution theorem. So this means that if we want to integrate +%% $f(x)$ with respect to $x,$ we may integrate $f(u(x)) u'(x)$ with +%% respect to $x$ instead, which is the same as integrating $f(u)$ with +%% respect to $u.$ In symbols, %align by = +%% %v +%% \begin{align*} +%% \int_0^1\sqrt(2x+1) \dx &= \int \sqrt{u(x)} u'(x) \dx\\ +%% &= \int_{u(0)}^{u(1)} \sqrt{u} \fr{du}{2}\\ +%% \end{align*} +%% %e +%% This is somewhat puzzling. What's the difference between a variable +%% named $x$ and a variable named $u?$ In general, none. However, here we +%% have a particular case; the context here makes $x$ and $u$ quite +%% different. For instance, as $x$ goes from $1$ to $2, u$ goes from $3$ to +%% $5.$ Clearly, $u$ moves faster than $x.$ They are different axis. They +%% form different planes. This is an example of the ability that +%% mathematics gives us. We mirror one problem on another and we create +%% analogous systems; of course, the analogy must be ideal. + +%% The analogy here is ideal because what we have done is changed the plane +%% where the function $f(x)$ is defined. We moved $f$ from the yx-plane to +%% the yu-plane. When we do that, we have to adjust $x$ to $u.$ In order to +%% keep $f$ as it really is, we have to adjust $x$ to $u$ in the right way; +%% the right way is described the the relationship between $x$ and $u;$ the +%% relationship is that $u = 2x + 1,$ as we defined it. So, the yu-plane is +%% distorted when compared to the yx-plane. The yu-plane is the +%% $y(2x+1)$-plane. + +\subsection{Volumes} + +We define volume as the limit of the sums of the areas of slices of the +solid where each slice has a width of $\Delta x$ and $\Delta x \to 0.$ +That is, +%v +$$V= \lim_{n \to \infty} \sum_{i=1}^n A(x_i^*) \Delta x = \int_a^b A(x) \dx.$$ +%e + +\subsection{Um limite legal} + +Compute +% + $$\lim_{t \to \infty} \frac{\sqrt{t}}{\exp(t)} \exp\left(\int_0^\infty \floor(t \exp(-x)) \dx\right) $$ +% +sabendo que +% + $$t! \approx \sqrt{2\pi t} \left(\frac{t}{e}\right)^t$$ +% +sempre que $t \to \infty$. + +A brincadeira aqui é que esse é um problema que é fácil de compor, mas +difícil de resolver porque não se consegue facilmente desfazer a +convolução que foi feita passo a passo pelo autor do problema. Mesmo +que você conhecesse a aproximação acima, você não pensaria em usá-la +porque ela implícita no problema não de forma aparente. + +\section{Studying functions} + +We're going to look into a series of topics now. We are mostly using +Calculus to study functions. Let's look at inverse functions first. +Then we look into exponential functions and slowly and scatteredly we +will be looking into some interesting functions. + +\subsection{On inverse functions} + +If $f(b) = a,$ then $f^{-1}(a) = b.$ What would $f'(b)$ be? We want to +express $f'(b)$ with respect to $(f^{-1})'.$ For that, we write a +theorem. + +\masciith{} Let $f$ be one-to-one and differentiable with $g = f^{-1}$ +and $f'(g(a)) \neq 0.$ Then $g$ is differentiable at $a$ and +%v + $$g'(x)= \fr{1}{f'(g(x))},$$ +%e +where $g = f^{-1}.$ \theend + +\masciiproof{} Let $y = g(x) = f^{-1}(x).$ Then $f(y) = x.$ Now, %align by = +%v +\begin{align*} + f'(y) y' &= 1\\ + y' &= \fr{1} {f'(y)}\\ + g'(x) &= \fr{1}{f'(g(x))}, +\end{align*} + %e +as desired. \profend + +Now, let us define exponential functions. Exponential functions are +$a^x$ where $a$ is some positive number, usually $a > 1.$ If $a$ is +between $0$ and $1,$ then the function exponentially decays. Exponential +functions are defined for all reals, but then one wonders what $2^\pi$ +means. It means, by definition, +%v + $$a^x = \lim_{r \to x} a^r,$$ +%e +for some rational $r.$ So to answer the question, $2^\pi$ is the limit +of the sequence of numbers $2^3, 2^{3.1}, 2^{3.14},$ and so on. In fact, +this explains why the base of an exponential function cannot be +negative. If it were, then irrational numbers could not be powers of +these bases. If they were, complex numbers would arise. For instance, +consider $(-2)^\pi$; the limit doesn't converge because when $r$ is +$3.1,$ the answer is not real; when $r$ is $3.14,$ the answer is real; +when $r$ is $3.141,$ the answer is not real. It depends on the evenness +or oddness of the last digit of $r.$ So it does not converge to any real +value; so the value is undefined. + +\subsection{The exponential number } + +Here's one way to define $e.$ Consider $2^x$ and $3^x.$ Take the +derivative of them. We get, for $f(x) = 2^x,$ %align by = +%v +\begin{align*} + f'(x)&= \lim_{h \to 0} \fr{2^{x+h} - 2^x}{h}\\ + &=\lim_{h \to 0} \fr{2^x 2^h - 2^x}{h}\\ + &=\lim_{h \to 0} \fr{2^x(2^h - 1)}{h}\\ + &=2^x \lim_{h \to 0} \fr{2^h - 1}{h}. +\end{align*} +%e +For $g(x) = 3^x,$ we have +%v + $$g'(x) = 3^x \lim_{h \to 0} \fr{3^h - 1}{h}.$$ +%e +So the difficulty here is to find the limit that we left above. But +what's the derivative of $2^x$ and $3^x$ at $x = 0?$ It's %align by = +%v +\begin{align*} + f'(0)&= 2^0 \lim_{h \to 0} \fr{2^h - 1}{h}\\ + &= \lim_{h \to 0} \fr{2^h - 1}{h}. +\end{align*} +%e +And for $3^x?$ It's %align by = +%v +\begin{align*} + g'(0)&= 3^0 \lim_{h \to 0} \fr{3^h - 1}{h} \\ + &=\lim_{h \to 0} \fr{3^h - 1}{h}. +\end{align*} +%e +That is, $f'(x) = f'(0) 2^x,$ and $g'(x) = g'(0) 3^x.$ Observe, then, +that the derivative of these exponential functions are themselves times +a constant. What would this constant be? By letting $h \to 0,$ we see +that $f'(0) \approx 0.693$ and $g'(0) \approx 1.09.$ So we wonder if +there is a number $p$ between $2$ and $3$ such that $h(x) = p^x$ has +$h'(0) = 1.$ There is such number; we call it $e.$ That is, $e$ is the +number such that +%v + $$\lim_{h \to 0} \fr{e^h -1}{h} = 1.$$ +%e +Now, consider the exponential function $f(x) = a^x$ where $a = e.$ It +has the remarkable property that $f'(x) = f'(0) a^x. = 1 \cdot a^x = +a^x.$ And, because of this interesting derivative, it also follows that +%v + $$\int e^x\ dx = e^x + c.$$ +%e + +\masciiexe{} Find a root of $f(x) = e^x + x = 0.$ + +{\em Solution.} We'll use Newton's method. We know that $f(0) = 1,$ +and $f(-1) =$ $1/e - 1 < 0.$ So, there's a root between $-1$ and $0.$ +We'll initiate Newton's method with $a = 1/2.$ We may write %align by = +%v +\begin{align*} + f'(a)&= \fr{y - f(a)} {x - a}\\ + (x- a) f'(a) &= y - f(a)\\ + xf'(a) - a f'(a) &= y - f(a)\\ + xf'(a) &= y - f(a) + a f'(a). +\end{align*} +%e +But, we're looking for what $x$ gives $y = 0.$ So we set $y = 0,$ and +solve for $x.$ So +%v + $$x = \fr{a f'(a) - f(a)}{ f'(a) }$$ +%e +After we compute $x$ for $a = 1/2,$ we would feed this value back into +this equation, and again and again. If the value seems to converge, +we jump to the conclusion that we're pretty close to the root. We find +that the value seems to converge to $-0.56714329,$ so we take that as +close enough to the root. \exeend + +\subsection{Logarithmic functions} + +How is $y = \log_a x$ defined? What we want it to mean is $y$ being the +number such that $a^y = x.$ So $y = \log_a x$ is defined as $y = \log_a +x$ if and only if $a^y = x.$ + +What would its domain be? They would be positive real numbers, so zero +is not there. But why not? Let's see: $a^y = 0$ is not satisfied by any +base $a.$ We could try $a = 0$ and $y = 0,$ but $0^0$ is actually +undefined because there seems to be no grounds for the convergence of +this expression. But why not negative numbers? See the section on +exponential and their inverses; the exponential functions do not have +negative range, and so the logarithmic ones don't have negative domain +--- after all, one is the inverse of the other. + +What would its range be? We know that for $\log_a x = y,$ we have a is +positive and $x$ is positive. So what values for $y$ are possible? +Consider $x$ large. Then $y$ must be large too. Probably, then, $y \to +\infty$ as $x \to$ $\infty.$ Now consider $x$ small; for example, $a^y = +0.1.$ Then $y$ will have to be negative so that, for $p = -y,$ + %v + $$\fr{1}{a^p} = 0.1 = \fr{1}{10},$$ +%e +so $a^p = 10.$ Therefore, between $0$ and $1,$ $\log_a x < 0.$ So the +range is $(-\infty, \infty).$ The domain of $a^x$ is all real numbers, +so naturally the range of $\log_a x$ is all real numbers. + +If $a = e,$ then $\log_e x$ is called the natural logarithm function, +and we write $\ln x.$ This function is so used in mathematics that some +authors prefer to write $\log x$ to mean the natural logarithm. Others +prefer to let $\log x$ mean $\log_{10} x$ or $\log_2 x.$ I would prefer +$\log x$ to mean the natural logarithm because to me it is the most +interesting one, and I use it a lot more often then the others. + +I will stick to $\ln x$ because many authors do so, and I actually type +one letter less than I would with $\log x$, so I will let that be my +choice. Now, notice that although we write $\ln x$ instead of $\ln(x)$, +it still is a function, and its inverse is $e^x$; so $\ln e^x = x$. + +We will later define these functions again, in some other way, which +seems to be more interesting, and some facts about these functions will +be clarified. + +\masciith{} For a $\neq 1,$ a $> 0,$ it is true that +%v + $$\log_a x = \fr{\ln x} {\ln a}. $$ +%e +\theend + +\masciiproof{} Writing $\log_a x$ means to say that there is a number +$y$ such that $a^y = x.$ Now take natural logarithm of both sides of +this equation to get %align by = +%v +\begin{align*} + y\ln a &= \ln x\\ + y&= \fr{ \ln x}{ \ln a}, +\end{align*} +%e +as we wanted. \profend + +This proof shows that we can rewrite any logarithmic function in terms +of $\ln x.$ But also, notice that we can rewrite any logarithmic +function in terms of the logarithm of any valid base. A machine, +therefore, needs only to implement an algorithm for one base, and +rewrite all the others in terms of the chosen base. + +A quick note is that we have not shown why it's true that $\ln a^y = y +\ln a.$ Let us do that now; let's prove the theorems of +logarithms. We're going to need the derivative of $\ln x,$ so let's show +it first. + +\masciith{} The derivative of $\ln x$ is $1/x.$ \theend + +\masciiproof{} Let $y = \ln x.$ So %align by = +%v +\begin{align*} + y&= \ln x\\ + e^y&= x\\ + e^yy'&= 1\\ + y'&= \fr{1}{e^y}\\ + &=\fr{1}{e^{\ln x}}\\ + &=\fr{1}{x}. +\end{align*} +\profend + +\subsection{The theorems of logarithms} + +There are three important theorems; the product theorem, the division +theorem and the power theorem. The product theorem lays a foundation for +the other two, so we prove it first. The proof of the first comes out by +considering a function $f(x) = \ln ax.$ We differentiate it and we +obtain a function equal to the $g(x) = \ln x.$ If two functions have the +same derivative, they must differ by a constant. + +This fact is an important theorem of calculus which is a corollary of +Fermat's theorem. Fermat's theorem is proved using another important +theorem: the mean value theorem. The mean value theorem can be +generalized and it was; by Cauchy. Cauchy's generalization is used to +prove another important theorem; l'Hospital's theorem. + +\masciith{} For $x > 0, y > 0,$ it's true that $\ln xy = \ln x + \ln y.$ +\theend + +\masciiproof{} Let $f(x) = \ln yx.$ Notice, however, that $y$ is a real +number and $x$ is a variable. Now differentiate $f$ to get %align by = +%v +\begin{align*} + f'(x)&= \fr{y}{yx}\\ + &= \fr{1}{x} +\end{align*} +%e +So $f$ and $\ln x$ have the same derivative; so $\ln x - \ln yx = c.$ +Now, if the theorem is true, then $c = - \ln y.$ We cannot assume any +value for $y$ because $y$ is an arbitrary constant, but $x$ is variable +and takes all values of the domain of $\ln x.$ Since $x = 1$ is in the +domain, we may consider the equation when $x = 1.$ We get +%v + $$0- \ln y = c,$$ +%e +as expected. Therefore $\ln x - \ln y = \ln yx.$ \profend + +Now we use this result to prove the others. + +\masciith{} For $x > 0$, it's true that $\ln x^y = y \ln x.$ \theend + +\masciiproof{} We have that $x^y = x_1 x_2$ ... $x_y.$ Apply the product +theorem as much as necessary to write $\ln x^y = \ln x_1 \ln x_2 ... \ln +x_y = y \ln x.$ This isn't a formal argument, however. Perhaps we can +simply prove it by induction. + +Consider $\ln x^n,$ where $n$ is a natural number. Show that it works +for $n= 1,$ as it clearly does. Assume it works for some natural $k:$ +$\ln x^k = k \ln x.$ Then notice that %align by = +%v +\begin{align*} + \ln x^{k+1} &= \ln x^k x\\ + &= \ln x^k + \ln x \\ + &= k \ln x + \ln x\\ + &= (k + 1) \ln x. +\end{align*} +%e +Therefore, it's true for all naturals. I guess we can similarly show for +all negative integers, and take the case where $n = 0$ for granted. What +about the rest of the reals, though? \profend + +By the way, do not mistake $\ln (x^y)$ for $(\ln x)^y;$ only the former +has the property above. When I write without parentesis, I mean the +first. + +\masciith{} For $x > 0, y \neq 0,$ it's true that $\ln x/y = \ln x - \ln +y.$ \theend + +\masciiproof{} We know that $\ln x/y = \ln xy^{-1}.$ So %align by = +%v +\begin{align*} + \ln xy^{-1} &= \ln x + \ln y^{-1}\\ + &= \ln x - \ln y, +\end{align*} +%e +as desired. \profend + +\subsection{The prime number theorem} + +Let $\pi(n)$ be the number of primes less or equal to $n.$ So $\pi(15) += 6$ because $2$, $3$, $5$, $7$, $11$, $13$ are the $6$ primes before +$15.$ Also, we find that $\pi(25) = 9,$ and $\pi(100) = 25.$ There is +a theorem, called the Prime Number Theorem, which asserts that +%v + $$\lim_{n \to \infty} \fr{ \pi(n) } { n \ln n } = 1.$$ +%e + +\masciiexe{} Find the inverse of +%v + $$y= \fr{ e^x + 1 } { -e^x + 1 }.$$ +%e +{\em Solution.} Try to group the exponential terms together, and factor +them. %align by = +%v +\begin{align*} + y&= \fr{ e^x + 1 } { -e^x + 1 }\\ + y- y e^x &= e^x + 1\\ + -ye^x - e^x &= 1 - y\\ + e^x(-y - 1) &= 1 - y\\ + e^x&= \fr{ 1 - y} {- y - 1}\\ + x&= \ln \fr{ 1 - y} {-y - 1}\\ + x&= \ln - \fr{ 1 - y} {y + 1}\\ + x&= \ln \fr{ 1 + y} {1 - y}. +\end{align*} +%e +It works. \exeend + +Now, let us look into another technique. Any function $f(x) = +g(x)^{h(x)}$ where $g(x) > 0$ can be analyzed as a power of $e$ because +we can write $g(x)$ as $e^{\ln g(x)}$ so that $f(x) = h(x) e^{\ln +g(x)}.$ This allows us to compute, for instance, +%v + $$\lim_{x \to \infty } x^{ \ln x }.$$ +%e + +To compute, we write %align by = +%v +\begin{align*} + \lim_{x\to \infty } x^{ \ln x } &= \lim_{x \to \infty } e^{\ln x^{ \ln x} }\\ + &= \lim_{x \to \infty } e^{\ln x \ln x}\\ + &= \lim_{x \to \infty } e^{(\ln x)^2}\\ + &= \lim_{x \to \infty } e^{2 \ln x} = \infty. +\end{align*} +%e +We know that $\ln x \to \infty$ as $x \to \infty$ and $e^x \to \infty$ +as $x \to \infty.$ So the limit above goes to $\infty$ too. An +interesting observation is that we did not fallaciously used the +property of logarithms to write the last step. We use a property of +exponents; notice that $(a^x)^y = a^{xy}.$ + +\masciiexe{} Find $f^{(n)}$ if $f(x) = \ln(x - 1).$ + +{\em Solution.} The first derivative is +%v + $$f'(x)= \fr{1} {x - 1}.$$ +%e +The second is +%v + $$f''(x)= - \fr{1}{(x -1)^2}.$$ +%e +The third is +%v + $$f^{(3)}(x)= \fr{2}{(x -1)^3}.$$ +%e +The forth is +%v + $$f^{(4)}(x)= - \fr{6}{(x -1)^4}.$$ +%e +Let us let $n$ stand for the power of the denominator because it matches +it straightforwardly. For the sign of the expression, let $(-1)^{n+1}$ +determine the sign, because it is negative when $n$ is even, and +positive otherwise. So far, then, we have +%v + $$f^{(n)} = \fr{ (-1)^{n+1} k } {(x - 1)^n}.$$ +%e +We have to figure out the term that will replace $k$ more precisely. For +$k,$ we have that it goes as $1, 1, 2, 6, 24,$ ... so we may guess that +they can be expressed as $n!$ with $n = 0, 1, 2,$ ... So we need match +this list with respect to the $n$ as we have already established in the +formula above. For the first derivative, $n = 1,$ and $k = 0!;$ when $n += 2, k = 1!;$ when $n = 3, k = 2!.$ So we jump to the conclusion that +%v + $$f^{(n)} = \fr{ (-1)^{n+1} (n - 1)! } {(x - 1)^n}.$$ +%e +And we're done. \exeend + +\subsection{The general antiderivative of the reciprocal function} + +We know that $\ln x + c$ has $1/x$ as its derivative, but when we +integrate $1/x,$ we may have negative numbers as limits of integration +and $\ln x + c$ is only defined for positive numbers. But it's valid to +ask about the area ``under $1/x$'' on the negative side since $1/x$ is +defined everywhere but at zero. So for limits on the negative side, the +antiderivative $\ln x + c$ will not be helpful. + +Consider $\ln |x| + c.$ To differentiate this function, we consider $x > +0,$ and $x < 0.$ When $x > 0$, $\ln |x| + c = \ln x + c,$ so the +derivative is $1/x.$ When $x < 0,$ then $\ln |x| + c = \ln -x + c,$ so +the derivative is $(-1)/(-x) = 1/x.$ Therefore, +% +\[ \fr{d}{dx} \ln |x| = \begin{cases} + 1/x & \text {if $x > 0$},\\ + 1/x & \text {if $x < 0$}. + \end{cases}\] +% +In other words, the general antiderivative of $1/x$ is $\ln |x| + c.$ + +\subsection{A nice definition of the natural log} + +Some people prefer to define $\ln x$ not as the inverse of exponential +function $e^x,$ but rather as the area under $1/x.$ This definition is +really nice because we can nicely show that it is the inverse of the +exponential function, and it becomes quite apparent how to compute $\ln +x$ for any $x > 0.$ Let us define it then. + +\masciidef{} Define +%v + $$\ln x = \int_1^x \fr{1}{t} \dt,$$ +%e +for all $x > 0.$ \defend + +The derivative of $\ln x$ is trivially obtained by the fundamental +theorem. Let us now consider the inverse function of $\ln x.$ We will +call it $\exp x,$ but it is not to be assumed yet that $\exp x = e^x.$ +We will show so. + +\masciidef{} Define +%v + $$\exp x = y \text{\quad if and only if\quad} \ln y = x. $$ +%e +\defend + +Now, because they are inverse functions, we can write $\exp \ln x = x$ +and $\ln \exp x = x.$ Also, we have identities such as $\exp 0 = 1$ +because $\ln 1 = 0.$ We have $\exp 1 = e$ because $\ln e = 1.$ Now if +$r$ is any rational number, then consider +%v + $$\ln e^r = r \ln e = r.$$ +%e +Therefore, $\exp r = e^r$ because $\ln e^r = r.$ This is how the +exponential function comes to life as the inverse function of $\ln x.$ +We have not considered irrational numbers, however. + +Let $r$ be irrational. Consider $a^r,$ where $a > 0.$ We define +%v + $$a^r = \lim_{x \to r} a^x.$$ +%e +Now consider $\ln e^r.$ Since $r$ is irrational, we have %align by = +%v +\begin{align*} + \ln e^r &= \ln \lim_{x \to r} e^x\\ + &= \lim_{x \to r} \ln e^x\\ + &= \lim_{x \to r} x \ln e\\ + &= \lim_{x \to r} x\\ + &= r. +\end{align*} +%e +But notice that we had trouble proving that the power theorem of +logarithms works for all real numbers. Here we're assuming so. We +assumed that $\ln x$ is continuous when we pulled the limit out from the +$\ln x$ function. + +\subsection{All other exponential functions} + +Let us now define all the other exponential functions; we will define +them in terms of the exponential function $e^x.$ + +\masciidef{} Let $m > 0.$ Define +%v + $$m^x = e^{ \ln a^x } = e^{ x \ln a },$$ +%e +for all $x.$ \defend + +This definition makes some proofs easy to be written. The trouble here +is to trust that this definition makes sense. For instance, how do we +know that $2^2 = e^{2 \ln 2}$? + +\masciith{} Let $m$ be a real number. Then $m^{x+y} = m^x m^y.$ \theend +\masciiproof{} Apply the definition above in %align by = +%v +\begin{align*} + m^{x+y}&= e^{ \ln m^{x+y} }\\ + &= e^{ (x+y) \ln m }\\ + &= e^{ x \ln m + y \ln m}\\ + &= e^{ x \ln m } e^{y \ln m}\\ + &= m^x m^y, +\end{align*} +%e +as desired. \profend + +\subsection{The inverse trigonometric functions} + +Now we will use the knowledge acquired so far to look at new functions, +their properties and possibly some applications of them. For instance, +we will begin to finding the derivative of the inverse trigonometric +functions. + +Let $y = \arcsin x,$ so $\sin y = x.$ The domain of $\arcsin x$ is $[-1, +1],$ and the range of $\arcsin x$ is $-\pi/2 \leq y \leq \pi/2.$ +Implicitly, we differentiate it to get %align by = +%v +\begin{align*} + \cos y y'&= 1\\ + y'&=\fr{1}{\cos y}. +\end{align*} +%e + +With the range above, we have that $\cos y \geq 0.$ We know that $\cos^2 +y + \sin^2 y = 1$, so $\cos^2 y = 1 - \sin^2 y,$ so $\cos y =$ +$\sqrt{1-\sin^2 y}.$ But notice that $\sin y = x,$ so $\sin^2 y =$ +$x^2.$ Therefore, $\cos y = \sqrt{1 - x^2}$. So +%v + $$y'= \fr{1}{\sqrt{1 - x^2}}.$$ +%e +We perform the same strategy for $\arccos x.$ The function $\cos x$ is +one-to-one from $0$ to $\pi.$ So the domain of $\arccos x$ is $[-1,1];$ +the range is $[0, \pi].$ Let y = $\arccos x,$ so $\cos y = x.$ Then %align by = +%v +\begin{align*} + -\sin y y'&= 1\\ + y'&= - \fr{1}{\sin y}. +\end{align*} +%e +Since $\sin y = \sqrt{1 - \cos^2 y}$ and $\cos^2 y = x^2,$ we have +%v + $$y' = - \fr{1}{\sqrt{1-x^2}}.$$ +%e +Let us now look into the inverse tangent function. We have to restrict +$\arctan x$ on $(-\pi/2, \pi/2)$ because we need an one-to-one +function. The domain for $\arctan x$ is $(-\infty, \infty)$ and range is +$(-\pi/2, \pi/2).$ To find its derivative, we write %align by = +%v +\begin{align*} + \arctan x &= y\\ + x &= \tan y. +\end{align*} +%e +Now differentiate with respect to $x.$ We get %align by = +%v +\begin{align*} + 1&= \sec^2 y y'\\ + y'&= \fr{1}{\sec^2 y}. +\end{align*} +%e +We wish now to express $\sec^2 y$ in terms of $x.$ Notice that $\sec^2 y += \tan^2 y + 1.$ Since $x = \tan y,$ then $\sec^2 y = x^2 + 1.$ +Therefore +%v + $$y'= \fr{1}{x^2 + 1},$$ +%e +and we're done. + +Now we know a few antiderivatives. For instance, +%v + $$\int \fr{1}{\sqrt{1-x^2}} \dx = \arcsin x + c,$$ +%e +and +%v + $$\int - \fr{1}{\sqrt{1-x^2}} \dx = \arccos x + c,$$ +%e +and +%v + $$\int \fr{1}{x^2 + 1} \dx = \arctan x + c.$$ +%e +Notice that sometimes we have integrands similar, though not exactly one +of the above; but it's a matter of algebraically working it out for that +to be so. For example, %align by = +%v +\begin{align*} + \int\fr{1}{x^2 + a^2} \dx &= \int \fr{\dx}{a^2 \bl(\fr{x^2}{a^2} + 1\br)}\\ + &=\fr{1}{a^2} \int \fr{\dx}{ \bl(\fr{x}{a}\br)^2 + 1}. +\end{align*} +%e +Now let $u = x/a,$ so $\dx = a \du.$ Then %align by = +%v +\begin{align*} + \fr{1}{a}\int \fr{\du}{u^2 + 1} &= \fr{1}{a} \arctan u + c\\ + &=\fr{1}{a} \arctan \fr{x}{a} + c. +\end{align*} +%e +A similar work can be done for all other inverse trigonometric +functions. + +\masciiexe{} Evaluate +%v + $$\int \fr{x \dx}{x^4 + 9}.$$ +%e +{\em Solution.} First, factor the number $9$ from the denominator. We get +%v + $$\fr{1}{9} \int \fr{x \dx}{ \bl( \fr{x^4}{9} + 1\br)}.$$ +%e +Now let $u = (x^2)/3$, so that $\dx = (3/2x) du.$ Then we write %align by = +%v +\begin{align*} + \fr{1}{9}\fr{3}{2} \int \fr{\du}{ u^2 + 1} &= \fr{1}{6} \arctan u + c\\ + &=\fr{1}{6} \arctan \fr{x^2}{3} + c, +\end{align*} +%e +as desired. \exeend + +\masciiexe{} Simplify $\cos (\arctan x).$ + +{\em Solution.} Let $y = \arctan x$ so that $\tan y = x.$ If $\tan y = +x,$ then thinking of a right triangle, we have an angle $y$ and $y$'s +opposite side has length $x$, while $y$'s adjacent side has length $1.$ +Therefore, the hypothenuse has length $\sqrt{1 + x^2}$, and $\cos y = +1/\sqrt{1 + x^2}.$ So +%v + $$\cos(\arctan x) = \fr{1}{\sqrt{1 + x^2}}$$ +%e +is simplified as desired. \exeend + +\masciiexe{} Prove that $\arctan x + \arccot x = \pi/2.$ + +{\em Solution.} Let $f(x) = \arctan x + \arccot x.$ Notice that +%v + $$f'(x) = \fr{1}{x^2 + 1} - \fr{1}{x^2 + 1} = 0.$$ +%e +This means that $\arctan x$ has the same derivative as $\arccot x.$ +Therefore, they must differ by a constant. That is, $f(x) = c,$ for all +$x.$ Notice that +%v + $$\arctan 1 + \arccot 1 = \fr{\pi}{4} + \fr{\pi}{4} = \fr{\pi}{2}.$$ +%e +So $f(x) = \arctan x + \arccot x = \pi/2.$ \exeend + +\masciiexe{} Find $\arcsin \sqrt{3}/2.$ + +{\em Solution.} We know that $\sin \pi/3 = \sqrt{3}/2,$ so $\arcsin +\sqrt{3}/2 = \pi/3.$ \exeend + +\masciiexe{} Draw the following diagram: mark a point $A$ and draw a +straight line to the right up to a point $P;$ continue the straight line +up to a point $B.$ From $B$ draw a perpendicular line going up to a +point $Q.$ From $Q$ draw a line that meets the point $P.$ This procedure +creates a right triangle where the angle $PBQ$ is a right angle. Now, +from $A$, draw a perpendicular line going up to a point $R.$ From $R$ +draw a line that meets the point $P;$ so now that we have two right +triangles where $P$ is a point that they have in common. Now, let $AB = +3$ units. Let $RA = 5$ units, and let $QB = 2$ units. Let the angle +$RPA$ be called $\gamma$ and let the angle $QPB$ be called $\alpha.$ +There's an angle $\beta$ such that $\beta = \pi/2 - (\gamma + \alpha).$ +Assuming we can move the point $P$ between $A$ and $B$ adjusting the +size of the hypothenuses of the triangles, how far from $A$ should we +position $P$ as to maximize the angle $\beta?$ + +{\em Solution.} Let $PB = x$ so that $AP = 3 - x.$ So RP = $\sqrt{25 + +(3-x)^2},$ and PQ = $\sqrt{4 + x^2}.$ Now, we need to express $\beta$ +with respect to $x.$ So, naturally we will use trigonometric functions; +but the ones that express angles are the inverse trigonometric ones, so +we must find out which ones will give us a simple enough +expression. Also, notice that $\beta$ is maximized, when the sum $\gamma ++ \alpha$ is minimized, so we may attack the problem either way; I +choose the latter; I'm going to minimize the sum $\gamma + \alpha.$ + +Notice that %align by = +%v +\begin{align*} + \tan\gamma &= \fr{5}{3 - x}\\ + \tan\alpha &= \fr{2}{x}. +\end{align*} +%e +So, it's certainly true that %align by = +%v +\begin{align*} + \gamma&= \arctan \fr{5}{3 - x}\\ + \alpha&= \arctan \fr{2}{x}. +\end{align*} +%e +Therefore +%v + $$\gamma+ \alpha = \arctan \fr{5}{3 - x} + \arctan \fr{2}{x}.$$ +%e +Now the work is to differentiate this function, and find its local +minimums, and identify which one is the one we are looking for. Notice +that because $AB = 3$ units, $P$ can only range from $A$ to $B;$ that +is, the value of $x$ ranges from 0 to 3. In fact, I can see that the +value where $\beta$ is maximized lies between 2 and 3. It might even be +$x = 2.5$ --- so $P$ is closer to $B$ than to $A.$ That's what I have to +say; I don't want to compute the value. + +We could have used any of the inverse trigonometric functions, but I +believe that $\arctan x$ would give us the simplest case; I initially +tried $\arcsin x$ and I found very complicated derivatives for us to +manually look for roots, so I tried $\arctan x$ instead and it became +simple enough --- though I didn't want to find its roots anyway. \exeend + +\subsection{The hyperbolic functions} + +The hyperbolic functions have nothing to do with trigonometric +functions, but they have very similar properties. Let begin with their +definitions. Define +%v + $$\sinh x = \fr{e^x - e^{-x}}{2}$$ +%e +as the hyperbolic sine function. Define +%v + $$\cosh x = \fr{e^x + e^{-x}}{2}$$ +%e +as the hyperbolic cosine. Now, like the trigonometric functions, we +define $\csch x = 1/\sinh x,$ $\sech x = 1/\cosh x,$ $\tanh x = \sinh x / +\cosh x,$ and finally $\coth x = \cosh x / \sinh x.$ + +Notice that $\cosh x$ is the average of the functions $e^x$ and +$e^{-x},$ and $\sinh x$ is half of the difference between them. These +functions are pretty popular in scientic contexts; they are used to +describe some important phenomena. For instance, the effect of gravity +on a wire hanging on posts --- such as eletricity posts --- on the +streets is described by +%v + $$y= c + d \cosh \fr{x}{d},$$ +%e +where $c$ and $d$ are constants. By the way, when a wire hangs between +two posts, the the system satisfies the differential equation +%v + $$\sdiff= \fr{pq}{T} \sqrt{1 + \bl(\fdiff\br)^2},$$ +%e +where $p$ is the linear density of the wire, $g$ is the acceleration due +to gravity and $T$ is the tension in the cable, at its lowest point. A +solution to this equation is the function +%v + $$y = \fr{T}{pg} \cosh \fr{pgx}{T}.$$ +%e +I think that linear density is a term used to describe the density of +objects that have a shape that we may consider one dimensional. No +objects that we know in the world are one dimensional, of course, but a +wire can be considered one dimensional, so the density of a wire is a +measure of mass per unit length, and we call it linear density. + +These hyperbolic functions satisfy some identies which look very much +like the trigonometric functions --- though not always they are too +similar. For instance, while $\cos^2 x + \sin^2 x = 1,$ we have $\cosh^2 +x - \sinh^2 x = 1.$ + +Let us now define the inverse of the $\sinh x$ function, and then find +its derivative. To define it, let $y = \arcsinh x$ so that $\sinh y = +x.$ Then %align by = +%v +\begin{align*} + x&= \sinh y \\ + &= \fr{e^y - e^{-y}}{2}\\ + 2x&= e^y - e^{-y}\\ + e^y- e^{-y} - 2x &= 0. +\end{align*} +%e +Multiply this equation by $e^y$ to get %align by = +%v +\begin{align*} + (e^y)^2- e^y e^{-y} - 2xe^y &= 0\\ + (e^y)^2- 2xe^y - 1&= 0. +\end{align*} +%e +Now let $p = e^y,$ and notice that we have a quadratic equation, whose +solution is $p = x \pm \sqrt{x^2 + 1}.$ But since $e^y > 0$ for all $y,$ +and since $x < \sqrt{x^2 + 1}$ for all $x,$ we need not consider the +solution $p = x - \sqrt{x^2 + 1}.$ Therefore %align by = +%v +\begin{align*} + e^y&= x + \sqrt{x^2 + 1}\\ + y&= \ln (x + \sqrt{x^2 + 1})\\ + &= \arcsinh x. +\end{align*} +%e +The inverse hyperbolic cosine can be defined in a similar manner. Their +derivatives are easily obtained by using the chain rule. + +\subsection{The theorem of l'Hospital} + +L'Hospital's theorem is a pretty interesting one. Before we state it, +let us consider something. Suppose that $f'$ and $g'$ are continuous +everywhere. Then let us consider the expression +%v + $$\lim_{x \to c} \fr{ f'(x) } {g'(x) }.$$ +%e +Since they are both continuous, we use the theorem of limits of +continuous function to write that +%v + $$\lim_{x \to c} \fr{ f'(x) } {g'(x) } = \fr{f'(c)}{g'(c)}.$$ +%e +Now, let us write the equation in terms of the definition of +derivatives, and algebraically manipulate it. We write %align by = +%v +\begin{align*} + \lim_{x \to c} \fr{ f'(x) } {g'(x) } &= \fr{f'(c)}{g'(c)}\\ + &=\fr{\lim_{x \to c} \fr{f(x)-f(c)}{x-c}} {\lim_{x \to c} \fr{g(x)-g(c)}{x-c}}\\ + &=\lim_{x \to c} \fr{\fr{f(x)-f(c)}{x-c}} {\fr{g(x)-g(c)}{x-c}}\\ + &=\lim_{x \to c} \fr{f(x)-f(c)} {g(x)-g(c)}. +\end{align*} +%e +Now, suppose that $f(c) = g(c) = 0.$ Then %align by = +%v +\begin{align*} + \lim_{x \to c} \fr{f(x)-f(c)} {g(x)-g(c)} &= \lim_{x \to c} \fr{f(x)} {g(x)}. +\end{align*} +%e +Let us look back now. We supposed $f'$ and $g'$ are continuous, and that +$f(c) = g(c) = 0;$ this last supposition means that $f' \to 0$ as $x \to +c;$ similarly for $g';$ that is, $g' \to 0$ as $x \to c.$ And, we +concluded that +%v + $$\lim_{x \to c} \fr{f(x)}{g(x)} = \lim_{x \to c} \fr{f'(x)}{g'(x)}.$$ +%e +In other words, the limit of the ratio of two functions is equal to the +limit of the ratio of their derivatives, provided that the derivatives +are continuous over the interval where $c$ is, and provided that the +derivatives approach zero as $x$ approaches $c.$ + +This is sort of what l'Hospital's theorem is about. We have proved a +particular case of l'Hospital's theorem. The theorem is more general +than this: it applies to the case when the derivatives approach +infinity too. It is harder to prove l'Hospital's theorem more +generally, so I'm going to leave it at this for now. + +Using algebra, the theorem of l'Hospital can be used to evaluate +limits of other indeterminated forms such as $0 \cdot \infty, \infty - +\infty, 0^0,$ $\infty^0,$ and $1^\infty.$ The products, subtractions +and divisions can be treated by plain algebra, and the powers can be +treated by logarithms. + +\subsection{A função exponencial com a hipérbole no expoente} + +Qual é o gráfico de $e^{1/x}$? No lado positivo, quando $x \in (0, +1]$, a função desce do infinito até chegar a $f(1) = e$ porque um $x$ + muito pequeno produz um exponente grande pra função exponencial. + Então perto de zero, a função tem altíssimos valores. Afastando-se + de zero e chegando a $x=1$, a função chega a $y = e$ exatamente. + Dali pra direita, o expoente decai a zero, o que faz com que $y$ se + aproxime de $1$. Então $y=1$ é uma assíntota horizontal. + +No lado negativo, quando $x \in [-1, 0)$, o expoente vai de $-1$ a + números altíssimos de magnitude, mas negativos. Qual é o efeito de + um expoente negativo de grande magnitude? O efeito é $1/e^M$, sendo + $M$ grande e positivo. Logo o efeito é levar a função a zero. Já + quando $x \to -\infty$, o expoente tende a zero, fazendo com que a + função tenda a 1. Então no lado negativo, a função parte de $y=0$ e + tende a $y=1$ no sentido negativo. + +\section{Sequências e séries} + +Sequências e séries são importantes em Cálculo porque elas servem como +os fundamentos da teoria. Quão bom são esses fundamentos é algo +questionável e investigável, mas não faremos isso aqui. Estamos +apenas interessados na análise por enquanto. + +A primeira com que se começar é a série geométrica. A série +geométrica é também chamada de progressão geométrica. Por exemplo, se +começamos uma sequência com 1 e tomamos metades em sequência, obtemos +$1, 1/2, 1/4, 1/8$, ..., $1/2^n$, sendo que o índice inicial é $n = +0$. Seja $r$ a razão da sequência. Então a série gerada por essa +sequência é +% +$$S = 1 + r + r^2 + \cdots + r^i + \cdots.$$ +% +Qual é a soma dessa série? Compute +% +$$rS = r + r^2 + r^3 + \cdots + r^i + \cdots$$ +% +e então compute $S - rS = 1$. Logo, obtemos a soma por computar +% + $$S(1 - r) = 1 \implies S = \frac{1}{1 - r},$$ +% +que converge se e somente $|r| < 1$. Nesse exemplo, o primeiro termo +é $1$, mas a série inteira poderia ter um fator $a$ em cada termo, +quando obteríamos +% + $$\sum_{i=0}^\infty ar^i = a + ar + ar^2 + \cdots + ar^i + \cdots$$ +% +Usando o mesmo raciocínio acima, obtemos a soma +% + $$S = \frac{a}{1 - r}.$$ +% +Agora note que essas são séries infinitas. Se truncarmos essa série +tal que obtenhamos, por exemplo, +% + $$\sum_{i=0}^n ar^i = a + ar + ar^2 + \cdots + ar^n,$$ +% +então temos uma situação nova em que só aparecem $n + 1$ termos aí. +Qual é a soma dessa série finita? O mesmo raciocínio procede, mas o +resultado é diferente. Obtemos +% + $$S = \frac{a(1 - r^{n+1})}{1 - r} = \frac{a}{1-r} - \frac{ar^{n+1}}{1 - r}.$$ +% +É claro que se agora permitirmos que $n \to \infty$, obtemos o +resultado anterior. Então fica a observação de que o caso finito é um +e o infinito, outro. + +A série geométrica serve como primeiro exemplo de uma série +convergente. Vejamos agora uma primeira série divergente, que é a +série harmônica 1 + 1/2 + 1/3 + 1/4 + ... Por que essa linda série +diverge? Porque é possível compará-la a uma outra série que +claramente diverge---uma série com infinitas metades. Veja---é óbvio +que $1 + 1/2 + 1/2 + 1/2 + \cdots$ diverge. Agora, note na harmônica +que $1/3 + 1/4 > 1/4 + 1/4 = 1/2$. Note que $1/5 + 1/6 + 1/7 + 1/8 > +4 \cdot 1/8 = 1/2$. Reconheça que é possível continuar a agrupar os +termos em metades eternamente. Portanto, a harmônica diverge. + +Agora que temos uma convergente e uma divergente, podemos usá-las como +base de comparação para outras. Uma série muito famosa de Euler é +% + $$\sum_{i=1}^\infty \frac{1}{i^2} = \frac{\pi^2}{6}.$$ +% +Loucura, não? A intuição de Euler aí foi brilhante, mas a gente +retorna eventualmente pra contar o que ele fez. Pro momento, só +queremos deduzir que a série converge---não importa pra onde. + +Por que ela converge? Usaremos uma série geométrica. Ignore o $1 + +1/2^2$ por agora. Observe que $1/3^2 + 1/4^2 > 2 \cdot 1/4^2$. Okay. +Observe também que $1/5^2 + 1/6^2 + 1/7^2 + 1/8^2 > 4 \cdot 1/8^2$. +Vê a estratégia? Conseguimos comparar a de Euler com a série +geométrica $1 + 1/4 + 1/8 + 1/16 + \cdots + 1/2^i + \cdots$, que já +sabemos convergir pra $2 = 1/(1 - 1/2)$. Portanto, a de Euler +converge e converge mais rápido que essa geométrica. + +O mesmo argumento pode ser aplicado de uma forma levemente diferente, +ilustrando que podemos tomar mais de um ponto de vista. Em vez da +estratégia acima, considere a seguinte. Note que $1/2^2 + 1/3^2 < 2 +\cdot 1/2^2 = 1/2$. Note também que $1/4^2 + 1/5^2 + 1/6^2 + 1/7^2 < +4 1/4^2 = 1/4$. Obtemos a mesma série geométrica de razão $1/2$, mas +de um jeito levamente diferente---e também mais claro. + +\begin{exercise} O que podemos concluir sobre +% + $$\sum_{i=2}^\infty \frac{1}{i^2 - 1}?$$ +% +Primeiro note que ela é muito parecida com a de Euler. Se a de Euler +converge, seria dramático se essa não convergisse: no infinito, não +$i^2$ e $i^2 - 1$ são praticamente a mesma coisa. Mas não é assim que +se argumenta. Primeiro observe que a série começa em $i=2$. +Compare-a com a de Euler a partir de $i=2$ com a série +% + $$\sum_{i=2}^\infty \frac{1}{(i - 1)^2} = 1 + 1/4 + 1/9 + \cdots.$$ +% +Já sabemos que a de Euler converge com início em $i=1$ e portanto +converge com início em $i=2$. Isso nos dá +% + $$\sum_{i=2}^\infty \frac{1}{i^2} < \sum_{i=2}^\infty \frac{1}{(i - 1)^2}$$ +% +A pergunta é---a da direita converge? Claro: ela é idêntica a de +Euler exceto que ela tem um termo a mais, que é o termo 1. Portanto, +ela converge. + +Agora note que a nossa série de interesse pode ser comparada a essa da +direita, garantindo que ela converge também. É óbvio que $i^2 - 1 < +i^2$. Agora precisamos perceber que $(i - 1)^2 < i^2 - 1$. Note que +$i=1$ nem nos interessa. Quando $i=2$, obtemos $1 < 3$. Quando $i = +3$, obtemos $4 < 8$. É óbvio que a desigualdade é verdadeira. + +Agora, é possível manipular a série de interesse e obter o limite +dela. Note que $i^2 - 1 = (i + 1)(i - 1)$, que é o denominador da +série de interesse. Agora experimente calcular +% + $$\frac{1}{i - 1} -\frac{1}{i + 1} = \frac{i + 1 - (i - 1)}{i^2 - 1} = \frac{2}{i^2 - 1}.$$ +% +Aparece um $2$ no numerador. Multiplique a série por $1/2$ e obtenha +% + $$\sum_{i=2}^n \frac{1}{i^2 - 1} = \frac{1}{2} \sum_{i=2}^n \left( \frac{1}{i - 1} - \frac{1}{i + 1}\right).$$ +% +Se você expandi-la, você obtém +% + $$1/2 - \cancel{1/6} + 1/4 - \cancel{1/8} + \cancel{1/6} - 1/10 + \cancel{1/8} - 1/12 + \cdots$$ +% +Na aproximação acima, estamos com o erro $-(1/10 + 1/12)$, mas esse +erro tende a zero: quando chegarmos a $i=6$, obteremos um termo $1/10$ +que cancelerá o $- 1/10$. Quando chegarmos a $i=7$, obteremos o termo +$1/12$ que cancelerá o $-1/12$. Certo---novos erros aparecerão, que +serão eventualmente cancelados por $i$ maiores. Os termos que sobram +são $1/2 + 1/4 = 3/4$, que é a soma da série. + +Então uma estratégia interessante é procurar substituir uma série por +uma expressão equivalente que seja telescópica. +\end{exercise} + +\subsection{Método de Newton e raízes quadradas} + +Use o método de Newton. Por exemplo, se você quer uma sequência que +convirja pra $\sqrt{2}$, então construa o polinômio $x^2 - 2 = 0$ e +agora use o método de Newton pra solucionar o polinômio. Obtemos +% +\begin{align*} +a_{n + 1} = a_n - \frac{f(a_n)}{f'(a_n)} + = a_n - \frac{a_n^2 - 2}{2a_n} + = \frac{2a_n^2 - a_n^2 + 2}{2 a_n} + = \frac{a_n^2}{2a_n} + \frac{2}{2a_n} + = \frac{1}{2}\left(a_n + \frac{2}{a_n}\right). +\end{align*} +% +Experimente. Seja $a_0 = 3$, por exemplo. Então $a_1 \approx +1.8333$, $a_2 \approx 1.4621$, $a_3 \approx 1.4149$, $a_4 \approx +1.4142$. + +E quanto a $e$? Você precisa encontrar uma equação que defina o +número implicitamente. Por exemplo, $\ln x = 1$. Então o método de +Newton nos dá a sequência +% + $$a_{n + 1} = a_n - \frac{f(a_n)}{f'(a_n)} = a_n(2 - \ln a_n)$$ +% +e daí obtemos $a_0 = 3$, $a_1 \approx 2.7041$, $a_2 \approx 2.7182$, +obtendo uma precisão de pelo menos quatro casas decimais. + +\subsection{} + +\newpage \tableofcontents +\newpage \printbibliography + +\end{document} diff --git a/ilustrations/hyperbola-tangent-triangle.ggb b/ilustrations/hyperbola-tangent-triangle.ggb new file mode 100755 index 0000000..1042848 Binary files /dev/null and b/ilustrations/hyperbola-tangent-triangle.ggb differ diff --git a/ilustrations/perpendicular-tangents-to-x2.ggb b/ilustrations/perpendicular-tangents-to-x2.ggb new file mode 100755 index 0000000..b05e304 Binary files /dev/null and b/ilustrations/perpendicular-tangents-to-x2.ggb differ diff --git a/ilustrations/the-rate-of-fall-of-intercept-hyperbole.ggb b/ilustrations/the-rate-of-fall-of-intercept-hyperbole.ggb new file mode 100755 index 0000000..56e8a07 Binary files /dev/null and b/ilustrations/the-rate-of-fall-of-intercept-hyperbole.ggb differ diff --git a/ilustrations/triangle-x3+7.ggb b/ilustrations/triangle-x3+7.ggb new file mode 100755 index 0000000..0140185 Binary files /dev/null and b/ilustrations/triangle-x3+7.ggb differ diff --git a/images/hyperbole-triangle-constant-area - Copy.pdf b/images/hyperbole-triangle-constant-area - Copy.pdf new file mode 100755 index 0000000..ddb9b74 Binary files /dev/null and b/images/hyperbole-triangle-constant-area - Copy.pdf differ diff --git a/images/hyperbole-triangle-constant-area.pdf b/images/hyperbole-triangle-constant-area.pdf new file mode 100755 index 0000000..ddb9b74 Binary files /dev/null and b/images/hyperbole-triangle-constant-area.pdf differ diff --git a/images/tangent-intercepts-vertical-axis.pdf b/images/tangent-intercepts-vertical-axis.pdf new file mode 100755 index 0000000..62074c4 Binary files /dev/null and b/images/tangent-intercepts-vertical-axis.pdf differ diff --git a/images/triangle-x3+7.pdf b/images/triangle-x3+7.pdf new file mode 100755 index 0000000..54c0678 Binary files /dev/null and b/images/triangle-x3+7.pdf differ diff --git a/images/x2-perpendicular-tangents.pdf b/images/x2-perpendicular-tangents.pdf new file mode 100755 index 0000000..1e981b9 Binary files /dev/null and b/images/x2-perpendicular-tangents.pdf differ diff --git a/images/x2-perpendicular-tangentsxxx.pdf b/images/x2-perpendicular-tangentsxxx.pdf new file mode 100755 index 0000000..1e981b9 Binary files /dev/null and b/images/x2-perpendicular-tangentsxxx.pdf differ diff --git a/lectures/1-over-x-1.pdf b/lectures/1-over-x-1.pdf new file mode 100755 index 0000000..0da6804 Binary files /dev/null and b/lectures/1-over-x-1.pdf differ diff --git a/lectures/1-over-x2.pdf b/lectures/1-over-x2.pdf new file mode 100755 index 0000000..b911268 Binary files /dev/null and b/lectures/1-over-x2.pdf differ diff --git a/lectures/3n+40.pdf b/lectures/3n+40.pdf new file mode 100755 index 0000000..0c7ce96 Binary files /dev/null and b/lectures/3n+40.pdf differ diff --git a/lectures/aula3.1-f.pdf b/lectures/aula3.1-f.pdf new file mode 100755 index 0000000..98f8ba7 Binary files /dev/null and b/lectures/aula3.1-f.pdf differ diff --git a/lectures/aula3.1-g.pdf b/lectures/aula3.1-g.pdf new file mode 100755 index 0000000..984ee92 Binary files /dev/null and b/lectures/aula3.1-g.pdf differ diff --git a/lectures/aula3.1-h.pdf b/lectures/aula3.1-h.pdf new file mode 100755 index 0000000..1286122 Binary files /dev/null and b/lectures/aula3.1-h.pdf differ diff --git a/lectures/aula3.1-s.pdf b/lectures/aula3.1-s.pdf new file mode 100755 index 0000000..68ced8c Binary files /dev/null and b/lectures/aula3.1-s.pdf differ diff --git a/lectures/aula3.2-graphs.pdf b/lectures/aula3.2-graphs.pdf new file mode 100755 index 0000000..34fcb15 Binary files /dev/null and b/lectures/aula3.2-graphs.pdf differ diff --git a/lectures/caixa-dagua-cilindrica.ggb b/lectures/caixa-dagua-cilindrica.ggb new file mode 100755 index 0000000..63b0d85 Binary files /dev/null and b/lectures/caixa-dagua-cilindrica.ggb differ diff --git a/lectures/caixa-dagua-cilindrica.pdf b/lectures/caixa-dagua-cilindrica.pdf new file mode 100755 index 0000000..d0d94d9 Binary files /dev/null and b/lectures/caixa-dagua-cilindrica.pdf differ diff --git a/lectures/caixa-dagua-graph-sketch.pdf b/lectures/caixa-dagua-graph-sketch.pdf new file mode 100755 index 0000000..7ebc2e8 Binary files /dev/null and b/lectures/caixa-dagua-graph-sketch.pdf differ diff --git a/lectures/familia-1-over-square-root.pdf b/lectures/familia-1-over-square-root.pdf new file mode 100755 index 0000000..26e6a8a Binary files /dev/null and b/lectures/familia-1-over-square-root.pdf differ diff --git a/lectures/familia-1-over-squares.pdf b/lectures/familia-1-over-squares.pdf new file mode 100755 index 0000000..ff440a4 Binary files /dev/null and b/lectures/familia-1-over-squares.pdf differ diff --git a/lectures/funcoes-variacao-crescimento.ggb b/lectures/funcoes-variacao-crescimento.ggb new file mode 100755 index 0000000..3cec431 Binary files /dev/null and b/lectures/funcoes-variacao-crescimento.ggb differ diff --git a/lectures/inverse-function-complete.pdf b/lectures/inverse-function-complete.pdf new file mode 100755 index 0000000..cb24830 Binary files /dev/null and b/lectures/inverse-function-complete.pdf differ diff --git a/lectures/inverse-function-positive.pdf b/lectures/inverse-function-positive.pdf new file mode 100755 index 0000000..b84310b Binary files /dev/null and b/lectures/inverse-function-positive.pdf differ diff --git a/lectures/n2-n-parabola-analysis.pdf b/lectures/n2-n-parabola-analysis.pdf new file mode 100755 index 0000000..d9f8a22 Binary files /dev/null and b/lectures/n2-n-parabola-analysis.pdf differ diff --git a/lectures/n2-n-parabola.pdf b/lectures/n2-n-parabola.pdf new file mode 100755 index 0000000..b945daf Binary files /dev/null and b/lectures/n2-n-parabola.pdf differ diff --git a/lectures/n2-n.pdf b/lectures/n2-n.pdf new file mode 100755 index 0000000..6e40147 Binary files /dev/null and b/lectures/n2-n.pdf differ diff --git a/lectures/rational-functions.ggb b/lectures/rational-functions.ggb new file mode 100755 index 0000000..baa07c0 Binary files /dev/null and b/lectures/rational-functions.ggb differ diff --git a/lectures/squares.pdf b/lectures/squares.pdf new file mode 100755 index 0000000..7875c9a Binary files /dev/null and b/lectures/squares.pdf differ diff --git a/lectures/x-3x-3x-1.pdf b/lectures/x-3x-3x-1.pdf new file mode 100755 index 0000000..7d9daf1 Binary files /dev/null and b/lectures/x-3x-3x-1.pdf differ diff --git a/lectures/x-x2-sqrt-01-interval-08--1.pdf b/lectures/x-x2-sqrt-01-interval-08--1.pdf new file mode 100755 index 0000000..a6a05c3 Binary files /dev/null and b/lectures/x-x2-sqrt-01-interval-08--1.pdf differ diff --git a/lectures/x-x2-sqrt-01-points-isolated.pdf b/lectures/x-x2-sqrt-01-points-isolated.pdf new file mode 100755 index 0000000..d84a4ae Binary files /dev/null and b/lectures/x-x2-sqrt-01-points-isolated.pdf differ diff --git a/lectures/x-x2-sqrt-01-points-segments.pdf b/lectures/x-x2-sqrt-01-points-segments.pdf new file mode 100755 index 0000000..1103e9d Binary files /dev/null and b/lectures/x-x2-sqrt-01-points-segments.pdf differ diff --git a/lectures/x-x2-sqrt-01.pdf b/lectures/x-x2-sqrt-01.pdf new file mode 100755 index 0000000..c558dcb Binary files /dev/null and b/lectures/x-x2-sqrt-01.pdf differ diff --git a/refs.bib b/refs.bib new file mode 100755 index 0000000..b1785a3 --- /dev/null +++ b/refs.bib @@ -0,0 +1,61 @@ +@book{eti, + author = {Steven Schwartzman}, + title = {The words of mathematics. An etymological + dictionary of mathematical terms used in English.}, + year = {1980}, + publisher = {The Mathematical Association of America}, + location = {United States}, + ISBN = {0-88385-511-9}, %% , 978-0-88385-511-9 +} + +@book{knuthv1, + author = {Knuth, Donald E.}, + title = {The Art of Computer Programming, volume 1, fundamental algorithms}, + edition = {3}, + year = {1997}, + ISBN = {0-201-89683-4}, + publisher = {Addison-Wesley Longman Publishing Co., Inc.}, + address = {Boston, MA, USA}, +} + +@book{mccoy, + author = {Neal H. McCoy and Gerald J. Janusz}, + title = {Introduction to Modern Algebra}, + year = {1992}, + publisher = {Wm. C. Brown Publishers}, + ISBN = {0-697-08570-8}, + edition = {5}, +} + +@book{hardy-pure, + title = {A course of pure mathematics}, + author = {G.~H. Hardy}, + publisher = {Cambridge University Press}, + isbn = {}, + year = {1967}, + edition = {10}, +} + +@book{stewart, + title = {Calculus}, + author = {James Stewart}, + publisher = {Brooks Cole}, + isbn = {978-0-495-01160-6}, %% 0-495-01160-6 , + year = {2007}, + series = {}, + edition = {6}, + volume = {}, + } + + +@book{calculo, + title = {Cálculo}, + author = {James Stewart}, + publisher = {Cengage Learning}, + isbn = {978-85-221-0968-5}, + year = {2009}, + series = {}, + edition = {6}, + volume = {1}, + } +