Week 1: Preparation#
Reading Material#
We recommend that you read the textbook. Watching YouTube videos on the week’s topics can be useful, but it should not replace proper preparation for the week’s program and is not recommended as a standalone approach.
Read and study the following:
Review: Study Chapter 0
Long Day: Chapter 1, Section 2.1, Section 3.1, and Section 3.2
Minor Day: Section 2.2, Section 3.2, and Section 3.3
Python demo
Key Concepts#
After reading, you should be able to explain the following key concepts:
Scalar functions: particularly quadratic forms
Vector functions
Visualization of functions: Graphs and level curves/sets
Continuity
The standard inner product (dot product) and norm in \(\mathbb{R}^n\)
Partial derivatives and the Gradient vector
This week, we will explore these key concepts in great detail. We expect you to have familiarized yourself with these topics before lectures.
Preparatory Exercises#
I: The Function Value at a Point#
Question a#
Substitute the values \(x = 2\) and \(y = -1\) into the functional expression \(f(x, y) = x^2 + 3xy + 4y^2\) and calculate \(f(2, -1)\).
Hint
Substitute \(x\) with \(2\) and \(y\) with \(-1\) in the expression \(x^2 + 3xy + 4y^2\).
Answer
\(f(2, -1) = 2^2 + 3(2)(-1) + 4(-1)^2 = 4 - 6 + 4 = 2\)
Question b#
Let \(g: \mathbb{R}^2 \to \mathbb{R}\) be given by the functional expression \(g(x_1, x_2) = x_1^2 + 3x_1 x_2 + 4 x_2^2\). Calculate \(g(2, -1)\).
Hint
This is the same functional expression as in the previous question, so method and answer are the same.
Question c#
Let \(\alpha \in \mathbb{R}\). Find \(g(2 \alpha, \alpha)\) and \(g(\alpha, 2 \alpha)\), where \(g\) is defined in the previous question. Calculate the derivative of \(g(2 \alpha, \alpha)\) with respect to \(\alpha\).
Hint
For \(g(2 \alpha, \alpha)\), substitute \(x_1 = 2 \alpha\) and \(x_2 = \alpha\) into \(g(x_1, x_2) = x_1^2 + 3x_1x_2 + 4x_2^2\). Repeat for \(g(\alpha, 2 \alpha)\). For the derivative, differentiate the expression for \(g(2 \alpha, \alpha)\) with respect to \(\alpha\).
Answer
Substituting gives:
\(g(2 \alpha, \alpha) = (2\alpha)^2 + 3(2 \alpha)(\alpha) + 4(\alpha)^2 = (4+6+4)\alpha^2 = 14 \alpha^2\) and \(g(\alpha, 2\alpha) = (\alpha)^2 + 3(\alpha)(2\alpha) + 4(2\alpha)^2 = (1+6+8) \alpha^2 = 15 \alpha^2\).
The derivative of \(g(2 \alpha, \alpha) = 14 \alpha^2\) with respect to \(\alpha\) is \(\frac{d}{d\alpha} \big( 14 \alpha^2 \big) = 28 \alpha\).
II: Limit of a Function \(f: \mathbb{R}^2 \to \mathbb{R}\)#
Let \(f: \mathbb{R}^2 \to \mathbb{R}\) be given by:
Question a#
Find \(f(x, x)\) for \(x \neq 0\). Then find \(f(y, y)\) for \(y \neq 0\).
Hint
Substitute \(y = x\) into the functional expression for \(f(x,y)\). Be sure to simplify the fraction.
Hint
After finding \(f(x, x)\), you can find \(f(y, y)\) by simply replacing \(x\) with \(y\). It’s after all the same expression, just with a different variable name.
Answer
For \(x \neq 0\):
Question b#
Determine \(\lim_{x \to 0} f(x,x)\).
Answer
From the expression in the previous question, we get:
Question c#
Determine \( \lim_{x \to 0} f(x,2x) \).
Hint
Substitute \(y = 2x\) into the formula for \(f(x, y)\) and simplify the expression.
Answer
For \( x \neq 0 \), we get \(f(x,2x) \;=\; \tfrac{2}{5} + x\), and therefore:
Question d (extra, optional)#
Consider whether the limit \(\lim_{(x,y)\to (0,0)} f(x,y)\) exists.
Answer
As we approach \((0,0)\) along the lines \(y=x\) and \(y=2x\), we find two different values. Since the limit depends on the path taken, \(\lim_{(x,y)\to (0,0)} f(x,y)\) does not exist. This shows that \(f\) is not continuous at \((0,0)\) (even if we were allowed to change the function value \(f(0,0)\)).
III: Level Curves#
Describe the level curves (contour lines) for the function \(f: \mathbb{R}^2 \to \mathbb{R}\) givet ved \(f(x, y) = x^2 + y^2 - 5\).
Hint
For example, use Python. The level curve for \(f(x, y) = 9\) can be plotted as follows:
x, y = symbols("x y", real=True)
f = x**2 + y**2 - 5
dtuplot.plot_implicit(Eq(f,9), x,y)
IV: Graph or Level Curve?#
Below are shown the graph of a function \(f_1\) of one variable and a level curve of a function \(f_2\) of two variables. Which plot is the graph, and which is the level curve?
V: Discontinuous at One Point#
Draw, describe, or define a function \(h: \mathbb{R} \to \mathbb{R}\) that is continuous at all points except for a single point.
Answer
One possible function is \(h(x) = \begin{cases} x & \text{if } x \neq 1 \\ 0 & \text{if } x = 1 \end{cases}\). This function is continuous everywhere except at \(x = 1\).
VI: Discontinuity of the Heaviside Step Function#
Question a#
Plot the Heaviside step function given here in Python.
Hint
See this week’s Python demo.
Question b#
Indicate the points where the function is discontinuous.
Answer
The function is discontinuous only at \(0\).
Question c#
Can you prove that the function is discontinuous at \(x_0 = 0\)?
Hint
Discontinuity at a point intuitively means that the function “jumps” at this point. However, this is not a definition we can work with. For example, there are many functions that seemingly “jump” everywhere, but are still continuous. Thomae’s function is an example of a function that seemingly “jumps” at every point on the real line but is continuous at all irrational numbers (and discontinuous at all rational numbers!).
Hint
To prove discontinuity, we need to use the precise meaning of this property. Find the \(\epsilon-\delta\) technique in the textbook.
Hint
A function \(f\) is discontinuous at \(x_0\) if we can find an \(\epsilon > 0\) such that no \(\delta > 0\) can make \(|x-x_0| < \delta \Rightarrow |f(x)-f(x_0)| < \epsilon\) true.
Written with quantifiers: \(f\) is discontinuous at \(x_0\) if and only if \(\exists \epsilon >0 \forall \delta >0 \exists x : |x-x_0| < \delta \text{ and } |f(x)-f(x_0)| \ge \epsilon\).
Hint
The function is discontinuous at \(0\), so we need to consider \(x_0 = 0\). Remember that the Heaviside function satisfies \(f(0)=1\).
Hint
Choose \(\epsilon = 1/2\) (the exact value is unimportant as long as it’s \(<1\)).
Answer
Let \(\delta>0\) be an arbitrarily small number, for example \(\delta = 10^{-100}\) (just remember that while \(\delta\) can be arbitrarily small, it must be greater than zero). Choose \(x = -\delta/2\). Then \(|x-x_0| = |-\delta/2 - 0| = \delta/2 < \delta\) and \(|f(x)-f(x_0)| = |0 - 1| = 1 \ge 1/2 = \epsilon\). This shows that the Heaviside function is discontinuous at \(x_0 = 0\). Alternatively, we can think of this as no \(\delta > 0\) making \(|x-0| < \delta \Rightarrow |f(x)-1| < 1/2\) true.
Above, you could also choose \(x = -\delta/3\) (why is that?). But the argument fails if you choose, for instance, \(x = \delta/2\).