1. More Multivariable Calculus:
Least Squares, ODEs and Local
Extrema, and Newton’s Method
Dr. Jeff Morgan
Department of Mathematics
University of Houston
jmorgan@math.uh.edu
2. Shameless Advertisement
• Houston Area Calculus Teachers
Association – http://www.HoustonACT.org
• Houston Area Teachers of Statistics –
http://www.HoustonATS.org
• Online practice AP Calculus and Statistics
Exams – April and May 2009. See the
links above.
• UH High School Mathematics Contest –
http://mathcontest.uh.edu
4. Linear Least Squares
Example 1: Consider the problem of finding a line that
fits the data:
x = 0 1 2 3 4 5 6 8 9 11 12 15
y = 1 2 4 3.5 5 4 7 9 12 17 22 29
Question: How can calculus be used to determine
how we should proceed?
5. The General Process
Consider the problem of finding a line that fits the data:
x = x1 x2 x3 … xn
y = y1 y2 y3 … yn
Question: How can calculus be used to determine
how we should proceed?
6. Solution to Example 1 in Excel
• Select ranges to write updated values.
• Use the commands transpose, mmult and
minverse and select the data that the
commands will act on.
• Press ctrl+shift+enter.
7. Quadratic Least Squares
Example 2: Consider the problem of finding a parabola
that fits the data:
x = 0 1 2 3 -1 -2 -3 -4
y = 1 3.5 11 22 3 9 18 35
Question: How can calculus be used to determine
how we should proceed?
8. The General Process
Consider the problem of finding a parabola that fits the
data:
x = x1 x2 x3 … xn
y = y1 y2 y3 … yn
Question: How can calculus be used to determine
how we should proceed?
9. Solution to Example 2 in Excel
• Select ranges to write updated values.
• Use the commands transpose, mmult and
minverse and select the data that the
commands will act on.
• Press ctrl+shift+enter.
10. Displacement
(meters)
Force
(Newtons)
.01 .21
.02 .42
.03 .63
.05 .83
.06 1.0
.08 1.3
.10 1.5
.13 1.7
.16 1.9
.18 2.1
.21 2.3
.25 2.5
A rubber band is stretched and some
data is recorded relating force to
displacement. Determine whether this
data is best approximated using a linear,
quadratic or logarithmic least squares fit.
Note:
The logarithmic form is
ln 1 .
y a b x
Example 3:
11. Chain Rule, Directional Derivatives,
Gradients and Differential Equations
• Extending the one dimensional chain rule.
• Directional derivatives and their relation to the
gradient.
• Level sets and their relation to the gradient.
• Using ODEs to help sketch level sets in two
dimensions.
• Classifying the behavior of the gradient near
critical points.
• Using ODEs to find local extrema.
12.
4 4
Describe the level sets of
( , ) 4 5 sin 1.
f x y x y x y xy
Example 4:
(Illustration with Winplot Implicit Plots)
13.
4 4
Use the gradient descent method to approximate the minimum
value of
( , ) 4 5 sin 1
1 1
starting from a guess of , .
2 2
f x y x y x y xy
Example 5:
14. Question: How can we related this to
differential equations?
(Illustration with Winplot and Polking’s Java)
15. 4 4
Describe the level sets of
( , ) 4 5 10sin( ) 1.
f x y x y x y xy
Example 6:
(Illustration with both implicit plots and ODEs)
16. 4 4
Use differential equations to approximate the minimum
value of
( , ) 4 5 10sin( ) 1
1 1
starting from a guess of , .
2 2
f x y x y x y xy
Example 7:
(Illustration with Winplot and Polking’s Java)
18. 4 4
Use Newton's method to approximate the critical
values of ( , ) 4 5 10sin( ) 1.
f x y x y x y xy
Example 8:
(Illustration with Winplot and Excel)