5.14 Chain rule, higher derivatives, and integration
We begin this lecture by studying the differentiability that is the composition of two functions.
Since we are dealing with functions \(f: \mathbb{R}^2 \to \mathbb{R}\), we consider the composition of \(f\) with a function \(\alpha: [a, b] \to \mathbb{R}^2\) whose domain is a closed interval in \(\mathbb{R}\) and take its values in \(\mathbb{R}^2\).
Since \(\alpha: [a, b] \to \mathbb{R}^2\) we write \(\alpha(t) = (x(t), y(t)) \quad \forall t \in [a, b]\)
In particular, one has in each coordinate a function of one variable \(x: [a, b] \to \mathbb{R}\), \(\quad y: [a, b] \to \mathbb{R}\)
Recall that we call such a function a path if it is continuous, that is, for all \(c \in [a, b]\) we have that \(\lim_{t \to c} \alpha(t) = \alpha(c)\) which means that \(\forall \epsilon > 0\), there exists \(\delta > 0\) such that \(||\alpha(t) - \alpha(c)|| < \epsilon\) if \(|t - c| < \delta\)
Exercise: Prove that a function \(\alpha: [a, b] \to \mathbb{R}^2\) with \(\alpha(t) = (x(t), y(t)) \forall t \in [a, b]\) is continuous if and only if the functions \(x: [a, b] \to \mathbb{R}\) and \(x: [a, b] \to \mathbb{R}\) are continuous.
\(\Rightarrow\)) We have \(|t - c| < \delta\) such that \(||\alpha(t) - \alpha(c)|| < \epsilon\), then \(||\left(x(t\right),y\left(t))-\left(x\left(c\right),y\left(c\right)\right)\right .||<\epsilon\)
Then \(\sqrt{\left(x(t\right)-x\left(c\right))^{2}+\left(y\left(t\right)-y\left(c\right)\right)^{2}} <\epsilon\), then we get \(x(t)-x(c)<\varepsilon\) and \(y(t)-y(c)<\varepsilon\)
\(\Leftarrow\)) We have \(x(t)-x(c)<\sqrt{\frac{\varepsilon}{2}}\) and \(y(t)-y(c)<\sqrt{\frac{\varepsilon}{2}}\), then clearly
A path \(\alpha\) is called a differentiable path (\(C^1\)) if it is differentiable for all \(c \in [a, b]\), that is, for all \(c \in [a, b]\) the following limit exists \(\lim_{t \to c} \frac{\alpha(t) - \alpha(c)}{t - c} = \alpha'(c)\)
Write \(\alpha(t) = (x(t), y(t)) \forall t \in [a, b]\). Since \(\alpha(t) - \alpha(c) = (x(t) - x(c), y(t) - y(c))\), it follows that \(\frac{\alpha(t) - \alpha(c)}{t - c} = \left( \frac{x(t) - x(c)}{t - c}, \frac{y(t) - y(c)}{t - c} \right)\)
Hence, the limit exists if and only if both functions \(x: [a, b] \to \mathbb{R}\) and \(y: [a, b] \to \mathbb{R}\) are differentiable and
\(\alpha'(c) = (x'(t), y'(t)) \quad \forall t \in [a, b]\), that is it's differentiable on each coordinate.
Now we study the properties of the function given by the composition of a differentiable path with a differentiable function \(f: \mathbb{R}^2 \to \mathbb{R}\).
So, if we compose such functions
We get a function \(f \circ \alpha: [a, b] \to \mathbb{R} \quad \forall t \in [a, b]\), which is a function of one variable.
Notation: For simplicity, we assume that our interval is \([a, b] = [0, 1]\).
Example
\(f: \mathbb{R}^2 \to \mathbb{R}\), \(f(x, y) = x^2 + y^2\), \(\alpha: [0, 2\pi] \to \mathbb{R}\) where \(\alpha(t) = (\cos(t), \sin(t))\)
\(g(t) = (f \circ \alpha)(t) = f(\alpha(t)) = f(x(t), y(t))\) \(= f(\cos(t), \sin(t))\) \(= \cos^2(t) + \sin^2(t) = 1\)
Theorem
Let \(S \subset \mathbb{R}^2\) be an open set and let \(f: S \to \mathbb{R}\) be a differentiable function.
Let \(x: [0, 1] \to \mathbb{R}\) and \(y: [0, 1] \to \mathbb{R}\) be differentiable functions so that
Let \(g(t): [0, 1] \to \mathbb{R}\) be the function given by the composition
Then \(g\) is differentiable and
Proof
Let's \(p=\alpha(t_{0})=(x(t_{0}),y(t_{0}))\) and \(q=\alpha(t_{0}+\delta)=(x(t_0+\delta),y(t_0+\delta))\)
And compute \(x'(t_{0})=\lim_{\delta\to 0}\frac{x(t_0+\delta)-x(t_0)}{\delta},y'(t_{0})=\lim_{\delta\to 0}\frac{y(t_0+\delta)-y(t_0)}{\delta}\)
And \(\lim_{\delta\to 0}\frac{q-p}{\delta}=\lim_{\delta \to 0}\frac{\alpha(t_0+\delta)-\alpha(t_0)}{\delta}=\alpha'(t_0)=(x'(t_0),y'(t_0))\)
By definition, \(g^{\prime}(t_{0})=\lim_{\delta\to0}\frac{g(t_{0}+\delta)-g(t_{0})}{\delta}=\lim_{\delta\to0} \frac{f(\alpha(t_{0}+\delta))-f(\alpha(t_{0}))}{\delta}=\lim_{\delta\to0}\frac{f\left(q\right)-f\left(p\right)}{\delta}\)
Now we observe that we need gradient in the expression. So we add it and minus it
\(=\lim_{\delta\to0}\frac{f\left(q\right)-f\left(p\right)-\nabla f\left(p\right)\left(q-p\right)+\nabla f\left(p\right)\left(q-p\right)}{\delta}=\lim_{\delta\to0}\frac{f\left(q\right)-f\left(p\right)-\nabla f\left(p\right)\left(q-p\right)}{\delta}+\frac{\nabla f\left(p\right)\left(q-p\right)}{\delta}\)
Since \(f\) is differentiable, then \(\lim_{q\to p}\frac{f\left(q\right)-\left(f\left(p\right)+\nabla f\left(p\right)\left(q-p\right)\right)}{\left|\left|q-p\right|\right|} =0=\lim_{\delta\to0}\frac{f\left(q\right)-f\left(p\right)-\nabla f\left(p\right)\left(q-p\right)}{\delta}\)
And \(\lim_{\delta \to 0}\frac{\nabla f(p) \cdot (q - p)}{\delta}\) \(= \lim_{\delta \to 0} \frac{(\frac{\partial f}{\partial x}(p), \frac{\partial f}{\partial y}(p)) \cdot (x(t_0 + \delta) - x(t_0), y(t_0 + \delta) - y(t_0))}{\delta}\)
\(= \lim_{\delta \to 0} \frac{\frac{\partial f}{\partial x}(p)(x(t_0 + \delta) - x(t_0)) + \frac{\partial f}{\partial y}(p)(y(t_0 + \delta) - y(t_0))}{\delta}\) \(= \lim_{\delta \to 0} \left( \frac{\frac{\partial f}{\partial x}(p)(x(t_0 + \delta) - x(t_0))}{\delta} + \frac{\frac{\partial f}{\partial y}(p)(y(t_0 + \delta) - y(t_0))}{\delta} \right)\)
\(= \frac{\partial f}{\partial x}(p) \lim_{\delta \to 0} \frac{x(t_0 + \delta) - x(t_0)}{\delta} + \frac{\partial f}{\partial y}(p) \lim_{\delta \to 0} \frac{y(t_0 + \delta) - y(t_0)}{\delta} = \frac{\partial f}{\partial x}(p)x'(t_0) + \frac{\partial f}{\partial y}(p)y'(t_0)\)
Remark
Another ways of writing the equation above are
- \((f \circ \alpha)'(t_0) = \frac{\partial f}{\partial x}(x(t_0), y(t_0))x'(t_0) + \frac{\partial f}{\partial y}(x(t_0), y(t_0))y'(t_0)\)
- \((f \circ \alpha)'(t_0) = f_x(x(t_0), y(t_0))x'(t_0) + f_y(x(t_0), y(t_0))y'(t_0)\)
- \(\dot{(f \circ \alpha)}(t_{0}) = f_{x}(x(t_{0}), y(t_{0}))\dot{x}(t_{0}) + f_{y}( x(t_{0}),y (t_{0}))\dot{y}(t_{0})\)
- \(\displaystyle\frac{d(f \circ \alpha)}{dt}\Big|_{t=t_0}= \frac{\partial f}{\partial x}(x(t_{0}), y (t_{0}))\frac{dx}{dt}\Big|_{t=t_0}+ \frac{\partial f}{\partial y}(x(t_{0} ), y(t_{0})) \frac{dy}{dt}\Big|_{t=t_0}\)
- \((f \circ \alpha)'(t_{0}) = \nabla f(x(t_{0}), y(t_{0})) \cdot (x'(t_{0}), y'(t_{0} ))\) \(= \nabla f(x(t_0), y(t_0)) \cdot \alpha'(t_0)\)
Thus, for the equality of functions we write \((f \circ \alpha)' = \nabla f \cdot \alpha'\)
The following corollary is a generalization for more than one variable of the fact that a function with zero derivative has to be constant in an open interval. Here the open interval is replaced by an open and connected set.
Corollary
Let \(S \subset \mathbb{R}^2\) be a domain and let \(f: S \to \mathbb{R}\) be a differentiable function such that
Then \(f\) is constant in \(S\).
Proof
Since \(S\) is connected and open, then \(S\) is path connected
Actually, we may assume that there exists a diff. path \(\alpha: [0, 1] \to S\) such that \(\alpha(0) = p\), \(\alpha(1) = q\)
We want to prove that \(f\) is constant in \(S\) that is \(f(p) = f(q)\)
We take the composition \(g(t) = f \circ \alpha(t): [0, 1] \to \mathbb{R}\)
- \(g\) is diff.
- if \(g'(t) = 0 \implies g\) is constant
But \(g'(t) = \frac{\partial f}{\partial x}(t) x'(t) + \frac{\partial f}{\partial y}(t) y'(t)\) \(= 0\) by hypothesis
Then \(g(0)=f(p)=g(1)=f(q)\)
Higher order partial derivatives
Let \(f: S \to \mathbb{R}\) be a differentiable function on an open set \(S \subset \mathbb{R}^2\).
Then the partial derivatives define new functions \(\frac{\partial f}{\partial x}: S \to \mathbb{R}\) and \(\frac{\partial f}{\partial y}: S \to \mathbb{R}\)
One may wonder if these new functions are differentiable or not, and if there is a relation between them.
Let us look at some examples first.
Example
-
\(f(x,y) = x^2 + y^2\)
Since \(\frac{\partial f}{\partial x}(x,y) = 2x\) and \(\frac{\partial f}{\partial y}(x,y) = 2y\). Then
\(\frac{\partial}{\partial x}(\frac{\partial f}{\partial x}) = 2 = \frac{\partial^2 f}{\partial x^2} = 2\)
\(\frac{\partial}{\partial y}(\frac{\partial f}{\partial x}) = 0 = \frac{\partial^2 f}{\partial y \partial x} = 0\)
\(\frac{\partial}{\partial x}(\frac{\partial f}{\partial y}) = 0 = \frac{\partial^2 f}{\partial x \partial y} = 0\)
\(\frac{\partial}{\partial y}(\frac{\partial f}{\partial y}) = 2 = \frac{\partial^2 f}{\partial y^2} = 2\)
-
\(f(x,y) = \cos(xy) + x \cos(y)\)
Since \(\frac{\partial f}{\partial x} = -\sin(xy) \cdot y + \cos(y)\) and \(\frac{\partial f}{\partial y} = -\sin(xy) \cdot x - x \sin(y)\). Then
\(\frac{\partial^2 f}{\partial x^2} = -\cos(xy) \cdot y^2\)
\(\frac{\partial^2 f}{\partial y \partial x} = -\cos(xy) \cdot x \cdot y - \sin(xy) - \sin(y)\)
\(\frac{\partial^2 f}{\partial x \partial y} = -\cos(xy) y \cdot x - \sin(xy) - \sin(y)\)
\(\frac{\partial^2 f}{\partial^2 y} = -\cos(xy) \cdot x^2 - x \cos(y)\)
Theorem
Let \(S \subset \mathbb{R}^2\) be an open set and let \(f: S \to \mathbb{R}\) be a differentiable function. Assume that both \(\frac{\partial^2 f}{\partial y \partial x}\) and \(\frac{\partial^2 f}{\partial x \partial y}\) exist and are continuous. Then
Proof
Won't be asked
Integration of functions of two variables.
To introduce the idea of integrable functions of one variable we posed the problem of finding an area below a curve.
Now, if we want to use the same idea for functions in two variables, we observe first that the graph of a function \(f: \mathbb{R}^2 \to \mathbb{R}\) is a surface in \(\mathbb{R}^3\). So, we do not have an area below a curve, but a volume below a surface.
Question: How do we compute such a volume?
Let us now look at an example. Consider the function \(f(x, y) = x^2 + y^2\) and let us try to find the volume below the graph over the closed disk
\(\overline{B((0, 0), 2)}= \{(x, y) \in \mathbb{R}^{2}\mid x^{2}+ y^{2}\leq 4\}\)
Then \(\{y=0\}\cap\overline{B((0,0),2)}=\{x\in\mathbb{R}\mid x^{2}\leq4\}\), then Area\(\displaystyle=\int^{2}_{-2}x^{2}dx\)
If \(y=1,g(x)=x^2+1\), then \(\{y=1\}\cap\overline{B((0,0),2)}=\{x\in\mathbb{R}\mid x^{2}\leq3\}\), then Area\({\displaystyle=\int_{-\sqrt{3}}^{\sqrt{3}}x^2+1dx}\)
If \(y=c\), then \(g(x)=x^2+c^2\). Then \(\{y=c\}\cap\overline{B((0,0),2)}=\{\left(x,c\right)\in\mathbb{R}\mid x^{2}+c^{2} \leq4\}\)
\(=\{x\in \R:-\sqrt{4-c^2}\leq x\leq \sqrt{4-c^2}\}\). Then Area = \(\displaystyle\int^{\sqrt{4-c^{2}}}_{-\sqrt{4-c^{2}}}x^{2}+c^{2}dx\)
To sum infinite things, we take the integral \(\text{Vol}=\displaystyle\int_{2}^{2}\left(\int_{-\sqrt{4-c^{2}}}^{\sqrt{4-c^{2}}}x^2+c^2dx\right) dy\)
If the functions are nice enough, this should represent the volumn