Multivariate Calculus
&
Ordinary Differential Equations

Lecture 18



2 Functions of Several Variables

2.1 Introduction

From MATH1051 or earlier mathematics courses, you should be familiar with functions $f$ of one variable. The tools of calculus were useful because you could:

  • Sketch the graph $y=f(x)$ of $f.$
  • Find the minima and maxima of $f.$
  • Analyse the slope of $f$ by calculating $f'.$
  • Find approximations of $f$ using Taylor series.
  • Find solutions to $f(x)=0.$



2 Functions of Several Variables

2.1 Introduction








In this module of MATH1052, we shall undertake these same basic ideas, but in the framework of functions of several variables (multivariate functions). Most of the theory for this section is covered in Stewart, Chapter 14.


2 Functions of Several Variables

2.1 Introduction

In this module of MATH1052, we shall undertake these same basic ideas, but in the framework of functions of several variables (multivariate functions). Most of the theory for this section is covered in Stewart, Chapter 14.

Many familiar formulae are essentially just functions of more than one variable.

For example, the volume $V$ of a box is a function of its width, height and depth: $\,V(w,h,d)=whd,\,$ and the profile of a guitar string is a function of time and position along the string: $\,f(x,t)=A\sin (\alpha x) \cos (\beta t).$




2 Functions of Several Variables

For example, the volume $V$ of a box is a function of its width, height and depth: $\,V(w,h,d)=whd,\,$ and the profile of a guitar string is a function of time and position along the string: $\,f(x,t)=A\sin (\alpha x) \cos (\beta t).$


2 Functions of Several Variables

2.1.1 Visualising functions

Consider the volume of a cylinder as a function of two variables:

$\ds V(r,\ell) = \pi r^2 \ell.$

A first method of visualising this function is to plot $V$ for fixed $\ell$ and varying $r$.





2 Functions of Several Variables

2.1.1 Visualising functions

Consider the volume of a cylinder as a function of two variables:

$\ds V(r,\ell) = \pi r^2 \ell.$

A first method of visualising this function is to plot $V$ for fixed $\ell$ and varying $r$.

$\ds \ell =0$ $\ds \Ra V = 0 $

$\ds \ell =1$ $\ds \Ra V = \pi r^2 $

$\ds \ell =2$ $\ds \Ra V = 2\pi r^2$

$\ds \ell =3$ $\ds \Ra V = 3\pi r^2 $





2 Functions of Several Variables

Using Matlab, the ezplot function is the simplest graphing aid:


							ezplot('pi * r^2 * 1', [0,5])
							hold on; ezplot('pi * r^2 * 2', [0,5])
							hold on; ezplot('pi * r^2 * 0.5', [0,5])
						



2 Functions of Several Variables

Alternatively, we could keep $r$ fixed and plot $V$ as a function of $\ell$:


							ezplot('pi * 1^2 * l', [0,5])
							hold on; ezplot('pi * 0.5^2 * l', [0,5])
							hold on; ezplot('pi * 2^2 * l', [0,5])
						



2 Functions of Several Variables

2.1.1 Visualising functions

Better still is visualising the surface by sketching the graph of $z=f(x,y)$. In Matlab, the ezsurf function will prove to be our quickest tool:


							ezsurf('pi * r^2 * l', [0,4,0,4])
						






2 Functions of Several Variables


							ezsurf('pi * r^2 * l', [0,4,0,4])
						



2 Functions of Several Variables

2.1.1 Visualising functions

In Matlab we can plot contour lines for the volume function using the ezcontour function:


							ezcontour('p i* r^2 * l', [0,2,0,2])
						

Using these tools, you should be able to replicate the plots in Stewart, Section 14.1.

We shall start the course by looking at quadratic functions of two variables. These have contours which are circles, ellipses, parabolas or hyperbolas.



1 Ordinary Differential Equations

2.1.2 Main points

  • What is a function of several variables and why are they useful?
  • Methods to visualise a function of two variables.
  • Matlab commands ezplot, ezsurf and ezcontour.




2 Functions of Several Variables

2.2 Conic Sections

The goal of this section is for you to become an expert in graphing parabolas, circles, ellipses and hyperbolas (without use of a graphics calculator, of course). The key-trick to this is "completing the square". See also Stewart, Section 10.5.

2.2.1 Parabolas

Example: Sketch the following parabolas:

$y=x^2, \; y=x^2+3, \; y=(x+2)^2, $

$y=2x^2, \; y=2(x+2)^2+3.$



2 Functions of Several Variables

2.2.1 Parabolas

Example: Sketch the following parabolas:

$y=x^2, \; y=x^2+3, \; y=(x+2)^2, $ $\;y=2x^2, \; y=2(x+2)^2+3.$













2 Functions of Several Variables

2.2.1 Parabolas

Putting a quadratic $y=ax^2+bx+c$ in the form

$y=a(x-h)^2+k,$

is called completing the square.


Question: What is the interpretation of the point $(h,k)$?





2 Functions of Several Variables

2.2.1 Parabolas

Putting a quadratic $y=ax^2+bx+c$ in the form $y=a(x-h)^2+k,$ is called completing the square.

Question: What is the interpretation of the point $(h,k)$?

1. $\,(h,k)$ is the "base" or the "tip"

2. $\,x=h$ is an axis of
symmetry for the parabola








2 Functions of Several Variables

2.2.1 Parabolas

Completing the square makes use of the identity

$x^2+2xh+h^2=(x+h)^2.$








2 Functions of Several Variables

2.2.1 Parabolas

Example: Sketch the parabola $y = x^2 + 6x + 8.$

Complete the square:

$ y = \left(x^2+ 6x\right)+ 8$ $ = \left(\left(x+3\right)^2-9\right)+ 8$

$ \quad = \left(x+3\right)^2-1$

For $\, y=0$ $\, \Ra (x+3)^2=1$

$\Ra x+3 = \pm 1$ $\, \Ra x= \pm 1 -3$

$\, \Ra x = -4, -2.$

For $\, x=0$ $\, \Ra y = 8 .$




2 Functions of Several Variables

2.2.1 Parabolas

Example: Sketch the parabola $y =- 3x^2-6x+1.$

Complete the square:

$ y = -3\left( x^2+2x\right) +1$ $ = -3\left(\left(x+1\right)^2 - 1\right) +1$

$ \quad = -3\left(x+1\right)^2 + 4 $

For $\, y=0$ $\, \Ra 3\left(x+1\right)^2 = 4 $

$\Ra \left(x+1\right)^2= \dfrac{4}{3}$ $\, \Ra x+1 = \pm \dfrac{2}{\sqrt{3}}$

$\, \Ra x = -1 \pm \dfrac{2}{\sqrt{3}}.\;$ For $\, x=0$ $\, \Ra y = 1 .$



2 Functions of Several Variables

2.2.1 Parabolas

Example: Prove the quadratic formula. In other words, given $ax^2 +bx+c=0,$ by completing the square, show that

$\ds x=\frac{-b \pm \sqrt{b^2-4ac}}{2a}.$

Let $a\neq 0$ $\, \Ra \ds x^2+ \frac{b}{a}x+ \frac{c}{a}=0$

$\ds \Ra \left(x^2+ \frac{b}{a}x\right)+ \frac{c}{a}= 0 $

$ \iff \ds \left( \left(x+ \frac{b}{2a}\right)^2 -\frac{b^2}{4a^2}\right)+ \frac{c}{a}= 0 $



2 Functions of Several Variables

2.2.1 Parabolas

Let $a\neq 0$ $\, \Ra \ds x^2+ \frac{b}{a}x+ \frac{c}{a}=0$

$\ds \Ra \left(x^2+ \frac{b}{a}x\right)+ \frac{c}{a}= 0 $

$ \iff \ds \left( \left(x+ \frac{b}{2a}\right)^2 -\frac{b^2}{4a^2}\right)+ \frac{c}{a}= 0 $

$\; \ds \Ra \left(x+ \frac{b}{2a}\right)^2 = \frac{b^2}{4a^2} -\frac{c}{a} $ $\ds = \frac{ab^2-4a^2c}{4a^3} $ $\ds = \frac{b^2-4ac}{4a^2} $



2 Functions of Several Variables

2.2.1 Parabolas

Let $a\neq 0$ $\, \Ra \ds x^2+ \frac{b}{a}x+ \frac{c}{a}=0$

$\quad \ds \Ra \left(x+ \frac{b}{2a}\right)^2 $ $\ds = \frac{b^2-4ac}{4a^2} $

$\quad \ds \Ra x+ \frac{b}{2a} $ $\ds = \pm \sqrt{\frac{b^2-4ac}{4a^2} } $ $\ds = \pm \frac{\sqrt{b^2-4ac}}{2a} $

$\quad \ds \Ra x = -\frac{b}{2a}\pm \frac{\sqrt{b^2-4ac}}{2a} $ $ \ds = \frac{-b\pm \sqrt{b^2-4ac} }{2a}$



2 Functions of Several Variables

2.2.1 Parabolas

Parabolas, circles, ellipses and hyperbolas are all examples of conic sections; they all arise by intersecting a double cone such as $z^2=x^2+y^2$, with a plane $z=-ex-dy+l.$

See the diagrams in Stewart p. 714 (p. 694). Slice an upright cone horizontally and you get a circle. Tip your knife a bit (with a gradient of magnitude less than $1$) and you will get an ellipse. Keep tipping ($|\text{gradient}|=1$), and you will get a parabola. Continue tipping ($|\text{gradient}|>1$), and you will cut out an hyperbola.



Conics sections




2 Functions of Several Variables

2.2.1 Parabolas

Formally then, the general equation for a conic is given by the formula,

$(l-ex-dy)^2=x^2+y^2,$

with a focus at the origin.





Brief historical note 🤓

The ancient greeks started with the study of Conics more than 2300 years ago. 🤯

The Greek text of Conics, written by Apollonius of Perga (c.240 BC - c.190 BC):

Pages from the 9th century Arabic translation of the Conics. Source: Bodleian Library





The beauty of mathematics shows itself to patient followers.

Maryam Mirzakhani

All conics as envelopes of families of straight lines.


Credits