Week 5: Preparation#
Reading Material#
Reading: Chapter 4
Python: Demo 5
Key Concepts#
Note
Note that degree and order of polynomials sometimes are used synonymously. We use “degree” in this course.
Orders of magnitude and Big O notation are not part of the curriculum, but it is useful to become familiar with “Big O” notation, as it appears, for example, in Sympy outputs (see today’s Python demo).
Long Day will cover:
Tangent lines and tangent planes
Taylor polynomials in one variable
Taylor polynomials in \(n\) variables
Taylor polynomials of vector functions
Remainder term and error estimation
Short Day will cover:
Diverging and converging Taylor series
Taylor’s theorem
Taylor’s limit formula
Preparatory Exercises#
I: Tangent Lines and Tangent Planes#
Question a#
A function \(f : \mathbb{R} \to \mathbb{R}\) is given by:
Find the equation of the tangent line at \(x_0 = 1\).
Hint
Calculate \(f(1)\) and \(f'(1)\), and then use the well-known formula for the slope of the line:
Now isolate \(y\).
Answer
\(y = 1 + 2(x-1)\)
Question b#
A function \(f : \mathbb{R}^2 \to \mathbb{R}\) is given by:
Find the equation of the tangent plane at the point \((1,1)\).
Hint
Calculate the gradient \(\nabla f(1,1)\), and use the formula
Answer
\(z = 2 + 2(x-1) + 2(y-1)\)
Intuitive explanation
A tangent line is the line that “touches” a curve at a single point without crossing it. Similarly, a tangent plane is a surface that “touches” a 3D surface at a single point. The tangent line and tangent plane are described by first-degree Taylor polynomials.
II: Taylor Polynomials in One Variable#
Question a#
Find the first-degree Taylor polynomial of
from the expansion point \(x_0 = 0\). This polynomial is also called the approximating polynomial of degree one.
Hint
Use \(f(0)\) and \(f'(0)\).
Answer
\(P_1(x) = 0 + 1\cdot x = x\)
Question b#
Find the second-degree Taylor polynomial of
from the expansion point \(x_0 = 0\). This polynomial is also called the approximating polynomial of degree two.
Hint
Use \(f(0)\), \(f'(0)\) and \(f''(0)\).
Answer
\(P_2(x) = 1 + 0\cdot x + \frac{-1}{2}x^2 = 1 - \frac{1}{2}x^2\)
Intuitive explanation
Taylor polynomials provide a way to approximate a “complicated” function by a sum of simple polynomial terms. The first-degree polynomial gives a linear approximation, while the second-degree polynomial includes a quadratic term for better accuracy.
III: “Big O” Notation and Growth Rate#
Note
Here, we go slightly beyond the curriculum: “Big O” notation is used to describe how fast a function approximately grows. For example, if a given function is \(O(n^2)\) then its growth rate is at most proportional to \(n^2\) as \(n\) approaches infinity.
For a given functional expression, it is usually sufficient to focus on the term that grows the fastest, as lower-order terms and constants do not affect asymptotic growth. For example, a function \(f : \mathbb{N} \to \mathbb{N}\) given by
is \(O(2^n)\), because exponential growth indicated by \(2^n\) causes a much faster increase for growing \(n\) than polynomial growth with the term \(n^5\). (As \(n\) grows to very large values, the term \(2^n\) will eventually dominate with \(100n^5\) becoming comparatively insignificant - when considering asymptotic growth, only the fastest-growing term is relevant.)
Let
Show that \(f(n)\) is \(O(n^2)\). That is, find constants \(C > 0\) and \(n_0 \in \mathbb{N}\) such that for all \(n \geq n_0\), the following holds:
Hint
For \(n \geq 1\) note that:
Use these inequalities to show that:
Answer
With the help in the hint, we find that we, for example, can choose \(C = 20\) and \(n_0 = 1\).