18.02 Problem Set 4
Due Thursday 10/2/08, 12:45 pm in 2106.
Part A
(15 points)
Hand in the underlined
problems only; the others are for more practice.
Lecture 10. Thu Sept. 25
Maxima and minima. Least squares.
Read: 13.5 pp. 878–881, 884–885; Notes LS
Work: 2F/ 1a
b, 2
; 2G/ 1a
b, 4
.
Lecture 11. Fri Sept. 26
Second derivative test. Boundaries and infinity.
Read: 13.10 through the top of p. 930; Notes SD.
Work: 2H/ 1ac
, 3
, 4
, 6
; 13.10/ 32.
Lecture 12. Tue Sept. 30
Differentials. Chain rule.
Read: 13.6 pp. 889–892
†
; 13.7.
Work *: 2C/ 1a
bcd
, 2
, 3
, 5ab
; 2E/ 1abc
, 2bc
, 5, 8a
b.
†
Warning:
Don’t mix differentials like
df
with differences like
Δ
x
and
Δ
y
. For instance,
equations (5), (7), (9) do not make sense. Instead, use (6), (8), (10).
*
Some of the problems are written so as to depend on the notation for gradient. Look ahead
at the definition of gradient in 13.8 (top of p. 910) to know what it is before you do them.
Part B
(26 points)
Directions:
Attempt to solve
each part
of each problem yourself. If you collaborate,
solutions must be written up independently. It is illegal to consult materials from previous
semesters. With each problem is the day it can be done.
Write the names of all the people you consulted or with whom you collabo
rated and the resources you used.
Problem 1.
(Thursday, 11 points: 2+0+3+2+3+1) – Least squares and data analysis.
Parts (b)(f) of this problem involve the use of Matlab.
You may optionally use any
other software with similar features, or even a calculator. In that case, indicate what you
used, and describe how you proceeded. You must carry out the actual calculations rather
than rely on the statistical functions that may be built into the software you are using.
a) Before going to the terminal, read Notes LS and do the following. Consider the row
vectors
x
= [
x
1
x
2
. . . x
n
],
y
= [
y
1
y
2
. . . y
n
] and
u
= [1 1
. . .
1] (
n
ones). Let
y
=
ax
+
b
be the bestfitting line for the
n
points (
x
i
, y
i
). Translate the formula (4) in LS into a single
2
×
2 matrix equation
A
z
=
r
,
z
=
bracketleftbigg
a
b
bracketrightbigg
Write the entries of
A
and
r
in Matlabready form. Don’t use summations, instead use, for
example,
x
*
u
′
for
∑
x
i
.
You will be able to confirm that your formulas are correct by
testing them on a concrete example using Matlab in part (c).
This preview has intentionally blurred sections. Sign up to view the full version.
View Full Document
This is the end of the preview.
Sign up
to
access the rest of the document.
 Fall '08
 Auroux
 matlab, Least Squares

Click to edit the document details