commit 99a4986b9e004339787e33361400cbed722ffe72 Author: Sven Riwoldt Date: Sat Jun 29 08:01:30 2024 +0200 Init diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..4d2488a --- /dev/null +++ b/.gitignore @@ -0,0 +1,4 @@ +*.aux +*.log +*.out +*.synctex.gz diff --git a/PointChecking.png b/PointChecking.png new file mode 100644 index 0000000..3d0d904 Binary files /dev/null and b/PointChecking.png differ diff --git a/Upenn001.png b/Upenn001.png new file mode 100644 index 0000000..5259ce1 Binary files /dev/null and b/Upenn001.png differ diff --git a/Upenn002.png b/Upenn002.png new file mode 100644 index 0000000..f56a91f Binary files /dev/null and b/Upenn002.png differ diff --git a/Upenn003.png b/Upenn003.png new file mode 100644 index 0000000..86899a3 Binary files /dev/null and b/Upenn003.png differ diff --git a/Upenn004.png b/Upenn004.png new file mode 100644 index 0000000..782a9ba Binary files /dev/null and b/Upenn004.png differ diff --git a/Upenn005.png b/Upenn005.png new file mode 100644 index 0000000..a62e45f Binary files /dev/null and b/Upenn005.png differ diff --git a/Upenn006.png b/Upenn006.png new file mode 100644 index 0000000..86e00eb Binary files /dev/null and b/Upenn006.png differ diff --git a/Upenn007.png b/Upenn007.png new file mode 100644 index 0000000..5355d93 Binary files /dev/null and b/Upenn007.png differ diff --git a/Upenn008.png b/Upenn008.png new file mode 100644 index 0000000..b1fcdd7 Binary files /dev/null and b/Upenn008.png differ diff --git a/Upenn009.png b/Upenn009.png new file mode 100644 index 0000000..f013dcf Binary files /dev/null and b/Upenn009.png differ diff --git a/Upenn010.png b/Upenn010.png new file mode 100644 index 0000000..487cbaa Binary files /dev/null and b/Upenn010.png differ diff --git a/Upenn010a.png b/Upenn010a.png new file mode 100644 index 0000000..5267caf Binary files /dev/null and b/Upenn010a.png differ diff --git a/Upenn011.png b/Upenn011.png new file mode 100644 index 0000000..96daea4 Binary files /dev/null and b/Upenn011.png differ diff --git a/Upenn012.png b/Upenn012.png new file mode 100644 index 0000000..dfeccfb Binary files /dev/null and b/Upenn012.png differ diff --git a/Upenn013.png b/Upenn013.png new file mode 100644 index 0000000..4746e8b Binary files /dev/null and b/Upenn013.png differ diff --git a/Upenn014.png b/Upenn014.png new file mode 100644 index 0000000..ec35927 Binary files /dev/null and b/Upenn014.png differ diff --git a/Upenn015.png b/Upenn015.png new file mode 100644 index 0000000..1a0b0cc Binary files /dev/null and b/Upenn015.png differ diff --git a/computingtaylorseries.tex b/computingtaylorseries.tex new file mode 100644 index 0000000..064ce59 --- /dev/null +++ b/computingtaylorseries.tex @@ -0,0 +1,319 @@ +The previous module gave the definition of the Taylor series for an arbitrary function. It turns out that this is not always the easiest way to compute a function's Tavlor series. Just as functions can be added. subtracted, multiplied, and composed, so can their corresponding Taylor series. + +$$ +f(x)=\sum_{k=0}^{\infty} \frac{f^{(k)}(0)}{k!} x^k=f(0)+f^{\prime}(0) x+\frac{f^{\prime \prime}(0)}{2!} x^2+\cdots . +$$ + +Using the definition of the Taylor series involves taking a lot of derivatives, which could be a lot of work, especially if the function involves compositions and products of functions, e.g. $f(x)=\sin \left(x^2\right) e^{x^3}$. This module will show how to compute the Taylor series of such functions more easily by using the Taylor series for functions we already know. + +Substitution + +Our first method, substitution, allows us to plug one function into the Taylor series of another. Consider the function $f(x)=\frac{1}{x} \sin \left(x^2\right)$. + +Computing the Taylor series for $f$ from the definition would involve the quotient rule, chain rule, and a lot of algebra. But by taking the series for $\sin x$ and substituting $x^2$ into this series, and then distributing the $\frac{1}{x}$, one finds + +$$ +\begin{aligned} + \frac{1}{x} \sin \left(x^2\right) & =\frac{1}{x}\left(\left(x^2\right)-\frac{1}{3!}\left(x^2\right)^3+\frac{1}{5!}\left(x^2\right)^5-\cdots\right) \\ + & =\frac{1}{x}\left(x^2-\frac{1}{3!} x^6+\frac{1}{5!} x^{10}-\cdots\right) \\ + & =x-\frac{1}{3!} x^5+\frac{1}{5!} x^9-\cdots . +\end{aligned} +$$ + +Note that getting this many terms using the definition would involve taking nine derivatives of the original function, which would be a lot of work! To get a more complete description of the Taylor series, one can use the summation notation, and again substitute to find + +$$ +\begin{aligned} + \frac{1}{x} \sin \left(x^2\right) & =\frac{1}{x} \sum_{k=0}^{\infty}(-1)^k \frac{\left(x^2\right)^{2 k+1}}{(2 k+1)!} \\ + & =\frac{1}{x} \sum_{k=0}^{\infty}(-1)^k \frac{x^{4 k+2}}{(2 k+1)!} \\ + & =\sum_{k=0}^{\infty}(-1)^k \frac{x^{4 k+1}}{(2 k+1)!} +\end{aligned} +$$ + +Example Find the Taylor series for $e^{x^3}$ by substitution. \textbf{Answer} + +\noindent\begin{tcolorbox}[colback=red!5!white,colframe=red!75!black] +Recall the series for $e^x$ is +$$ +e^x=1+x+\frac{x^2}{2!}+\frac{x^3}{3!}+\cdots=\sum_{k=0}^{\infty} \frac{x^k}{k!} +$$ + +Substituting $x^3$ into the series for $e^x$ gives +$$ +\begin{aligned} + e^{x^3} & =1+x^3+\frac{\left(x^3\right)^2}{2!}+\frac{\left(x^3\right)^3}{3!}+\cdots \\ + & =1+x^3+\frac{x^6}{2!}+\frac{x^9}{3!}+\cdots \\ + & =\sum_{k=0}^{\infty} \frac{\left(x^3\right)^k}{k!} \\ + & =\sum_{k=0}^{\infty} \frac{x^{3 k}}{k!} +\end{aligned} +$$ +\end{tcolorbox} + +Combining like terms +Another way to use previous knowledge of one Taylor series to find another is by combining like terms. This requires some careful algebra, but it is no more difficult than multiplying two polynomials together. For example, consider the function +$$ +f(x)=\cos ^2(x)=\cos (x) \cdot \cos (x) . +$$ + +Finding the series for a function multiplied by another function is the same as taking the series for each function and multiplying them together, and then collecting like terms. This is where some algebra is required. +$$ +\begin{aligned} + \cos (x) \cdot \cos (x) & =\left(1-\frac{1}{2!} x^2+\frac{1}{4!} x^4-\cdots\right)\left(1-\frac{1}{2!} x^2+\frac{1}{4!} x^4-\cdots\right) \\ + & =1+\left(-\frac{1}{2!}-\frac{1}{2!}\right) x^2+\left(\frac{1}{4!}+\frac{1}{2!} \frac{1}{2!}+\frac{1}{4!}\right) x^4+\cdots \\ + & =1-x^2+\frac{1}{3} x^4+\cdots +\end{aligned} +$$ + +To see where the coefficient of $x^4$ comes from, note that every $x^4$ term comes from some term from the left series multiplied together with some term from the right series whose powers add up to 4. There are three such pairs: 1 on the left paired with $\frac{1}{4!} x^4$ on the right; $-\frac{1}{2!} x^2$ on the left paired with $-\frac{1}{2!} x^2$ on the right; and $\frac{1}{4!} x^4$ on the left paired with 1 on the right. This is the same algebra one would do when multiplying two polynomials together; this is just a way of collecting like terms in a systematic way. + +Example Use the trigonometric identity +$$ +\cos ^2 x=\frac{1+\cos (2 x)}{2} +$$ +and substitution to find the series for $\cos ^2 x$. Try to give the series in summation notation (other than the first term). \textbf{Answer} + +\noindent\begin{tcolorbox}[colback=red!5!white,colframe=red!75!black] + +By the above identity, +$$ +\begin{aligned} + \cos ^2 x & =\frac{1}{2}(1+\cos (2 x)) \\ + & =\frac{1}{2}\left(1+\left(1-\frac{(2 x)^2}{2!}+\frac{(2 x)^4}{4!}-\cdots\right)\right) \\ + & =\frac{1}{2}\left(2-\frac{4 x^2}{2}+\frac{16 x^4}{24}-\cdots\right) \\ + & =1-x^2+\frac{x^4}{3}-\cdots . +\end{aligned} +$$ + +In summation notation, +$$ +\begin{aligned} + \cos ^2 x & =\frac{1}{2}\left(1+\sum_{k=0}^{\infty}(-1)^k \frac{(2 x)^{2 k}}{(2 k)!}\right) \\ + & =\frac{1}{2}+\frac{1}{2} \sum_{k=0}^{\infty}(-1)^k \frac{(2 x)^{2 k}}{(2 k)!} \\ + & =\frac{1}{2}+\sum_{k=0}^{\infty}(-1)^k \frac{2^{2 k-1} x^{2 k}}{(2 k)!} \\ + & =1+\sum_{k=1}^{\infty}(-1)^k \frac{2^{2 k-1} x^{2 k}}{(2 k)!} . +\end{aligned} +$$ + +\end{tcolorbox} + +Hyperbolic trigonometric functions +The hyperbolic trigonometric functions $\sinh (x), \cosh (x)$, and $\tanh (x)$ are defined by +$$ +\begin{aligned} + \sinh (x) & =\frac{e^x-e^{-x}}{2} \\ + \cosh (x) & =\frac{e^x+e^{-x}}{2} \\ + \tanh (x) & =\frac{e^x-e^{-x}}{e^x+e^{-x}}=\frac{\sinh (x)}{\cosh (x)} +\end{aligned} +$$ + +\begin{figure}[h] + \centering + \includegraphics[width=0.7\linewidth]{Upenn008} + \caption{} + \label{fig:upenn008} +\end{figure} + +These hyperbolic trig functions, although graphically quite different from their traditional counterparts, have several similar algebraic properties, which is why they are so named. For example, the Pythagorean identity for cosine and sine has a version for hyperbolic cosine and sine: +$$ +\cosh ^2(x)-\sinh ^2(x)=1 . +$$ + +One can verify this using the definitions and some algebra. But there is a geometric intuition for this relationship. Recall that cosine and sine give the $x$ and $y$ coordinates, respectively, for a point on the unit circle $x^2+y^2=1$. The hyperbolic cosine and hyperbolic sine give the $x$ and $y$ coordinates, respectively, for points on the hyperbola $x^2-y^2=1$ : + +\begin{figure}[h] + \centering + \includegraphics[width=0.7\linewidth]{Upenn009} + \caption{} + \label{fig:upenn009} +\end{figure} + +Example Using the Taylor series for $e^x$ and substitution, show that the Taylor series for cosh and sinh are +$$ +\begin{aligned} + & \cosh (x)=1+\frac{x^2}{2!}+\frac{x^4}{4!}+\cdots=\sum_{k=0}^{\infty} \frac{x^{2 k}}{(2 k)!} \\ + & \sinh (x)=x+\frac{x^3}{3!}+\frac{x^5}{5!}+\cdots=\sum_{k=0}^{\infty} \frac{x^{2 k+1}}{(2 k+1)!} . +\end{aligned} +$$ + +Note that these are almost the same as the series for cosine and sine, respectively, except they do not alternate. This gives another reason for the names of these functions. + +\textbf{Answer} + +\noindent\begin{tcolorbox}[colback=red!5!white,colframe=red!75!black] + +$\begin{aligned} \cosh (x) & =\frac{e^x+e^{-x}}{2} \\ & =\frac{1}{2}\left[\left(1+x+\frac{x^2}{2!}+\cdots\right)+\left(1-x+\frac{x^2}{2!}-\cdots\right)\right] \\ & =\frac{1}{2}\left[2+2 \frac{x^2}{2!}+2 \frac{x^4}{4!}+\cdots\right] \\ & =1+\frac{x^2}{2!}+\frac{x^4}{4!}+\cdots \\ & =\sum_{k=0}^{\infty} \frac{x^{2 k}}{(2 k)!} . \\ \sinh (x) & =\frac{e^x-e^{-x}}{2} \\ & =\frac{1}{2}\left[\left(1+x+\frac{x^2}{2!}+\cdots\right)-\left(1-x+\frac{x^2}{2!}-\cdots\right)\right] \\ & =\frac{1}{2}\left[2 x+2 \frac{x^3}{3!}+2 \frac{x^5}{5!}+\cdots\right] \\ & =x+\frac{x^3}{3!}+\frac{x^5}{5!}+\cdots \\ & =\sum_{k=0}^{\infty} \frac{x^{2 k+1}}{(2 k+1)!} .\end{aligned}$ +\end{tcolorbox} + +Manipulating Taylor series +Another way of using one Taylor series to find another is through differentiation and integration. For instance, to find the Taylor series for the derivative of $f$, one can differentiate the Taylor series for $f$ term by term. + +Example By differentiating the Taylor series for sinh and cosh, show that +$$ +\begin{aligned} + \frac{d}{d x} \sinh x & =\cosh x \\ + \frac{d}{d x} \cosh x & =\sinh x . +\end{aligned} +$$ + +This is yet another relationship which is similar (though not identical) to the relationship between sine and cosine. \textbf{Answer} + +\noindent\begin{tcolorbox}[colback=red!5!white,colframe=red!75!black] + +Differentiating hyperbolic sine gives +$$ +\begin{aligned} + \frac{d}{d x} \sinh x & =\frac{d}{d x} \sum_{k=0}^{\infty} \frac{x^{2 k+1}}{(2 k+1)!} \\ + & =\sum_{k=0}^{\infty}(2 k+1) \frac{x^{2 k}}{(2 k+1)!} \\ + & =\sum_{k=0}^{\infty} \frac{x^{2 k}}{(2 k)!} \\ + & =\cosh x, +\end{aligned} +$$ +as desired. Similarly, differentiating hyperbolic cosine gives +$$ +\begin{aligned} + \frac{d}{d x} \cosh x & =\frac{d}{d x} \sum_{k=0}^{\infty} \frac{x^{2 k}}{(2 k)!} \\ + & =\sum_{k=0}^{\infty}(2 k) \frac{x^{2 k-1}}{(2 k)!} \\ + & =\sum_{k=1}^{\infty} \frac{x^{2 k-1}}{(2 k-1)!} \\ + & =\sum_{k=0}^{\infty} \frac{x^{2 k+1}}{(2 k+1)!} . +\end{aligned} +$$ + +There was a little bit of reindexing there, but by writing out a few terms of each series, one can see that all of the above equalities are true. + +\end{tcolorbox} + +Higher Order Terms in Taylor Series +In some situations, it will be convenient only to write the first few terms of a Taylor series. This is particularly true when combining or composing more than one Taylor series. Up until now, an ellipsis has been used to indicate that there are more terms in the series that are being omitted. + +There is another way, sometimes used in this course, of notating the omitted terms in a Taylor series. That is by referring to them as Higher Order Terms (or H.O.T. for short). Having the extra HOT in a series means that all the remaining terms in the series have a higher degree than the previous terms. + +Example The function $e^x$ can be written as +$$ +e^x=1+x+\frac{1}{2!} x^2+\text { HOT }, +$$ +or it could also be written as +$$ +e^x=1+x+\text { HOT. } +$$ + +The point at which the higher order terms are cut-off is somewhat arbitrary and depends on the situation. There is a more formal way of keeping track of the higher order terms, called Big-O notation, which is presented in orders of growth. + +Example Find the first two non-zero terms of the Taylor series for +$$ +f(x)=1-2 x e^{\sin x^2} \text {. } +$$ + +\textbf{Answer} + +\noindent\begin{tcolorbox}[colback=red!5!white,colframe=red!75!black] + +Beginning with the innermost function, in this case $\sin x^2$, we find that +$$ +\sin x^2=x^2-\frac{1}{3!}\left(x^2\right)^3+\text { HOT }=x^2-\frac{1}{6} x^6+\text { HOT } \text {. } +$$ + +Then plugging this into the series for $e^x$ gives +$$ +\begin{aligned} + e^{\sin x^2} & =1+\left(x^2-\frac{1}{6} x^6+\text { HOT }\right)+\frac{1}{2!}\left(x^2+\text { HOT }\right)^2+\frac{1}{3!}\left(x^2+\text { HOT }\right)^3+\text { HOT } \\ + & =1+x^2+\frac{1}{2} x^4+\left(-\frac{1}{6}+\frac{1}{6}\right) x^6+\text { HOT } \\ + & =1+x^2+\frac{1}{2} x^4+\text { HOT } +\end{aligned} +$$ + +Then to complete the answer, plug this into the original function to find +$$ +\begin{aligned} + f(x) & =1-2 x\left(1+x^2+\frac{1}{2} x^4+\text { HOT }\right) \\ + & =1-2 x-2 x^3-x^5+\text { HOT. } +\end{aligned} +$$ +\end{tcolorbox} + +Extra examples +Example +Compute the Taylor series (at 0 ) for $\sin ^2 x$ up to and including terms of order 6. Try to give the full Taylor series in summation notation. \textbf{Answer} + +\noindent\begin{tcolorbox}[colback=red!5!white,colframe=red!75!black] + +$$ +\begin{aligned} + \sin ^2 x & =\left(x-\frac{x^3}{3!}+\frac{x^5}{5!}-\cdots\right)\left(x-\frac{x^3}{3!}+\frac{x^5}{5!}-\cdots\right) \\ + & =x^2+\left(-\frac{1}{3!}-\frac{1}{3!}\right) x^4+\left(\frac{1}{5!}+\frac{1}{3!\cdot 3!}+\frac{1}{5!}\right) x^6+\cdots \\ + & =x^2-\frac{1}{3} x^4+\frac{2}{45} x^6-\cdots +\end{aligned} +$$ + +To get the full Taylor series, one can use the identity +$$ +\sin ^2 x=\frac{1-\cos (2 x)}{2} +$$ +to find that +$$ +\begin{aligned} + \sin ^2 x & =\frac{1-\cos (2 x)}{2} \\ + & =\frac{1}{2}\left(1-\left(1-\frac{(2 x)^2}{2!}+\frac{(2 x)^4}{4!}-\cdots\right)\right) \\ + & =\frac{1}{2}\left(\frac{(2 x)^2}{2!}-\frac{(2 x)^4}{4!}+\frac{(2 x)^6}{6!}-\cdots\right) \\ + & =\frac{1}{2} \sum_{k=1}^{\infty}(-1)^{k-1} \frac{(2 x)^{2 k}}{(2 k)!} +\end{aligned} +$$ + +\end{tcolorbox} + +Example +Find the first three terms of the Taylor series for $\sqrt{f(x)}$, where +$$ +f(x)=a_0+a_1 x+a_2 x^2+a_3 x^3+\cdots . \text { \textbf{Answer} } +$$ + +noindent\begin{tcolorbox}[colback=red!5!white,colframe=red!75!black] + +Let $g(x)=\sqrt{f(x)}$, where +$$ +g(x)=b_0+b_1 x+b_2 x^2+b_3 x^3+\cdots . +$$ + +Then $g(x)^2=f(x)$, and so the same holds for the Taylor series: +$$ +\left(b_0+b_1 x+b_2 x^2+b_3 x^3+\cdots\right)^2=a_0+a_1 x+a_2 x^2+\cdots . +$$ + +Multiplying out and collecting like terms gives +$$ +b_0^2+\left(b_0 b_1+b_1 b_0\right) x+\left(b_0 b_2+b_1 b_1+b_2 b_0\right) x^2+\cdots=a_0+a_1 x+a_2 x^2+\cdots . +$$ + +Now, equating coefficients of the monomials on the left and right gives the first few equations (of an infinite system of equations) +$$ +\begin{aligned} + b_0^2 & =a_0 \\ + 2 b_0 b_1 & =a_1 \\ + 2 b_0 b_2+b_1^2 & =a_2 +\end{aligned} +$$ + +Solving these equations gives the first three coefficients of $g$ : +$$ +\begin{aligned} + b_0 & =\sqrt{a_0} \\ + b_1 & =\frac{a_1}{2 \sqrt{a_0}} \\ + b_2 & =\frac{1}{2 \sqrt{a_0}}\left(a_2-\frac{a_1^2}{4 a_0}\right) +\end{aligned} +$$ + +Thus, +$$ +\sqrt{a_0+a_1 x+a_2 x^2+\cdots}=\sqrt{a_0}+\frac{a_1}{2 \sqrt{a_0}} x+\frac{1}{2 \sqrt{a_0}}\left(a_2-\frac{a_1^2}{4 a_0}\right) x^2+\cdots +$$ + +\end{tcolorbox} + +--------------------------------------------- + +EXERCISES +- Compute the Taylor series of $\cos (2 x) \sin (3 x)$ up to and including terms of degree 5. Don't try computing derivatives for this! +- Use a Taylor polynomial to give a cubic approximation to $2 x e^{3 x}$ +- Compute the Taylor series of $e^{1-\cos t}$ in summation notation. +- Compute the Taylor series of $\cos (\sin (x))$ to fourth order. +- Compute the Taylor series of $\sin (\cos (x))$ to forth order. What happens that makes this different than the last problem? (Hint: $\cos (0)=1$ but $\sin (0)=0 \ldots$ ) +- Compute the first three nonvanishing terms in the Taylor series of $e^{2 x}(\sinh 3 x) / x$. \ No newline at end of file diff --git a/convergence.tex b/convergence.tex new file mode 100644 index 0000000..9e053c5 --- /dev/null +++ b/convergence.tex @@ -0,0 +1,296 @@ +Convergence + +A Taylor series can be thought of as an infinite polynomial. Up until now, we have not worried about the issues that come up when adding up infinitely many things. This module deals with two main issues: + +1. A function may not have a Taylor series at all; +2. A function's Taylor series may not converge everywhere, even within the function's domain. + +Functions without a Taylor series +The first problem is that some functions cannot be expressed in the form +$$ +f(x)=\sum_{k=0}^{\infty} c_k x^k=c_0+c_1 x+c_2 x^2+\cdots +$$ + +Examples include tan, which has vertical asymptotes, and $\ln$, which is not defined for $x \leq 0$. Polynomials are not able to capture these sorts of discontinuities and asymptotes. + +THE GEOMETRIC SERIES +The geometric series is an example of a Taylor series which is well behaved for some values of $x$ and nonsensical for other values of $x$. The claim is that +$$ +1+x+x^2+x^3+x^4+\cdots=\frac{1}{1-x}, +$$ +for $|x|<1$. +Justification +Example Compute the Taylor series for $f(x)=\frac{1}{1-x}$ directly from the definition. + +\textbf{Answer} + +\noindent\begin{tcolorbox}[colback=red!5!white,colframe=red!75!black] + +$$ +\begin{array}{rlrl} + f(x) & =\frac{1}{1-x} & f(0) & =1 \\ + f^{\prime}(x) & =\frac{1}{(1-x)^2} & f^{\prime}(0)=1 \\ + f^{\prime \prime}(x) & =\frac{2}{(1-x)^3} & f^{\prime \prime}(0)=2 \\ + f^{\prime \prime \prime}(x) & =\frac{6}{(1-x)^4} & f^{\prime \prime \prime}(0)=6 . +\end{array} +$$ + +Notice the pattern that +$$ +f^{(k)}(x)=\frac{k!}{(1-x)^{k+1}}, +$$ +at least for the first few $k$. To see that the pattern continues, assume it holds for some $k$, and show that it holds for $k+1$ (this is a proof technique known as mathematical induction). If $f^{(k)}(x)=\frac{k!}{(1-x)^{k+1}}$, then +$$ +f^{(k+1)}(x)=\frac{(k+1) k!}{(1-x)^{k+2}}=\frac{(k+1)!}{(1-x)^{k+2}}, +$$ +as desired. Then $f^{(k)}(0)=k!$, so according to the definition of Taylor series, it follows that +$$ +\begin{aligned} + \frac{1}{1-x} & =0!+1!x+\frac{2!}{2!} x^2+\frac{3!}{3!} x^3+\cdots \\ + & =1+x+x^2+x^3+\cdots, +\end{aligned} +$$ +which agrees with the above. +\end{tcolorbox} + + + + +Note The geometric series only holds when $|x|<1$. This makes sense, because if $|x|>1$, the powers of $x$ are getting bigger and bigger and so the series should not converge. If $x=1$, then the series is adding 1 infinitely many times, which diverges. If $x=-1$, then the series oscillates between 1 and 0 , and hence does not converge. + +The takeaway is that every Taylor series has a convergence domain where the series is well-behaved, and outside that domain the series will not converge. For many functions, the domain is the whole real number line (e.g. the series for $e^x$, sin, cos, cosh, and sinh all converge everywhere), but be aware that there are functions whose Taylor series do not converge everywhere. This will be covered more formally in Series Convergence And Divergence. + +\textbf{Example} A beam of light of intensity $L$ hits a pane of glass. Half of the light is reflected, and a third of the light is transmitted; the rest is absorbed. When a beam of light of intensity $L$ hits two parallel panes with an air gap between them, how much light is transmitted through both panes? (The following figure shows how the light gets reflected and rereflected. The first transmitted and reflected beams of light are labeled with their respective intensities. The question asks for the total of the beams of light emerging on the right side of the right pane of glass). + +\begin{figure}[h] + \centering + \includegraphics[width=0.5\linewidth]{Upenn010} + \caption{} + \label{fig:upenn010} +\end{figure} + +\textbf{Answer} + +\noindent\begin{tcolorbox}[colback=red!5!white,colframe=red!75!black] +By labeling more of the transmitted and reflected beams of light, a pattern emerges among the beams of light on the right side of the right pane: +\end{tcolorbox} + +\begin{figure}[h] + \centering + \includegraphics[width=0.5\linewidth]{Upenn010a} + \caption{} + \label{fig:upenn010a} +\end{figure} + +\noindent\begin{tcolorbox}[colback=red!5!white,colframe=red!75!black] +$\frac{1}{9}, \frac{1}{36}, \frac{1}{144}, \ldots$ Note that each beam is $\frac{1}{4}$ the previous beam. Thus, the total light emerging on the right side of the right pane of glass is +$$ +\begin{aligned} + \frac{L}{9}+\frac{L}{36}+\frac{L}{144}+\cdots & =\frac{L}{9}\left(1+\frac{1}{4}+\frac{1}{16}+\cdots\right) \\ + & =\frac{L}{9}\left(\frac{1}{1-1 / 4}\right) \\ + & =\frac{L}{9} \frac{4}{3} \\ + & =\frac{4 L}{27} +\end{aligned} +$$ +by using the formula for the geometric series. + +\end{tcolorbox} + +Example Use the Taylor series of $\frac{1}{1-x}$ to derive the Taylor series of $\ln (1+x)$. Hint: recall that $\ln (1+x)=\int \frac{1}{1+x} d x$. \textbf{Answer} + +\noindent\begin{tcolorbox}[colback=red!5!white,colframe=red!75!black] +Note that +$$ +\begin{aligned} + \frac{1}{1+x} & =\frac{1}{1-(-x)} \\ + & =1-x+x^2-x^3+x^4-\cdots +\end{aligned} +$$ + +Now, integrating gives $\int \frac{d x}{1+x}=\ln (1+x)+C$ on the one hand, and +$$ +\begin{aligned} + \int\left(1-x+x^2-x^3+x^4-\cdots\right) d x & =x-\frac{x^2}{2}+\frac{x^3}{3}-\cdots \\ + & =\sum_{k=1}^{\infty}(-1)^{k-1} \frac{x^k}{k} +\end{aligned} +$$ +on the other hand. Plugging in $x=0$ shows that $C=0$, and so +$$ +\begin{aligned} + \ln (1+x) & =x-\frac{x^2}{2}+\frac{x^3}{3}-\cdots \\ + & =\sum_{k=1}^{\infty}(-1)^{k+1} \frac{x^k}{k} +\end{aligned} +$$ + +Note that because this relied on the geometric series, which only holds for $|x|<1$, the same restriction holds for the Taylor series for $\ln (1+x)$. +\end{tcolorbox} + +Example Use the fact that +$$ +\arctan x=\int \frac{1}{1+x^2} d x +$$ +to find the Taylor series for arctan $x$. \textbf{Answer} + +\noindent\begin{tcolorbox}[colback=red!5!white,colframe=red!75!black] +Using the fact, and the geometric series, we find that +$$ +\begin{aligned} + \arctan (x) & =\int \frac{1}{1+x^2} d x \\ + & =\int \frac{1}{1-\left(-x^2\right)} d x \\ + & =\int\left(1-x^2+x^4-x^6+\cdots\right) d x \\ + & =x-\frac{x^3}{3}+\frac{x^5}{5}-\frac{x^7}{7}+\cdots+C . +\end{aligned} +$$ + +Plugging in $x=0$ gives that $C=0$, since arctan $0=0$. Thus, +$$ +\begin{aligned} + \arctan (x) & =x-\frac{x^3}{3}+\frac{x^5}{5}-\cdots \\ + & =\sum_{k=0}^{\infty}(-1)^k \frac{x^{2 k+1}}{2 k+1} +\end{aligned} +$$ +$$ +(|x|<1) \text {. } +$$ + +So even though arctan is defined for all $x$, its Taylor series only converges for $|x|<1$. +\end{tcolorbox} + +Example Another important function is the binomial series $(1+x)^\alpha$, where $\alpha$ is some constant. Show that +$$ +\begin{gathered} + (1+x)^\alpha=1+\alpha x+\frac{\alpha(\alpha-1)}{2!} x^2+\frac{\alpha(\alpha-1)(\alpha-2)}{3!} x^3+\cdots \\ + =\sum_{k=0}^{\infty}\binom{\alpha}{k} x^k \\ + \text { where }\binom{\alpha}{k}=\frac{\alpha(\alpha-1)(\alpha-2) \cdots(\alpha-k+1)}{k!} . +\end{gathered} +$$ + +This series also only holds for $|x|<1$. +\textbf{Answer} + +\noindent\begin{tcolorbox}[colback=red!5!white,colframe=red!75!black] +For fixed $\alpha$ we have $f(x)=(1+x)^\alpha$. Then proceeding from the definition of the Taylor series, one computes +$$ +\begin{array}{rlrl} + f(x) & =(1+x)^\alpha & f(0) & =1 \\ + f^{\prime}(x) & =\alpha(1+x)^{\alpha-1} & f^{\prime}(0) & =\alpha \\ + f^{\prime \prime}(x) & =\alpha(\alpha-1)(1+x)^{\alpha-2} & f^{\prime \prime}(0) & =\alpha(\alpha-1) \\ + f^{\prime \prime \prime}(x) & =\alpha(\alpha-1)(\alpha-2)(1+x)^{\alpha-3} & f^{\prime \prime \prime}(0) & =\alpha(\alpha-1)(\alpha-2) \\ + \vdots & & \vdots +\end{array} +$$ + +One finds that, in general, $f^{(k)}(0)=\alpha(\alpha-1)(\alpha-2) \cdots(\alpha-k+1)$. Thus, the Taylor expansion for $(1+x)^\alpha$ is +$$ +\begin{aligned} + (1+x)^\alpha & =1+\alpha x+\frac{\alpha(\alpha-1)}{2!} x^2+\frac{\alpha(\alpha-1)(\alpha-2)}{3!} x^3+\cdots \\ + & =1+\binom{\alpha}{1} x+\binom{\alpha}{2} x^2+\binom{\alpha}{3} x^3+\cdots \\ + & =\sum_{k=0}^{\infty}\binom{\alpha}{k} x^k +\end{aligned} +$$ +as claimed. + +\end{tcolorbox} + + +Summary +Here are all the series we have found so far. The following hold for all $x$ : +$$ +\begin{aligned} + e^x & =\sum_{k=0}^{\infty} \frac{x^k}{k!} \\ + \cos x & =\sum_{k=0}^{\infty}(-1)^k \frac{x^{2 k}}{(2 k)!} \\ + \sin x & =\sum_{k=0}^{\infty}(-1)^k \frac{x^{2 k+1}}{(2 k+1)!} \\ + \cosh x & =\sum_{k=0}^{\infty} \frac{x^{2 k}}{(2 k)!} \\ + \sinh x & =\sum_{k=0}^{\infty} \frac{x^{2 k+1}}{(2 k+1)!} . +\end{aligned} +$$ + +The following hold for $|x|<1$ : +$$ +\begin{aligned} + \frac{1}{1-x} & =\sum_{k=0}^{\infty} x^k \\ + \ln (1+x) & =\sum_{k=1}^{\infty}(-1)^{k+1} \frac{x^k}{k} \\ + \arctan x & =\sum_{k=0}^{\infty}(-1)^k \frac{x^{2 k+1}}{2 k+1} \\ + (1+x)^\alpha & =\sum_{k=0}^{\infty}\binom{\alpha}{k} x^k +\end{aligned} +$$ + + +Electrostatics example +Here we use the geometric series and the binomial series from above in an example from electrostatics. An electric dipole is a pair of equally and oppositely charged particles separated by a short distance. One question of interest in electrostatics is the electrostatic potential, which is the sum of the point charge potentials from each pole. + +The point charge potential from a single particle with charge $q$, at a distance $d$ from the particle, is +$$ +V=\frac{k q}{d} +$$ +where $k$ is a constant called the Coulomb constant. Then a dipole with particles of charge $q$ and $-q$ has net electrostatic potential +$$ +V=\frac{k q}{d_{+}}-\frac{k q}{d_{-}} +$$ +where $d_{+}$is the distance to the positively charged particle, and $d_{-}$is the distance to the negatively charged particle: + +\begin{figure}[h] + \centering + \includegraphics[width=0.4\linewidth]{Upenn011} + \caption{} + \label{fig:upenn011} +\end{figure} + +We will calculate the first order term for the electrostatic potential at two different locations: $p_1$ and $p_2$ : + +\begin{figure}[h] + \centering + \includegraphics[width=0.4\linewidth]{Upenn012} + \caption{} + \label{fig:upenn012} +\end{figure} + +First consider $p_1$, located directly above and distance $d$ from the positive particle. Let $r$ be the distance between the charged particles. Then $d_{+}=d$, and by the Pythagorean theorem, $d_{-}=\sqrt{d^2+r^2}$. It follows that the electrostatic potential is +$$ +\begin{aligned} + V & =\frac{k q}{d_{+}}-\frac{k q}{d_{-}} \\ + & =\frac{k q}{d}-\frac{k q}{\sqrt{d^2+r^2}} . +\end{aligned} +$$ + +Now, factoring out $\frac{k q}{d}$, and applying the binomial series with $\alpha=-\frac{1}{2}$, we find +$$ +\begin{aligned} + V & =\frac{k q}{d}\left[1-\frac{1}{\sqrt{1+(r / d)^2}}\right] \\ + & =\frac{k q}{d}\left[1-\left(1+(r / d)^2\right)^{-1 / 2}\right] \\ + & =\frac{k q}{d}\left[1-\left(1-\frac{1}{2}(r / d)^2+\text { HOT }\right)\right] \\ + & =\frac{1}{2} \frac{k q \tau^2}{d^3}+\text { HOT. } +\end{aligned} +$$ + +At position $p_2$, which is directly left of and distance $d$ from the positive particle, we have $d_{+}=d$, and $d_{-}=d+\tau$, so we find that the electrostatic potential at $p_2$ is +$$ +\begin{aligned} + V & =\frac{k q}{d_{+}}-\frac{k q}{d_{-}} \\ + & =\frac{k q}{d}-\frac{k q}{d+r} . +\end{aligned} +$$ + +Again, factoring out $\frac{k q}{d}$ and expanding using the geometric series gives + +$\begin{aligned} V & =\frac{k q}{d}\left(1-\frac{1}{1+\frac{r}{d}}\right) \\ & =\frac{k q}{d}\left(1-\left(1-\frac{r}{d}+\text { HOT }\right)\right) \\ & =\frac{k q r}{d^2}+\text { HOT. }\end{aligned}$ + +---------------------------------------------------------- + +EXERCISES +- Consider a snowman built from solid snowballs of radius $2^{-n}$, for $n=0,1,2, \ldots$, all stacked on top of one another. How many units tall is the snowman? How many cubic units of snow was required to build it? +- Compute the Taylor series about zero of +$$ +\ln \frac{1+3 x}{1-3 x} +$$ +- Compute the Taylor series about zero of +$$ +\frac{1}{\sqrt{1-x^2}} +$$ +- Using your answer to the previous problem, compute the Taylor series about zero of arcsin $x$, using termwise integration and the fact that +$$ +\arcsin x=\int \frac{d x}{\sqrt{1-x^2}} +$$ +- For which values $z$ is the Taylor series of $\sqrt[4]{3-2 z^2}$ guaranteed to converge? +- Use the binomial series to give the Taylor expansion of $(1+x)^3$. Now, do it with your head: easier, right? Recall, we have said that the binomial series only converges when $|x<1|$, but, clearly, that cannot be a *sharp* constraint, since $(1+x)^3$ is good for all $x$, right? Well, Horatio, there are more things... By the end of this course, we will learn when and how to bend some of these restrictions. + diff --git a/exponential.tex b/exponential.tex new file mode 100644 index 0000000..dc137d2 --- /dev/null +++ b/exponential.tex @@ -0,0 +1,117 @@ +\chapter{The Exponential} + +This module deals with a very important function: the exponential. The first question one might ask is: what is the exponential function $e^{\text {? }}$. We know certain values of the function such as $e^0=1$, but what about an irrational input such as $e^\pi$, or an imaginary input $e^{i}$ ? Is it possible to make sense of these values? + + +The following definition answers these questions. + +\begin{minipage}[t]{\textwidth} + \vspace{2mm} +\noindent\begin{tcolorbox}[colback=blue!25!white,colframe=blue!75!black] +The Exponential $e^x$ +\begin{tcolorbox}[colback=blue!5!white,colframe=blue!75!black] +$$ +\begin{aligned} + & e^x=1+x+\frac{x^2}{2!}+\frac{x^3}{3!}+\frac{x^4}{4!}+\cdots \\ + & =\sum_{k=0}^{\infty} \frac{x^k}{k!} \text {, } \\ +\end{aligned} +$$ +where $k!=k(k-1)(k-2) \cdots 3 \cdot 2 \cdot 1$, and $0!=1$. + +\end{tcolorbox} +\end{tcolorbox} +\vspace{2mm} +\end{minipage} + +One can now plug values for $x$ into the above sum to compute $e^x$. When $x=0$, for instance, one finds that $e^0=1$, (since all the terms with $x$ disappear) as expected. By plugging in $x=1$, the true value of $e$ is found to be $e=1+1+\frac{1}{2!}+\frac{1}{3!}+\cdots$. + +\section{A long polynomial} +There are technical concerns when trying to add up an infinite number of things. These issues will be dealt with later in the modules on series. For now, treat the infinite sum above as a long polynomial (the actual term is the Taylor series about $x=0$, which will be more formally dealt with in the \textcolor{red}{next module}). Polynomials are nice because they are easy to integrate and differentiate. Recall the power rule for differentiating and integrating a monomial $x^k$, where $k$ is a constant: +$$ +\begin{aligned} + \frac{d}{d x} x^k & =k x^{k-1} \\ + \int x^k d x & =\frac{1}{k+1} x^{k+1}+C \quad(k \neq-1) +\end{aligned} +$$ + +\section{Properties of $e^x$} +Recall the following properties of the exponential function: + +\begin{enumerate} +\item $e^{x+y}=e^x e^y$ +\item $e^{x \cdot y}=\left(e^x\right)^y=\left(e^y\right)^x$ +\item $\frac{d}{d x} e^x=e^x$ +\item $\int e^x d x=e^x+C$. +\end{enumerate} + +Consider the last two properties in terms of the long polynomial.Taking the derivative of the long polynomial for $e^x$ gives + +$$ +\begin{aligned} + \frac{d}{d x}\left(1+x+\frac{x^2}{2!}+\frac{x^3}{3!}+\frac{x^4}{4!}+\cdots\right) & =0+1+\frac{2 x}{2!}+\frac{3 x^2}{3!}+\frac{4 x^3}{4!}+\cdots \\ + & =1+x+\frac{x^2}{2!}+\frac{x^3}{3!}+\cdots +\end{aligned} +$$ +which is the original long polynomial. Integrating also gives (up to the constant of integration) the original long polynomial. This agrees with facts about the derivative and integral of $e^x$. Thus, the long polynomial for $e^x$ captures two of the key features of $e^x$; namely, $e^x$ is its own derivative and its own integral. + +\section{Euler's formula} +Recall that the imaginary number $i$ is defined by $i=\sqrt{-1}$. So $i^2=-1, i^3=-i, i^4=1$, and this continues cyclically (for a review of complex/imaginary numbers, see wikipedia). Assume the following fact, known as Euler's formula, mentioned in the last module. + + +\begin{minipage}[t]{\textwidth} + \vspace{2mm} +\noindent\begin{tcolorbox}[colback=blue!25!white,colframe=blue!75!black] + Euler's Formula + \begin{tcolorbox}[colback=blue!5!white,colframe=blue!75!black] + $$ + e^{i x}=\cos x+i \sin x + $$ + \end{tcolorbox} +\end{tcolorbox} +\vspace{2mm} +\end{minipage} + +Consider what happens when $i x$ is plugged into the long polynomial for $e^x$. By simplifying the powers of $i$, and grouping the result into its real and imaginary parts, one finds +$$ +\begin{aligned} + e^{i x} & =1+i x+\frac{(i x)^2}{2!}+\frac{(i x)^3}{3!}+\cdots \\ + & =1+i x+\frac{i^2 x^2}{2!}+\frac{i^3 x^3}{3!}+\cdots \\ + & =1+i x-\frac{x^2}{2!}-i \frac{x^3}{3!}+\frac{x^4}{4!}+i \frac{x^5}{5!}+\cdots \\ + & =\left(1-\frac{x^2}{2!}+\frac{x^4}{4!}-\cdots\right)+i\left(x-\frac{x^3}{3!}+\frac{x^5}{5!}-\cdots\right) . +\end{aligned} +$$ + +If this is supposed to equal $\cos x+i \sin x$, then the real part must be $\cos x$, and the imaginary part must be $\sin x$. It follows that +$$ +\begin{aligned} + & \cos x=1-\frac{x^2}{2!}+\frac{x^4}{4!}-\frac{x^6}{6!}+\cdots=\sum_{k=0}^{\infty}(-1)^k \frac{x^{2 k}}{(2 k)!} \\ + & \sin x=x-\frac{x^3}{3!}+\frac{x^5}{5!}-\frac{x^7}{7!}+\cdots=\sum_{k=0}^{\infty}(-1)^k \frac{x^{2 k+1}}{(2 k+1)!} . +\end{aligned} +$$ + +These formulas should be memorized, both in their long polynomial form and their more concise summation notation form. + +\subsection*{Example} +Use Euler's formula to show that $e^{i \pi}=-1$. Answer +\subsection*{Example} +Compute $1-\frac{\pi^2}{2!}+\frac{\pi^4}{4!}-\cdots$. Answer +\subsection*{Example} +Check that taking the derivative of the long polynomial for $\sin x$ gives the long polynomial for $\cos x$ (hence, verify that $\frac{d}{d x} \sin x=\cos x$ ). Answer + +\subsection*{Example} +Show that the long polynomial for $e^x$ satisfies the first property above, namely $e^{x+y}=e^x e^y$. Hint: start with the long polynomials for $e^x$ and $e^y$ and multiply these together, and carefully collect like terms to show it equals the long polynomial for $e^{x+y}$. Answer + + +\section{More on the long polynomial} +The idea of a long polynomial is reasonable, because it actually comes from taking a sequence of polynomials with higher and higher degree: +$$ +\begin{aligned} + & f_0(x)=1 \\ + & f_1(x)=1+x \\ + & f_2(x)=1+x+\frac{x^2}{2} \\ + & f_3(x)=1+x+\frac{x^2}{2}+\frac{x^3}{6} \\ + & \vdots +\end{aligned} +$$ + +Each polynomial in the sequence is, in a sense, the best approximation possible of that degree. Put another way, taking the first several terms of the long polynomial gives a good polynomial approximation of the function. The more terms included, the better the approximation. This is how calculators compute the exponential function (without having to add up infinitely many things). \ No newline at end of file diff --git a/functions.tex b/functions.tex new file mode 100644 index 0000000..1c45c5a --- /dev/null +++ b/functions.tex @@ -0,0 +1,236 @@ + \chapter{Introduction} +\section{What this wiki is} + +This wiki encapsulates the Math 104E calculus course at the University of Pennsylvania. 104E is a second semester calculus course presented for an engineering audience (hence the "E"). The goal of this wiki is to codify the content of this course in a way that is easily expandable or amendable as necessary, and to provide future teachers/students of the course with a lean, searchable text. The pages are in sequence (navigable from the home page or by using the arrows at the top and bottom of each page), and each page is designed to be a mini-lecture of about 10 -15 minutes. + +\section{Prerequisites} +This course assumes that you have had a first semester calculus course (such as AP Calculus AB or Math 103 at Penn). You should be able to compute basic derivatives and integrals. Experience shows that some students may need to brush up on precalculus skills: factoring, exponent rules, logarithm rules, trigonometric functions and unit circle values, and graphing functions (among other things). + +\section{Philosophy} +This course focuses on the big picture over gritty calculations and memorized tricks. There will be some things you simply must commit to memory, but these will be few and highlighted in some way (yet to be determined). Also, a certain amount of practice is required to gain facility in the basic mechanics of calculus. For that, you should look to the big fat calculus text sold in the bookstore (at least until we have enough problems built into the wiki). + +\section{Outline} +These are the big topics covered, and the number of lectures per topic: +1. Functions: 9 lectures +2. Differentiation: 7 lectures +3. Integration: 12 lectures +4. Applications: 14 lectures +5. Discrete Calculus: 13 lectures + + +\newpage +\chapter{Functions} +1. Functions - Definition and examples of functions +2. The Exponential - The exponential function defined +3. Taylor series - The Taylor series defined and applied +4. Computing Taylor series - Using composition to compute Taylor series +5. Convergence - Problems with some Taylor series +6. Expansion points - Taylor series expansions about other points +7. Limits - Definition of limit and continuity +8. L'Hopital's Rule - Statement and examples in a Taylor series context +9. Orders of growth - Relative growth of the most common functions + + + +A function can be visualized as a machine that takes in an input $x$ and returns an output $f(x)$. The collection of all possible inputs is called the domain, and the collection of all possible outputs is called the range. + + +This course deals with functions whose domains and ranges are $\mathbb{R}$ or subsets of $\mathbb{R}$ (this is the notation for the real numbers). + +\section{Definition and examples of functions} +\begin{enumerate} + \item Polynomials, e.g. $f(x)=x^3-5 x^2+x+9$. Give the domain and range of $f$. \hyperref[FunctionsAnswer1]{Answer} + \item Trigonometric functions, e.g. sin, cos, tan. Give the domain and range for each of these. \hyperref[FunctionsAnswer2]{Answer} + \item The exponential function, $e^x$. Give the domain and range for the exponential. \hyperref[FunctionsAnswer3]{Answer} + \item The natural logarithm function, $\ln x$. Recall that this is the inverse of the exponential function. Give the domain and range for $\ln x$. \hyperref[FunctionsAnswer4]{Answer} + \item Is $\sin ^{-1}$ a function? If so, why? If not, is there a way to make it into a function? \hyperref[FunctionsAnswer5]{Answer} +\end{enumerate} + + + + +\section{Operations on Functions} +\subsection{COMPOSITION} +The composition of two functions, $f$ and $g$, is defined to be the function that takes as its input $\mathrm{x}$ and returns as its output $g(x)$ fed into $f$. +$$ +f \circ g(x)=f(g(x)) +$$ + +\subsection*{Example:} +$\sqrt{1-x^2}$ can be thought of as the composition of two functions, $f$ and $g$. If $g=1-x^2, f$ would be the function that takes an input $g(x)$ and returns its square root. + + +\subsection*{Example:} +Compute the composition $f \circ f$, i.e. the composition of $f$ with itself, where $f(x)=\frac{1}{x+1}$. \hyperref[FunctionsAnswer6]{Answer} + +\subsection{INVERSE} + +The inverse is the function that undoes $f$. If you plug $f(x)$ into $f^{-1}$, you will get $x$. Notice that this function works both ways. If you plug $f^{-1}(x)$ into $f(x)$, you will get back $x$ again. +$$ +\begin{aligned} + & f^{-1}(f(x))=x \\ + & f\left(f^{-1}(x)\right)=x +\end{aligned} +$$ + +NOTE: $f^{-1}$ denotes the inverse, not the reciprocal. $f^{-1}(x) \neq \frac{1}{f(x)}$. +Example: +Let's consider $f(x)=x^3$. Its inverse is $f^{-1}(x)=x^{\frac{1}{3}}$. +$$ +\begin{aligned} + & f^{-1}(f(x))=\left(x^3\right)^{\frac{1}{3}}=x \\ + & f\left(f^{-1}(x)\right)=\left(x^{\frac{1}{3}}\right)^3=x +\end{aligned} +$$ + +Notice that the graphs of $f$ and $f^{-1}$ are always going to be symmetric about the line $y=x$. That is the line where the input and the output are the same: + + +\section{Classes of Functions} +\subsection{POLYNOMIALS} +A polynomial $P(x)$ is a function of the form +$$ +P(x)=c_0+c_1 x+c_2 x^2+\cdots+c_n x^n +$$ + +The top power $n$ is called the degree of the polynomial. We can also write a polynomial using a summation notation. +$$ +P(x)=\sum_{k=0}^n c_k x^k +$$ + +\subsection{RATIONAL FUNCTIONS} +Rational functions are functions of the form $\frac{P(x)}{Q(x)}$ where each is a polynomial. + +\textbf{Example:} +$3 x-1$ $\qquad$ $\overline{x^2+x-6}$ is a rational function. You have to be careful of the denominator. When the denominator takes a value of zero, the function may not be well-defined. + +\subsection{POWERS} +Power functions are functions of the form $c x^n$, where $c$ and $n$ are constant real numbers. +Other powers besides those of positive integers are useful. + +\subsubsection*{Example:} +\begin{itemize} + \item What is $x^0$ ? \hyperref[FunctionsAnswer7]{Answer} + \item What is $x^{-\frac{1}{2}}$ ? \hyperref[FunctionsAnswer8]{Answer} + \item What is $x^{\frac{22}{7}}$ ? \hyperref[FunctionsAnswer9]{Answer} + \item What is $x^\pi$ ? We are not yet equipped to handle this, but we will come back to it later. + +\end{itemize} + +\subsection{TRIGONOMETRICS} + +You should be familiar with the basic trigonometric functions $\sin$, cos. One fact to keep in mind is $\cos ^2 \theta+\sin ^2 \theta=1$ for any $\theta$. This is known as a Pythagorean identity, which is so named because of one of the ways to prove it: + +\begin{figure}[h] + \centering + \includegraphics[width=0.5\linewidth]{Upenn001} + % \caption{} + \label{fig:upenn001} +\end{figure} + +By looking at a right triangle with hypotenuse 1 and angle $\theta$, and labeling the adjacent and opposite sides accordingly, one finds by using Pythagoras' Theorem that $\cos ^2 \theta+\sin ^2 \theta=1$. + +Another way to think about it is to embed the above triangle into a diagram for the unit circle where we see that $\cos \theta$ and $\sin \theta$ returns the $\mathrm{x}$ and $\mathrm{y}$ coordinates, respectively, of a point on the unit circle with angle $\theta$ to the $x$-axis: + +\begin{figure}[h] + \centering + \includegraphics[width=0.5\linewidth]{Upenn002} + % \caption{} + \label{fig:upenn002} +\end{figure} + +That explains the nature of the formula $\cos ^2 \theta+\sin ^2 \theta=1$. It comes from the equation of the unit circle $x^2+y^2=1$. + +Others trigonometric functions: +\begin{itemize} + \item $\tan =\frac{\sin }{\cos }$ + \item $\cot =\frac{\cos }{\sin }$, the reciprocal of $\tan$ + \item $\sec =\frac{1}{\cos }$, the reciprocal of the $\cos$ + \item $\csc =\frac{1}{\sin }$, the reciprocal of the $\sin$ +\end{itemize} + +All four of these have vertical asymptotes at the points where the denominator goes to zero. + +\subsection{INVERSE TRIGONOMETRICS} +We often write $\sin ^{-1}$ to denote the inverse, but this can cause confusion. Be careful that $\sin ^{-1} \neq \frac{1}{\sin }$. To avoid the confusion, the terminology arcsin is recommended for the inverse of the sin function. + +The arccos function likewise has a restricted domain $[-1,1]$, but it takes values $[0, \pi]$. +The arctan function has an unbounded domain, it is well defined for all inputs. But it has a restricted range $\left(-\frac{\pi}{2}, \frac{\pi}{2}\right)$. +\subsection{EXPONENTIALS} +Exponential functions are of the form $c^x$, where $c$ is some positive constant. The most common such function, referred to as the exponential, is $e^x$. This is the most common because of its nice integral and differential properties (below). + +Algebraic properties of the exponential function: +$$ +\begin{gathered} + e^x e^y=e^{x+y} \\ + \left(e^x\right)^y=e^{x y} +\end{gathered} +$$ + +Differential/integral properties: +$$ +\begin{gathered} + \frac{d}{d x} e^x=e^x \\ + \int e^x d x=e^x+C +\end{gathered} +$$ + +Recall the graph of $e^x$, plotted here alongside its inverse, $\ln x$ : + +\begin{figure}[h] + \centering + \includegraphics[width=0.5\linewidth]{Upenn003} + % \caption{} + \label{fig:upenn003} +\end{figure} + + +Note that the graphs are symmetric about the line $y=x$ (as is true of the graphs of a function and its inverse). + +Before continuing, one might ask, what is $\epsilon$ ? There are several ways to define $\epsilon$, which will be revealed soon. For now, it is an irrational number which is approximately $2.718281828$ . + +\subsection{Euler's Formula} + +To close this lesson, we give a wonderful formula, which for now we will just take as a fact: + + +\begin{minipage}[t]{\textwidth} +\vspace{2mm} +\noindent\begin{tcolorbox}[colback=blue!25!white,colframe=blue!75!black] + Euler's Formula + \begin{tcolorbox}[colback=blue!5!white,colframe=blue!75!black] + $$ + e^{i x}=\cos x+i \sin x + $$ + \end{tcolorbox} +\end{tcolorbox} +\vspace{2mm} +\end{minipage} + +The $i$ in the exponent is the imaginary number $\sqrt{-1}$. It has the properties $i^2=-1 \cdot i$ is not a real number. That doesn't mean that it doesn't exist. It just means it is not on a real number line. + +Euler's formula concerns the exponentiation of an imaginary variable. What exactly does that mean? How is this related to trigonometric functions? This will be covered in our next lesson. + +The $i$ in the exponent is the imaginary number $\sqrt{-1}$. It has the properties $i^2=-1 \cdot i$ is not a real number. + +That doesn't mean that it doesn't exist. It just means it is not on a real number line. + +Euler's formula concerns the exponentiation of an imaginary variable. What exactly does that mean? How is this related to trigonometric functions? This will be covered in our next lesson. + +\subsection{Additional Examples} + +\subsubsection*{Example} +Find the domain of +$$ +f(x)=\frac{1}{\sqrt{x^2-3 x+2}} . +$$ + +\hyperref[FunctionsAnswer10]{Answer} + +\subsubsection*{Example} +Find the domain of +$$ +f(x)=\ln \left(x^3-6 x^2+8 x\right) . +$$ + +\hyperref[FunctionsAnswer11]{Answer} \ No newline at end of file diff --git a/solutions.tex b/solutions.tex new file mode 100644 index 0000000..dc65399 --- /dev/null +++ b/solutions.tex @@ -0,0 +1,129 @@ + \part{Solutions} +\chapter*{Functions} +\section*{Definition and examples of functions} +% \noindent\begin{tcolorbox}[colback=red!5!white,colframe=red!75!black] + \subsection*{Lösung 1} + \label{FunctionsAnswer1}The domain is $\mathbb{R}$, because we can plug in any real number into a polynomial. The range is $\mathbb{R}$, which we see by noting that this is a cubic function, so as $x \rightarrow-\infty, f(x) \rightarrow-\infty$, and as $x \rightarrow \infty$, $f(x) \rightarrow \infty$ + %\end{tcolorbox} + \subsection*{Lösung 2} + % \noindent\fbox{% + % \parbox{\textwidth}{ + \label{FunctionsAnswer2} + For $\sin$ and cos: domain is $\mathbb{R}$; range is $[-1,1]$. + For tan, the domain is $\left\{x \in \mathbb{R}: x \neq \frac{\pi}{2}+k \pi\right\}$; range is $\mathbb{R}$. + % }} + % + \subsection*{Lösung 3} + % \noindent\fbox{% + % \parbox{\textwidth}{ + \label{FunctionsAnswer3} + Domain is $\mathbb{R}$; range is $(0, \infty)$. + % }} + + \subsection*{Lösung 4} + % \noindent\begin{tcolorbox}[colback=red!5!white,colframe=red!75!black] + \label{FunctionsAnswer4}Domain is $(0, \infty)$; range is $\mathbb{R}$. Notice how the domain and range of the exponential relate to the domain and range of the natural logarithm. + % \end{tcolorbox} + + \subsection*{Lösung 5} + % \noindent\begin{tcolorbox}[colback=red!5!white,colframe=red!75!black] + + \label{FunctionsAnswer5}$\sin ^{-1}$ is not a function, because one input has many outputs. For example, $\sin ^{-1}(0)=0, \pi, 2 \pi, \ldots$. By restricting the range of $\sin ^{-1}$ to $\left\lfloor-\frac{\pi}{2}, \frac{\pi}{2}\right\rfloor$, one gets the function arcsin. + %\end{tcolorbox} + +% +\section*{Operations on Functions} + \subsection*{COMPOSITION} + \subsubsection*{Lösung 1} + \label{FunctionsAnswer6}We find that + $$ + \begin{aligned} + f \circ f(x) & =f(f(x)) \\ + & =f\left(\frac{1}{x+1}\right) \\ + & =\frac{1}{1 /(x+1)+1} \\ + & =\frac{x+1}{1+x+1} \\ + & =\frac{x+1}{x+2} . + \end{aligned} + $$ + \section*{Classes of Functions} +% \subsection{POLYNOMIALS} +% \subsection{RATIONAL FUNCTIONS} + \subsection*{POWERS} + \subsubsection*{Lösung 1} + \label{FunctionsAnswer7}$x^0=1$ + \subsubsection*{Lösung 2} + \label{FunctionsAnswer8}Recall a fractional power denotes root. For example, $x^{\frac{1}{2}}=\sqrt{x}$. The negative sign in the exponent means that we take the reciprocal. So, $x^{-\frac{1}{2}}=\frac{1}{\sqrt{x}}$. + \subsubsection*{Lösung 3} + \label{FunctionsAnswer9}One can rewrite this as $\left(x^{22}\right)^{1 / 7}$. That means we take $x$ to the 22 nd power and then take the 7 th root of the result. + + \subsection*{Additional Examples} + \subsubsection*{Example 1} + \label{FunctionsAnswer10}Note that the square root is only defined when its input is non-negative. Also, the denominator in a rational function cannot be 0 . So we find that this function is well-defined if and only if $x^2-3 x+2>0$. Factoring gives + $$ + (x-2)(x-1)>0 \text {. } + $$ + + By plotting the points $x=1$ and $x=2$ (where the denominator equals 0 ) and testing points between them, one finds that $x^2-3 x+2>0$ when $x<1$ or $x>2$ : + + \begin{figure} + \centering + \includegraphics[width=0.7\linewidth]{PointChecking} + %\caption{} + \label{fig:pointchecking} + \end{figure} + + + So the domain of $f$ is $x<1$ or $20$. Factoring gives + $$ + x\left(x^2-6 x+8\right)=x(x-2)(x-4)>0 + $$ + + As in the above example, plotting the points where this equals 0 and then testing points, we find that the domain is $00$. Factoring gives +% $$ +% (x-2)(x-1)>0 \text {. } +% $$ +% +% By plotting the points $x=1$ and $x=2$ (where the denominator equals 0 ) and testing points between them, one finds that $x^2-3 x+2>0$ when $x<1$ or $x>2$ : +% +% \begin{figure}[h] +% \centering +% \includegraphics[width=0.5\linewidth]{Upenn004} +% % \caption{} +% \label{fig:upenn004} +% \end{figure} +% +% +% So the domain of $f$ is $x<1$ or $20$. Factoring gives +% $$ +% x\left(x^2-6 x+8\right)=x(x-2)(x-4)>0 +% $$ +% +% As in the above example, plotting the points where this equals 0 and then testing points, we find that the domain is $0