# Introduction to Multi-variable Calculus (1)

This post contains some typical problems for multi-variable calculus. Throughout them, sufficient regularity is always presumed.

## Topic 1. Parametric and Polar Curves

Denote a parametric curve as $x = x(t), y=y(t)$. One can calculate the slopes of its tangent lines via chain rule.

### Example 1:

Let $x(t) = \cos(t) + 1$, $y(t) = t^2$. Then for $\forall t_0$, the slope of its tangent line at the point $( x(t_0), y(t_0) )$ is:

$$\frac{dy}{dx} (t_0) = \frac{dy}{dt}(t_0) \left[ \frac{dx}{dt}(t_0) \right] ^{-1} = -\frac{2t_0}{ \sin(t_0) }$$

If the curve is parametrized with the angle or argument $\theta$ in polar coordinate, i.e.,

$$r = f(\theta).$$

One can calculate the curve’s enclose area via formula

$$S = \int_{\theta_1}^{\theta_2} \frac{1}{2} r^2(\theta) d\theta .$$

### Example 2:

Let $r(\theta) = 2 \cos 2\theta$. It encloses a four-petal region. The area of half of a petal is

$$A = \int_{0}^{\frac{\pi}{4}} \frac{1}{2} (2 \cos 2\theta)^2 d\theta = \frac{\pi}{4}.$$

Thus the area of whole region is $S = 8A = 2\pi$.

Here is an animation showing the growth of petals as $\theta$ goes from $0$ to $2\pi$.

Growth of petals. By JxW.

## Topic 2. Vectors and Vector-Valued Functions

Denote $\mathbf{u}$, $\mathbf{v}$ as vectors in 2- or 3-dimensional Euclidean space. Then:

• $\mathbf{u}$ and $\mathbf{u}$ are orthogonal iff $\mathbf{u} \cdot \mathbf{v} = 0$, i.e., the orthogonal projection of one vector on the other has zero norm.
• $\mathbf{u}$ and $\mathbf{u}$ are parallel iff $|\mathbf{u} \times \mathbf{v}| = 0$, i.e., the parallelogram generated by the two vectors has zero area.

More generally, denote $\phi$ as the angle between $\mathbf{u}$ and $\mathbf{v}$, we have:

• $\mathbf{u} \cdot \mathbf{v} = |\mathbf{u}||\mathbf{v}| \cos \phi.$ Example: Work = Force $\cdot$ Displacement.
• $|\mathbf{u} \times \mathbf{v}| = |\mathbf{u}||\mathbf{v}| \sin \phi.$ Example: Torque = Force $\times$ Position.

Substitute $\mathbf{u} = \mathbf{v}$ into the relations above, we have:

• $\mathbf{u} \cdot \mathbf{u} = |\mathbf{u}|^2.$
• $|\mathbf{u} \times \mathbf{u}| = 0.$

Cross product of two vectors is a vector whose direction obeys the right-hand rule. Let $\mathbf{i}$, $\mathbf{j}$ and $\mathbf{k}$ be the coordinate unit vectors of 3-dimensional Euclidean space. Then conventionally

$$\mathbf{i} \cdot \mathbf{j} = 0, \quad \mathbf{j} \cdot \mathbf{k} = 0, \quad \mathbf{k} \cdot \mathbf{i} = 0.$$

And

$$\mathbf{i} \times \mathbf{j} = \mathbf{k}, \quad \mathbf{j} \times \mathbf{k} = \mathbf{i}, \quad \mathbf{k} \times \mathbf{i} = \mathbf{j}.$$

### Example 1:

Compute the area of the triangle enclosed by connecting three points: $O(0,0,0), P(2,3,4), Q(3,2,0)$.

The area is $$\frac{1}{2}|(2,3,4) \times (3,2,0)| = \frac{1}{2} \left| \begin{bmatrix} \mathbf{i} & \mathbf{j}& \mathbf{k} \\ 2 & 3 & 4 \\ 3 & 2 & 0 \end{bmatrix}\right| = \frac{\sqrt{233}}{2}.$$

Now, using the vector notation $\mathbf{r} = (x,y)$ in 2d, or $\mathbf{r} = (x,y,z)$ in 3d, a parametric curve can be written in a unified notation $\mathbf{r} = \mathbf{r}(t)$.

Interpreting the parameter $t$ as “time”, the curve defines a motion in space; mathematically, it is called a vector-valued function. Given any time $t$, this function provides information about the underlying motion:

• $\mathbf{r}(t)$: The position in space.
• $\mathbf{r}'(t)$: The speed, (both magnitude and direction).
• $\mathbf{r}''(t)$: The acceleration, (also both magnitude and direction).

The length traveled between two points $t=t_1$ and $t=t_2$ along the curve can be calculated by integrating the velocity magnitude along the curve.

### Example 2:

A helical path $$\mathbf{r}(t) = (250 \cos t, 250 \sin t, 100t), \quad t \in [0,10].$$

The length is $$S = \int_0^{10} |\mathbf{r}'(t)| dt = \int_0^{10} 269 dt = 2690.$$

Fixing a point on the curve $\mathbf{r}(a)$, one can define the arc length function

$$S(t) = \int_a^{t} |\mathbf{r}'(\tau)| d\tau.$$

By a change of variable, this arc length function can also be used to parametrize the curve

$$\mathbf{r}(t) = \mathbf{r}( S^{-1}(s) ).$$

In this case, the parameter $s$ is called arc-length parameter. For lines with equation

$$\mathbf{r}(t) = \mathbf{u} + t \mathbf{v},$$

this change of variable is simply rescaling $\mathbf{v}$ to a unit vector, yielding

$$\mathbf{r}(s) = \mathbf{u} + \frac{s}{|\mathbf{v}|} \mathbf{v},$$

Normally, the motion speed changes in both magnitude and direction; however, with arc-length parametrization, only the direction changes. In this case, the acceleration $\mathbf{r}''(s)$ is directly tied to the curve’s properties:

• Its magnitude $\kappa(s) = |\mathbf{r}''(s)|$ is called curvature, which measures the “turn rate” of the curve.
• Its direction $\mathbf{N} = \frac{1}{\kappa(s)}\mathbf{r}''(s)$ is called principal unit normal vector, pointing towards the “inside” of the turns.

For general parametrization, the curvature can be calculated using the following formula:

$$\kappa(t) = \frac{|\mathbf{r}'(t)\times \mathbf{r}”(t)|}{|\mathbf{r}'(t)|^3}$$

## Topic 3. Functions of Several Variables

A function of $m$ variables parametrizes an $m$-dimensional geometric object. For example, a function of one variable $\mathbf{r} = \mathbf{r}(t)$ parametrizes a curve; similarly, a function of two variables parametrizes a surface $\mathbf{r} = \mathbf{r}(s,t)$.

Alternatively, $k$ equations in $n$-dimensional space defines a $(n-k)$-dimensional object (co-dimension $k$). For example, one equation $f(x) = c$ defines a point in 1-dimensional space (“level point”). The same number of equations $f(x,y) = c$ define a curve in 2-dimensional space (“level curve“), and $f(x,y,z) = c$ a surface in 3-dimensional space (“level surface”).

### Example 1:

Rewrite the plane $$ax+by+cz + d=0$$ into so-called Hessian normal form $$\mathbf{\hat{n}} \cdot \mathbf{r} = -p$$ where $\mathbf{\hat{n}}$ is the unit normal vector and $p$ is the distance of the plane from the origin.

One normal vector is simply $(a,b,c)$, so we can let $$\mathbf{\hat{n}} = (a/l, b/l, c/l)$$ where $l = \sqrt{a^2+b^2+c^2}$. Then $$p = d/l$$.

Remark: The Hessian normal form is especially convenient to calculate point-plane distance: $$D = \mathbf{\hat{n}} \cdot \mathbf{r} + p$$

The graph of a function is drawn by putting together all its possible input-output pairs (a direct product). For example, drawing the graph of the function $f(x,y) = 2x+3y-12$ is equivalent to drawing the graph of equation $z=2x+3y-12$, or the zero-level surface of the function $g(x,y,z)=2x+3y-12-z$.

Typical methods of drawing function graphs by hand:

• Look for symmetry properties, e.g., is the function symmetric with respect to $x$ axis?
• Look for intercepts and asymptotes by letting independent variables go to zero or infinity.
• Study its derivatives (to look for monotonicity, convexity).
• Change of coordinate, e.g. changing to polar coordinate may simplify the function and make rotational symmetry properties easier to be seen.
• Plug in numerical values (last resort, always works with sufficient effort).

The notion of limit and continuity for functions of several variables is directly generalized from that of single variable functions, inheriting most of its properties (sum, difference, product, quotient, composite, etc.). One subtle difference, however, is that in 1d, there are only two directions where a point can be approached; but the number is infinite in 2d or higher. A procedure called two-path test is thus often used to show the nonexistence of limits.

### Example 2:

Show that $$\lim_{(x,y)\longrightarrow (0,0)} \frac{(x+y)^2}{x^2+y^2}$$ does not exist.

Let $(x,y)\longrightarrow (0,0)$ along a straight line with constant slope $m$, i.e., $y=mx$. Then $$\lim_{(x,mx)\longrightarrow (0,0)} \frac{(x+mx)^2}{x^2+(mx)^2} = \frac{(1+m)^2}{1+m^2}$$ which depends on the direction $m$. Therefore, the limit does NOT exist.

Remark: If $(x,y)\longrightarrow (0,0)$ along the axis $x=0$ or $y=0$, the limit are all equal to $1$. So the fact that the limit exists in all coordinate directions does not imply existence of the limit.