Share
Embed
Annual Pro sale · Save $30
Have presentations of your own?
Share with private links, password protection, and more control over your work.
Transcript
46 slides
-
Geometry Mechanics Analysis Multivariable Optimization Intro From Euclid to Lagrange
Geometry · the lever · calculus · partial derivatives · Lagrange multipliers Euclid → Lagrange -
Lecture Geometry Mechanics Analysis Multivariable Optimization Intro Lecture goals Follow
one thread from Euclid’s common notions and parallel postulate, and Archimedes’ lever, to calculus, partial derivatives and Lagrange multipliers. ✓ ✓ See the big picture Compute it yourself equality → change → Work the examples by hand optimization -
Lecture Geometry Mechanics Analysis Multivariable Optimization Intro Roadmap: five chapters
Newton and Leibniz Euclid’s Elements Newton 1666 / Leibniz 1684 Derivative, integral, fundamental theorem Common notions, parallel postulate Ch. 2 Mechanics Ch. 1 Geometry c. 287–212 BC Law of the lever, exhaustion 1736–1813 Multipliers ∇f = λ∇g Ch. 4 Multivariable Ch. 3 Analysis Archimedes Lagrange Partial derivatives and gradient Ch. 5 Optimization Several variables, total differential [Note] Dates from MacTutor (Newton: tract on fluxions, October 1666; Leibniz: “Nova methodus,” 1684) -
Lecture Geometry Mechanics Analysis Multivariable Optimization Ch. 1 Geometry Chapter
1 — Euclid’s Elements: common notions and the parallel postulate Euclid → Lagrange -
Lecture Geometry Mechanics Analysis Multivariable Ch. 1 Optimization The five
Common Notions Book I: 23 definitions, 5 postulates, 5 common notions, 48 propositions. The common notions govern equality and order of magnitudes (length, area, volume). Common Notion 1 Common Notion 2 Common Notion 3 Common Notion 4 Common Notion 5 Things which equal If equals are added to If equals are Things which coincide The whole is greater the same thing also equals, then the subtracted from with one another than the part. equal one another. wholes are equal. equals, then the equal one another. remainders are equal. -
Lecture Geometry Mechanics Analysis Checking the common notions with numbers
Multivariable Optimization Ch. 1 Equals added to equals a b Start from lengths a = b = 5, then add (Common 5+3=8 → 8=8 Notion 2) or subtract (Common Notion 3) the same amount on both sides. The results are still equal. 5=5 8=8 3=3 Start: a = b = 5 Add: +3 Subtract: −2 Equals subtracted from equals a b 5−2=3 → 3=3 1 tick = length 1 / gold: amount added / outline only: amount removed -
Lecture Geometry Mechanics Analysis Multivariable Optimization “ Postulate 5 (the
parallel postulate) “That, if a straight line falling on two straight lines makes the interior angles on the same side less than two right angles, the two straight lines, if produced indefinitely, meet on that side on which are the angles less than the two right angles.” Euclid, Elements I — Heath translation Contrapositive: angles summing to two right angles → the lines never meet (parallel) → unique parallels, similar-triangle ratios “ Ch. 1 -
Lecture Geometry Mechanics Analysis From parallels to an angle sum
of 180° Multivariable Optimization Ch. 1 Proposition I.32 e.g. 50° + 60° + 70° = 180°. Draw a parallel through the apex: alternate angles give A + C + B = 180°. -
Lecture Geometry Mechanics Analysis Multivariable Optimization Ch. 1 Similarity: corresponding
sides in equal ratio Idea The parallel postulate implies that corresponding sides of similar triangles are in equal ratio. Same shape means every side is scaled by the same factor k. Example Small triangle: 3, 4, 5. The large one has base 8 → k = 8 ÷ 4 = 2. Other sides: 3 × 2 = 6, 5 × 2 = 10 → 6, 8, 10. 3-4-5 is a right triangle (3² + 4² = 5²). With k = 2, 6-8-10 is a right triangle too. -
Lecture Geometry Mechanics Analysis Multivariable Optimization Ch. 1 Example: a
tree’s height from its shadow Use the ratio of the two shadows to find a height we cannot measure directly (an application of similarity). 1 2 3 4 Observe Spot similarity Set up a ratio Solve 1.5 m pole: shadow 2.0 m Sunlight is parallel, so the 1.5 : 2.0 = h : 12.0 h = 1.5 × 12.0 ÷ 2.0 Tree’s shadow = 12.0 m pole and tree triangles are similar. = 9.0 m -
Lecture Geometry Mechanics Analysis Multivariable Optimization Ch. 2 Mechanics Chapter
2 — Archimedes: the law of the lever and the center of mass Archimedes (c. 287–212 BC, Syracuse) On Plane Equilibriums — basic principles of mechanics by geometric methods Euclid → Lagrange -
Lecture Geometry Mechanics Analysis Multivariable ✓ Optimization Ch. 2 Example
Place m₁ = 3 kg at x₁ = 2.0 m. The mass m₂ that balances at x₂ = 1.5 m is ₂ m = 3 × 2.0 ÷ 1.5 = 4.0 kg ✓ Law of the lever m₁x₁ = m₂x₂ Moment 3 × 2.0 = 6.0, 4.0 × 1.5 = 6.0 The moments on both sides are equal (6.0 = 6.0), so the lever balances. -
Lecture Geometry Mechanics Analysis With signed lengths right. m₁x₁ =
m₂x₂ is the same as Σmᵢxᵢ = 0. x₁ = −2.0 0 Optimization Σ mᵢ xᵢ = 0 General form xᵢ is a signed length: negative left of the fulcrum, positive to the 3 kg Multivariable 4 kg 3 · (−2.0) + 4 · 1.5 = −6.0 + 6.0 x₂ = +1.5 Center of mass = fulcrum Moments: 3 · (−2.0) = −6.0, 4 · 1.5 = +6.0 → sum is 0 =0 If Σmᵢxᵢ = 0, the center of mass coincides with the fulcrum and the lever balances. Ch. 2 -
Lecture Geometry Mechanics Analysis Multivariable Ch. 2 Optimization Center of
mass of several weights Check about x̄ Σ mᵢ(xᵢ − x̄ ) =0 balances with the fulcrum at x̄ Total mass M = 2 + 3 + 5 = 10 kg Sum of moments Σ m x 2·0 + 3·2.0 + 5·4.0 = 26.0 Center of mass x̄ x̄ = 26.0 ÷ 10 = 2.6 m -
Lecture Geometry Mechanics Analysis Multivariable Optimization Ch. 2 Method of
exhaustion: a parabolic segment Archimedes, Quadrature of the Parabola Inscribe a triangle T = 1 in the segment bounded by y = x² and y = 1. At each stage, the triangles added have 1/4 the area of the previous stage. Segment = T(1 + 1/4 + 1/16 + …) = 4/3 · T = 4/3 -
Geometry Mechanics Analysis Multivariable Optimization A geometric series approaching 4/3
up to k = 0 up to k = 1 up to k = 2 1 1.000000 1 + 1/4 1.250000 1 + 1/4 + 1/16 1.312500 up to k = 3 up to k = 4 up to k = 5 … + 1/64 … + 1/256 … + 1/1024 1.328125 1.332031 1 + 1/4 + 1/16 + … = 1 / (1 − 1/4) = 4/3 1.333008 Ch. 2 -
Geometry Mechanics Analysis Multivariable Optimization Chapter 3 Analysis Derivatives (instantaneous
rates of change) and integrals (sums), unified by the fundamental theorem. Newton 1666 / Leibniz 1684 Systematized by Newton and Leibniz in the 17th century f′(x) ∫ f(x) dx Ch. 3 -
Lecture Geometry Mechanics Analysis Multivariable Optimization Ch. 3 Derivative: from
secant to tangent ✓ Definition f′(x) = lim (h→0) [f(x+h) − f(x)] / h Slope of the tangent; instantaneous velocity ✓ Example f(x) = x², x = 1 h = 1, 0.1, 0.01, 0.001 → slopes 3, 2.1, 2.01, 2.001 ((1+h)² − 1)/h = 2 + h → f′(1) = 2 Tangent: y = 2x − 1 As h → 0, secant slope → tangent slope 2 -
Lecture Geometry Mechanics Analysis Multivariable Optimization Ch. 3 Basic rules
of differentiation 1 Power rule d/dx xⁿ = n xⁿ⁻¹ e.g. (x³)′ = 3x², (x⁵)′ = 5x⁴ 2 3 d/dx d/dx sin x = cos x e.g. (sin x)′ = cos x (uv)′ = u′v + uv′ e.g. (x² sin x)′ = 2x sin x + x² cos x 4 Sine Combine all four Product rule Chain rule (f(g(x)))′ = f′(g(x)) g′(x) e.g. (sin x²)′ = 2x cos x² -
Lecture Geometry Mechanics Analysis Multivariable Optimization Ch. 3 Worked examples:
using the rules Product rule Chain rule Velocity (x²(3x+1))′ ((3x+1)⁵)′ s(t) = 5t² (m) = 2x(3x+1) + x² · 3 = 5(3x+1)⁴ · 3 v(t) = s′(t) = 10t = 9x² + 2x = 15(3x+1)⁴ x = 1 → 11 x = 0 → 15 v(3) = 30 m/s -
Lecture Geometry Mechanics Analysis Multivariable Optimization Ch. 3 Exercise 1:
differentiation Differentiate using the power, sine and chain rules (new problems, not the examples on slide 19). Problems Answers (1) (x³ + 2x)′ and its value at x = 2 (1) 3x² + 2 → 14 (2) (sin 3x)′ (2) 3 cos 3x (3) ((x² + 1)⁴)′ and its value at x = 1 (3) 8x(x² + 1)³ → 64 -
Lecture Geometry Mechanics Analysis Multivariable Optimization Ch. 3 Riemann sums
(n = 4) Left sum Right sum L₄ = 7/32 = 0.21875 R₄ = 15/32 = 0.46875 Too small (from below) Too large (from above) Midpoint sum 0.328125 / exact value ∫₀¹ x² dx = 1/3 -
Lecture Geometry Mechanics Analysis Optimization Ch. 3 Left Right Midpoint
0.218750 0.468750 0.328125 0.285000 0.385000 0.332500 0.328350 0.338350 0.333325 Multivariable Finer partitions approach 1/3 n Midpoint sum for n = 20: 0.333125 (error −2.08e −04) 4 10 100 -
Lecture Geometry Mechanics Analysis Closed form of the right sum
The right sum can be written as a formula in n. As n grows, it approaches 1/3. 0.468750 0.385000 0.338350 R₄ = 15/32 R₁₀ n = 4 → 10 → 100 → … → 1/3 = 0.333333 R₁₀₀ Multivariable Optimization Ch. 3 Closed form Rₙ = Σ (i/n)² · (1/n) = (n+1)(2n+1) / (6n²) → 2/6 = 1/3 (n → ∞) [Note] Sum of squares 1² + … + n² = n(n+1) (2n+1)/6 -
Lecture Geometry Mechanics Fundamental theorem of calculus (FTC) Analysis Multivariable
Optimization Ch. 3 d/dx ∫ₐˣ f(t) dt = f(x) Under suitable conditions ([Note] f continuous) F(x) = x³/3 → F′(x) = x². At x = 2, (F(2+h) − F(2))/h: h = 0.1 → 4.203333, h = 0.01 → 4.020033 → f(2) = 4 -
Lecture Geometry Mechanics Analysis Multivariable Definite integrals via the FTC
If we find F with F′ = f, then ∫ₐᵇ f(x) dx = F(b) − F(a). No need to take a limit of Riemann sums each time. Example 2 ₀ sin x dx = [−cos x]₀ = 1 − (−1) = 2 ∫π π The Riemann-sum limit from before, ¹₀ x² dx = 1/3, agrees: F(1) − F(0) = 1/3. Optimization ₁³ x² dx Example 1 ∫ = [x³/3]₁³ = 9 − 1/3 = 26/3 F(b) − F(a) F(x) = x³/3 satisfies F′ = x² Ch. 3 -
Lecture Geometry Mechanics Analysis Multivariable ρ Ch. 3 Optimization Continuous
center of mass: density (x) = 1 + x Σ ᵢᵢ Link to m x Discrete x̄ = Σmᵢxᵢ / Σmᵢ Continuous x̄ = ∫xρ dx/∫ρ dx N-piece approximation N = 4: 0.552083 N = 10: 0.555000 N = 100: 0.555550 N = 1000: 0.555555 Mass M = ∫₀¹ (1+x) dx = 3/2 Moment ₀¹ x(1+x) dx = 5/6 ∫ Center of mass x̄ x̄ = (5/6)/(3/2) = 5/9 ≈ 0.5556 -
Lecture Geometry Mechanics Analysis Multivariable Optimization Ch. 3 Exercise 2:
integration Use the fundamental theorem F(b) − F(a) and the center-of-mass formula x̄ = ∫xρ dx / ∫ρ dx (new problems, not the examples on slides 22–27). Problems Answers (1) ∫₀² (3x² + 1) dx (1) [x³ + x]₀² = 10 (2) ∫₀π/2 cos x dx (2) [sin x] → 1 − 0 = 1 (3) center of mass x̄ of a rod on [0, 1] with (3) (1/3)/(1/2) = 2/3 density ρ(x) = x -
Lecture Geometry Mechanics Analysis Multivariable Optimization Ch. 4 Multivariable Chapter
4 — partial derivatives, gradient, total differential Euclid → Lagrange -
Lecture Geometry Mechanics Analysis Partial derivatives: looking at slices Definition
f/ x = lim (f(x+h, y) − f(x, y)) / h ∂ ∂ Hold y fixed and look at the slope in the x direction (likewise for ∂f/∂y). Example f = x² + 3xy + y² f/ x = 2x + 3y, ∂f/∂y = 3x + 2y At (1, 2): ∂f/∂x = 8, ∂f/∂y = 7 ∂ ∂ Multivariable Optimization Ch. 4 -
Geometry Mechanics Analysis Multivariable Optimization Ch. 4 Numerical check and
second partials h = 0.1 h = 0.01 h = 0.001 (f(1+h, 2) − f(1, 2))/h (f(1+h, 2) − f(1, 2))/h (f(1+h, 2) − f(1, 2))/h 8.1000 ∂ ²f/∂x² twice in x 2 8.0100 ∂ ²f/∂y² twice in y 2 As h → 0, it approaches 8: ∂f/∂x (1, 2) = 8 8.0010 ∂ ²f/∂x∂y = ∂²f/∂y∂x mixed (order does not matter) 3=3 -
Lecture Geometry Mechanics Analysis Gradient ∇f: steepest ascent f =
(8, 7) |∇f| = √113 = 10.6301 (steepest slope) ∇f = (∂f/∂x, ∂f/∂y). At (1, 2): ∇ Directional derivatives Direction (unit vector) x direction (1, 0) y direction (0, 1) (1, 1)/√2 direction of ∇f Directional derivative 8.0000 7.0000 10.6066 10.6301 max The direction of ∇f is steeper than any other (= | ∇f|). [Note] In the figure, ∇f is perpendicular to the contours. Multivariable Optimization Ch. 4 -
Lecture Geometry Mechanics Analysis Estimating change with the total differential
df = ∂f/∂x dx + ∂f/∂y dy Multivariable Optimization Worked out df = 8 × 0.1 + 7 × (−0.05) = 0.4500 Move from (1, 2) by dx = 0.1, dy = −0.05. 0.4500 0.4475 −0.0025 df (estimate) actual change error f(1.1, 1.95) − f(1, 2) = 0.4475 error −0.0025 step × 1/10 → error −2.50e−05 Ch. 4 -
Lecture Geometry Mechanics Analysis Multivariable Optimization Ch. 5 Optimization Chapter
5 — Lagrange’s method of multipliers Joseph-Louis Lagrange (1736–1813) Mécanique analytique (1788): a synthesis of mechanics since Newton Euclid → Lagrange -
Geometry Mechanics Analysis Multivariable Optimization Ch. 5 ∇f = λ∇g:
tangent contours Lagrange multiplier condition On g = c, the contour of f is tangent Optimize f(x, y) subject to g(x, y) = c. Where a contour of f touches the constraint curve, the two normal vectors ∇f and ∇g are parallel. ↓ Steps normals are parallel 1 Find the gradients ∇f, ∇g 2 Solve the three equations 3 [Note] Compare f at the candidates f = λ∇g ↓ ∇ λ: the multiplier f/ x = λ ∂g/∂x f/ y = λ ∂g/∂y g(x, y) = c System of equations ∂ ∂ ∂ ∂ -
Lecture Geometry Mechanics Analysis ✓ Multivariable Ch. 5 Optimization Equations
f = xy, g = x + y: ∇f = (y, x), ∇g = (1, 1) y = λ, x = λ, x + y = 10 → ✓ x = y = λ = 5, f* = 25 Check along the line x Example (a): maximize xy subject to x + y = 10 y xy 3 4 5 6 7 7 6 5 4 3 21 24 25 24 21 -
Lecture Geometry Mechanics Analysis Multivariable Optimization Ch. 5 Example (b):
x + y on a circle constraint x² + y² = 1 ∇f = (1, 1), ∇g = (2x, 2y) 1 = 2λx, 1 = 2λy → x = y 2x² = 1 → x = y = ±√2/2 ( 2/2, √2/2): f = √2 ≈ 1.4142, λ = √2/2 Max √ Min (−√2/2, −√2/2): f = −√2 ≈ −1.4142 Check: brute force on the circle gives max 1.414214, min −1.414214 -
Lecture Geometry Mechanics Analysis Multivariable Optimization Ch. 5 Example (c):
shortest distance to a line closest point to the origin on x + 2y = 5 Problem On x + 2y = 5, minimize x² + y² ∇f = (2x, 2y) Answer x + 4x = 5 → x = 1 Point (1, 2), λ = 2 Distance √5 ≈ 2.2361 ∇g = (1, 2) Check [Note] 2x = λ, 2y = 2λ |ax₀ + by₀ − c| / √(a² + b²) → = 5/√5 ≈ 2.2361 y = 2x -
Lecture Geometry Mechanics Analysis [Note] λ as a “sensitivity” λ
= df*/dc: how the optimum responds to c Shift c slightly: f* changes by about λ × Δc. ✓ Example (a): f*(c) = c²/4 df*/dc = c/2 → at c = 10, 5 = λ Δc = 0.1: f*(10.1) − f*(10) = 0.5025 ≈ λ·0.1 = 0.5 ✓ Example (b): f*(c) = √(2c) x² + y² = c; at c = 1 df*/dc = √2/2 ≈ 0.7071 = λ Multivariable Optimization Ch. 5 -
Lecture Geometry Mechanics Analysis Multivariable Optimization Ch. 5 Utility maximization
Maximize U = √(xy) on the budget 2x + 4y = 40 (prices 2, 4; income 40). x* = 10, y* = 5 U* = 5√2 ≈ 7.0711 MRS = (∂U/∂x)/(∂U/∂y) = 1/2 = price ratio 2/4 (tangency) λ = √2/8 ≈ 0.1768 [Note] marginal utility of income Problem U = √(xy) Constraint 2x + 4y = 40 Solving ∇U = λ∇g gives x = 10, y = 5 -
Lecture Geometry Mechanics Analysis Multivariable Ch. 5 Optimization Comparing points
on the budget line U = √(xy) at five points on 2x + 4y = 40 x = 6, y = 7 x = 8, y = 6 x = 10, y = 5 x = 12, y = 4 x = 14, y = 3 6.4807 6.9282 7.0711 6.9282 6.4807 U 2·6 + 4·7 = 40 U 2·8 + 4·6 = 40 U 2·10 + 4·5 = 40 U 2·12 + 4·4 = 40 U 2·14 + 4·3 = 40 Maximum at x = 10, y = 5 (U* = 5√2 ≈ 7.0711). Moving away on either side lowers U equally. -
Lecture Geometry Mechanics Several constraints ∇f = Σ λᵢ ∇gᵢ
With constraints g₁ = c₁, g₂ = c₂, … ∇ f = λ₁∇g₁ + λ₂∇g₂ + … [Note] As many equations as unknowns (variables Analysis minimize x² + y² + z² g₁: x + y + z = 1, g₂: x − y = 1 2x = λ₁ + λ₂ 2y = λ₁ − λ₂ 2z = λ₁ Applications → Constrained motion ✓ Utility maximization (slide 40) Optimization [Note] Example: two constraints and λ’s) ✓ Multivariable x = 5/6, y = −1/6, z = 1/3 λ₁ = 2/3, λ₂ = 1, f* = 5/6 ≈ 0.8333 Ch. 5 -
Lecture Geometry Mechanics Analysis Multivariable Optimization Exercise 3: optimization Solve
∇f = λ∇g together with the constraint. Check your answers on the right. Problems Answers (1) Perimeter-20 rectangle: maximize area xy (1) 2x + 2y = 20 square, λ = 5/2 (2) Minimize x² + y² subject to x + y = 4 (2) (3) Maximize U = x 0.3 y 0.7 2x + 4y = 40 (prices 2, 4; income 40) x = y = 5, area 25 (2, 2), f* = 8 λ=4 (3) x = 6, y = 7 spending 12 + 28 = 40, U* ≈ 6.6837 Ch. 5 -
Geometry Mechanics Analysis ① Static equality Multivariable Optimization Summary Euclid:
equal magnitudes; plane via the parallel postulate Archimedes: mechanical balance via the law of the lever ② Continuous change Calculus: derivative (rate) and integral (sum) unified by the FTC Partial derivatives: several variables; directional rates, gradient ③ Constrained optimal balance Lagrange: constrained optimization as parallel gradients Balance Σmᵢxᵢ = 0 → ∇f = λ∇g -
Lecture Geometry Mechanics References Analysis Multivariable Optimization References Euclid, Elements
Book I Translated by T. L. Heath; online edition by D. E. Joyce (Clark University) mathcs.clarku.edu/~djoyce/java/elements/bookI/bookI.html MacTutor History of Mathematics: Archimedes The historical facts in this lecture (dates, mathshistory.st-andrews.ac.uk/Biographies/Archimedes/ titles) were checked against the sources on MacTutor: A history of the calculus the right. mathshistory.st-andrews.ac.uk/HistTopics/The_rise_of_calculus/ MacTutor: Joseph-Louis Lagrange mathshistory.st-andrews.ac.uk/Biographies/Lagrange/ -
Geometry Mechanics Analysis Multivariable Optimization Q&A Thank you Questions &
discussion From Σmᵢxᵢ = 0 to ∇f = λ∇g: the idea of balance Euclid → Lagrange