Unformatted text preview:

18 02A Topic 28 Max min problems least squares Author Jeremy Orloff Read TB 19 7 SN LS Standard calculus question Given z f x y where are the relative maxima and minima Answer At the points where f h0 0i 0 and f 0 I e f x y Critical points Such points are called critical points Example z x2 y 2 z h2x 2yi only critical point is 0 0 Clearly a minimum Example z x2 y 2 z h 2x 2yi only critical point is 0 0 Clearly a maximum Example z y 2 x2 z h 2x 2yi only critical point is 0 0 Clearly neither maximum or minimum Critical point horizontal tangent plane Equation of tangent plane at x0 y0 z0 z0 f x0 y0 is z z0 f x x0 y0 x x0 f y x0 y0 y y0 At a critical point this becomes z z0 0 horizontal plane Example Making a box Sides double thick bottom triple thick no top volume 3 What dimensions use the least amount of cardboard Area of one side yz two sides double thick cardboard used 4yz Area front and back xz single thick cardboard used 2xz Area bottom xy triple thick cardboard used 3xy Total cardboard used w 4yz 2xz 3xy 3 Volume 3 xyz z xy w 12 y6 3xy x Critical points wx x122 3y 0 wy y62 3x 0 wx 0 y x42 6 4 wy 0 16 x 3x 0 x 2 y 1 z 3 2 Clearly a minimum physically we know it must have a minimum somewhere it can t be on the boundary axes because w is infinite there only critical point must be a minimum continued 1 18 02A topic 28 2 Least squares You should read LS in the notes Start with data points x1 y1 x2 y2 xn yn Try to fit a line y ax b to the data X The squared error sum is E a b yi axi b 2 i The least squares fit is the line that minimizes E To find the minimum we set E 0 and E 0 a b X X E 2xi yi axi b 2 ax2i bxi xi yi 0 a i X E X 2xi yi axi b 2 axi b yi 0 b i This gives the least squares equations for a line X X X a x2i b xi xi y i i i i X X a xi b n yi i Example Use least squares to fit a line to the following data 0 1 2 1 3 4 answer In our case x1 y1 1 1 x2 y2 2 1 and x3 y3 3 4 P 2 P P P xi 13 xi 5 n 3 xi yi 14 yi 6 13a 5b 14 5a 3b 6 a 6 7 and b 4 7 The least squares line has equation y 76 x 74 Example For the same points as above use least squares to fit a parabola answer A parabola has the formula y ax2 bx c X Squared error E a b c yi ax2i bxi c 2 The least squares fit minimizes E E E a X X X X b 4 3 2 2 a x b x c x x yi X i X i X i X i 3 2 a x b x c xi xi y i X i X i X a x2i b xi c n yi E c 0 Plugging in our points P 4 P 3 P 2 P xi 97 xi 35 xi 13 xi 5 n 3 P 2 P P xi yi 40 xi yi 14 yi 6 97a 35b 13c 40 35a 13b 5c 14 13a 5b 3c 6 Solving a 1 b 2 c 1 The least squares parabola has equation y x2 2x 1 Note for 3 points the fit is perfect y x Least squares and parabola line


View Full Document

MIT 18 02 - LECTURE NOTES

Documents in this Course
Vectors

Vectors

1 pages

Exam 1

Exam 1

2 pages

Load more
Loading Unlocking...
Login

Join to view LECTURE NOTES and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view LECTURE NOTES and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?