\documentclass{amsart}[11pt]
\usepackage{graphicx}

\addtolength{\textwidth}{1.4in}                          
\oddsidemargin=0in                          
\evensidemargin=0in       

\newtheorem{example}{Example} 
\newtheorem{question}[example]{Question}
\newtheorem{definition}[example]{Definition}
\newtheorem{theorem}[example]{Theorem}
\newtheorem{notation}[example]{Notation}
\newtheorem{fact}[example]{Fact}

\begin{document}

\title{Math 241, Lecture 4}
\maketitle

\section{ Quadratic functions}  

After linear functions, the next simplest kinds of functions are quadratic
functions.    We will review basic properties
of these functions now, so they are familiar when we 
apply calculus to them later.  

\begin{theorem}
A parabola intersects the $y$-axis at the point $(0, c)$.  
A parabola intersects the $x$-axis at points given by the quadratic
equation.  
A parabola reaches its maximum or minimum when
$x = \frac{-b}{2a}$.  
\end{theorem}

We can easily verify the first two statements.   
The third statement can also be verified through the algebra
of ``completing the square'',
but will be very easy to see with a little calculus.  

\begin{example}
Graph the function $f(x) = -\frac{1}{2} x^2 + 3x - 4$, indicating
the places where the graph crosses the axes, as well as the minimum
or maximum.   
\end{example} 

\begin{example}
Suppose the total profit made by manufacturing $x$ thousands of units of Freshies
doggie biscuits is given by $P(x) = -0.4 x^2 + 80 x - 20$ (measured
in tens of thousands of dollars).  

 Explain why this is a reasonably-shaped profit function.  
For example, $P(0) = -20$; does that make sense?  
Find the optimum number of Freshies to produce.  
\end{example}


\section{ Exponential functions}  

Our next goal is to increase our toolbox of functions beyond polynomials, etc.  
Our first new functions will be the exponential functions.     These functions
arise in population modeling, finance, the study of heat transfer and rates of 
reaction in physics, chemistry and biology.   

Exponential functions arise by taking one number to the power of another, just
as polynomial functions like $x^3$ do.    For exponential functions, the variable
occurs as the power, not as the base.  

It is an interesting story to see how the exponential function is defined for different
kinds of numbers;   its careful development required many of the fundamental
ideas in calculus.    

We develop the function $4^x$, to be concrete and to be clear that for 
exponential functions, the variable appears in the power.  

\begin{definition}
\begin{itemize}
\item $4^0 = 1$.  
\item If $x$ is a positive integer, the value of $4^x$ is $4 \times 4 \times \cdots \times 4$,
where $4$ is multiplied by itself $x$ times.   For example $4^3 = 4 \times 4 \times 4 = 64$.  
\item The two laws of exponents state that $4^x 4^y = 4^{x+y}$ and $(4^x)^y = 4^{xy}$.  
   For example
$4^2 \times 4^3 = 16 \times 64 = 1024 = 4^5 = 4^{2+3}$   and 
$(4^2)^2 = 16^2 = 256 = 4^4 = 4^{2 \times 2}$.     These laws of exponents
determine what $4^x$ must be for other kinds of $x$.   
\item If $x$ is a positive integer, $4^{-x} = \frac{1}{4^x}$.     For example $4^{-2} = \frac{1}{4^2} =
\frac{1}{16}$.     This rule must hold since $4^x \times 4^{-x} = 4^{x + (-x)} = 4^0 = 1$ by
the law of exponents,   so that $4^x$ and $4^{-x}$ are reciprocals.  
\item If $x$ is a positive integer $4^{\frac{1}{x}} = \sqrt[x]{4}$.    For example, 
$4^{\frac{1}{2}} = \sqrt{4} = 2$.    This rule must hold because $(4^{\frac{1}{x}})^x = 
4^{\frac{1}{x} x} = 4^1 = 4$.    (Interesting question: why must there be a $\sqrt[3]{4}$?)  
\item If $x$ is a fraction $x = \frac{p}{q}$ then $4^x = (4^{\frac{1}{q}})^p$, 
as must be the case immediately from the laws of exponents.  
For example $4^{\frac{-3}{2}} = (4^{\frac{1}{2}})^{-3} = \sqrt{4}^{-3} = 2^{-3} =
\frac{1}{2^3} = \frac{1}{8}.$  
\item Finally, note that any real number $x$ is approximated arbitrarily closely
by rational numbers $\frac{p}{q}$.    If $x$ is an arbitrary real number
we define $4^x$ as the {\em limit} of $4^{\frac{p}{q}}$ as the fraction
$\frac{p}{q}$ approaches $x$ .   For example $4^\pi$
is the limit of the sequence $4^3, 4^{\frac{31}{10}}, 4^{\frac{314}{100}}, \ldots$.  
We will develop the notion of limit more fully later.  
\end{itemize}
%Note that we need this discussion when talking about 
%functions like $x^{\frac{5}{7}}$ and $x^{\sqrt{2}}$.  
\end{definition}

Fortunately, our calculators can compute any of these values for us.  

Important fact: if $4^x = 4^y$ then $x = y$.    In other words, the function 
$4^x$ doesn't repeat any values (in contrast with most other functions  
-- for example, $x^2 + 2$ has the same value when $x = 2$ or $x = -2$.)  

The graph of an exponential function always starts or ends close to the
$x$-axis   (why?)   and then gets far away from the axis very quickly.  

\begin{example}
Sketch the graphs of the exponential functions $f(x) = -3 \cdot 2^x$ and 
$y = (\frac{2}{3})^x$.  
\end{example}

\section{ Compound interest and the exponential base $e$}  

\begin{itemize}
\item When making a loan to a good friend, you charge no interest.  
(If you loan $P$, you get back $P$).  
\item A personal loan between strangers often has a one-time interest charge.  
If $P$ dollars is loaned, $P + rP$ dollars is paid back, where $r$ is the interest
rate.     For example, $\$100$ loaned with a one-time $7\%$ rate is repaid
as $100 + 0.07 \times 100 = 107$ dollars.    It will be helpful to rewrite
$P + rP$ as $P(1+r)$.  
\item Some loans/investments accrue interest yearly.    In these cases, one
is paying/earning interest on top of interest.    For example, after two years
of $7\%$ interest, $\$100$ becomes $[100\times (1.07)] \times (1.07) = 114.49$ dollars.  
(in this case, the $49$ cents is the interest on top of interest).  
In general, if for a principal of $P$, the value after $n$ years will be
$P(1+r)^n$.    Note that interest on top of interest becomes much more significant
as $n$ gets larger.
\item In order to be more sensitive to when transactions are made, it makes sense
to compound interest more frequently.     To compound things monthly,
we would charge an interest of $\frac{r}{12}$ each month, resulting in a total return 
of $P(1+\frac{r}{12})^{n}$, where $n$ is the number of months.    Note that 
the total for $n= 12$, which is a year, will be greater than if an interest 
of $r$ percent is changed once.  
To compound interest every day would result in a total of $P(1 + \frac{r}{365})^n$,
after $n$ days, for $P(1+\frac{r}{365})^{365}$ after a year.  
\item We could even compoud every hour, every minute, etc.  The general formula
is that after a year one has $P(1 + \frac{r}{N})^N$, if one compounds $N$ times.   
For a fraction $q$ of a year (such as $\frac{1}{2}$ for six monts), the formula
is $P(1 + \frac{r}{N})^{qN}$.    For example, if one compounds $5\%$ yearly interest every
day, then after $6$ months $\$100$ becomes $100(1 + \frac{0.05}{365})^{182} = \$102.53$  
\item Theoretically, we can compound {\em continuously} by taking the limit as $N$ goes to $\infty$
in the formula above.    For example, suppose we invest $\$1$ with yearly interest
of $100\%$, so that $r = 1$.  
%If the interest is not compounded, at the end of a year there would be $\$1$.  
How much would there be if the interest is compounded continuously?  
\begin{center}
\begin{tabular}{|c|c|c|c|c|c|c|}     \hline
$N$ &  1 & 2 &10 &100 & 1000 & 100000 \\ \hline
$(1 + \frac{1}{N})^N$ & 2 & 2.25 & 2.594 & 2.705 & 2.71815 & 2.71827\\
\hline
\end{tabular}
\end{center} 
%  The first entry is what there would be if there were no compounding of interest, namely $\$2$. 
  The answer to this question is the magic number $e$, whose value is approximately
$2.71828$.  
\item In general, if $P$ dollars are invested at an annual rate of $r \times 100$ percent, then
the balance $B(t)$ after $t$ years is $P e^{r t}$ dollars.  
\end{itemize}

The number $e$ is called the natural base for exponentiation, since it occurs raised to a
power in problems from almost every quantitative subject.  

\begin{example}
What are you paying out to the credit card company if you have a $\$1000$ balance 
at a $19\%$ APR compounded continuously, which you finally pay after two years?
\end{example}

\begin{example}
Find the value of $\$ 325,000$ after $1$ year with $7\%$  interest compounded yearly, monthly,
daily and continuously.   (Ans: 347750; 348494.28;  348562.82; 348565.16)  
\end{example}



\end{document}
 