Optimisation and Double Integrals, MATH 126 – Study Notes
offline

Difficulty: Intermediate to Advanced | Prerequisites: Partial derivatives, basic integration techniques from MATH 124/125

TL;DR

Optimisation in two variables uses partial derivatives to find critical points, and the second derivative test (the discriminant D) to classify them. Double integrals compute area, volume, and mass over 2D regions, and converting to polar coordinates simplifies problems with circular symmetry. Centre-of-mass problems are just weighted averages computed via double integrals.


Key Terms

Critical point

A point (a, b) where both partial derivatives equal zero: fx(a, b) = 0 and fy(a, b) = 0. Think of it as a flat spot on the surface where the tangent plane is horizontal.

Second derivative test (discriminant)

The quantity D = fxx * fyy - (fxy)^2 evaluated at a critical point. If D > 0 and fxx > 0, you have a local minimum. If D > 0 and fxx < 0, a local maximum. If D < 0, a saddle point. If D = 0, the test is inconclusive.

Saddle point

A critical point that is neither a local max nor a local min. The surface curves up in one direction and down in another. Think of the centre of a horse saddle or a Pringles crisp.

Closed bounded region

A region in the plane that includes its boundary and fits inside some circle. On a closed bounded region, continuous functions are guaranteed to have both a global max and a global min (the Extreme Value Theorem).

Polar coordinates

x = r cos(theta), y = r sin(theta). The area element transforms as dA = r dr d(theta). Use polar whenever the region or the integrand involves x^2 + y^2.

Centre of mass

The balance point of a 2D plate with variable density rho(x,y). Computed as x-bar = (1/M) * double integral of xrho dA, and y-bar = (1/M) * double integral of yrho dA, where M is the total mass.

Density function

rho(x, y) gives the mass per unit area at each point on a flat plate. Total mass M = double integral of rho(x, y) dA over the plate.


Critical Points and the Second Derivative Test

To find critical points of f(x, y), set both partial derivatives equal to zero and solve the system simultaneously.

Worked example (from the exam): f(x, y) = 2x^2 - 2xy + y^2 - 3y.

  • fx = 4x - 2y = 0, so y = 2x.

  • fy = -2x + 2y - 3 = 0. Substitute y = 2x: -2x + 4x - 3 = 0, so 2x = 3, x = 3/2, y = 3.

  • One critical point: (3/2, 3).

Classify using D = fxx * fyy - (fxy)^2:

  • fxx = 4, fyy = 2, fxy = -2.

  • D = (4)(2) - (-2)^2 = 8 - 4 = 4 > 0, and fxx = 4 > 0.

  • Conclusion: (3/2, 3) is a local minimum.

For the global extrema question on R^2: since f has a local min and the function grows without bound as x or y become large (the x^2 term dominates), f has a global minimum (at the local min) but no global maximum.

Global Extrema on a Closed Bounded Region

On a closed bounded region, the global max and min of a continuous function occur either at an interior critical point or on the boundary. The method:

  1. Find all critical points inside the region.

  1. Parametrise each boundary edge and find extrema along it (reduce to single-variable calculus).

  1. Evaluate f at every critical point and boundary candidate. The largest value is the global max; the smallest is the global min.

Worked example (from the exam): f(x, y) = 2x^2 - 2xy + y^2 - 3y on the square 0 <= x <= 4, 0 <= y <= 4.

Interior critical point: (3/2, 3), where f(3/2, 3) = 2(9/4) - 2(3/2)(3) + 9 - 9 = 9/2 - 9 = -9/2.

Boundary edges (four sides to check):

  • x = 0: f(0, y) = y^2 - 3y. Critical point at y = 3/2, giving f = -9/4. Endpoints: f(0,0) = 0, f(0,4) = 4.

  • x = 4: f(4, y) = 32 - 8y + y^2 - 3y = y^2 - 11y + 32. Critical point at y = 11/2, which is outside [0,4]. Endpoints: f(4,0) = 32, f(4,4) = 4.

  • y = 0: f(x, 0) = 2x^2. Critical point at x = 0 (endpoint). f(0,0) = 0, f(4,0) = 32.

  • y = 4: f(x, 4) = 2x^2 - 8x + 4. Critical point at x = 2, giving f(2,4) = 8 - 16 + 4 = -4. Endpoints: f(0,4) = 4, f(4,4) = 4.

Comparing all values: global min = -9/2 at (3/2, 3), global max = 32 at (4, 0).

Double Integrals in Cartesian Coordinates

Double integrals compute the accumulated value of a function over a 2D region. When the integrand or the region is awkward in the given order of integration, switching the order can simplify things dramatically.

Worked example (from the exam): Evaluate the integral from 0 to 1 of the integral from 0 to arctan(x) of 1/(1 - tan(y)) dy dx.

This integral is difficult (perhaps impossible) to evaluate in the given order because 1/(1 - tan(y)) has no clean antiderivative with respect to y. The trick is to switch the order of integration.

  • The original region: 0 <= x <= 1, 0 <= y <= arctan(x).

  • Rewrite: y ranges from 0 to arctan(1) = pi/4. For a fixed y, x ranges from tan(y) to 1 (because y <= arctan(x) means x >= tan(y)).

  • New integral: integral from 0 to pi/4 of integral from tan(y) to 1 of 1/(1 - tan(y)) dx dy.

  • The inner integral with respect to x is straightforward because the integrand does not depend on x: (1 - tan(y)) / (1 - tan(y)) = 1 times the length of the interval.

  • Inner integral = (1 - tan(y)) / (1 - tan(y)) = 1 * (1 - tan(y)) / (1 - tan(y)). Actually: integral of 1/(1-tan(y)) dx from tan(y) to 1 = (1 - tan(y))/(1 - tan(y)) = 1.

  • Outer integral: integral from 0 to pi/4 of 1 dy = pi/4.

Double Integrals in Polar Coordinates

Whenever the region is circular or the integrand involves x^2 + y^2, convert to polar. The key substitution: x = r cos(theta), y = r sin(theta), x^2 + y^2 = r^2, and dA = r dr d(theta). Do not forget the extra r in the area element.

Worked example (from the exam): Evaluate the double integral of cos(sqrt(x^2 + y^2)) over D, where D is x^2 + y^2 <= 4, x >= 0, y >= 0 (the quarter-disc of radius 2 in the first quadrant).

  • In polar: the integrand becomes cos(r), the region is 0 <= r <= 2, 0 <= theta <= pi/2.

  • The integral becomes: integral from 0 to pi/2 of integral from 0 to 2 of cos(r) * r dr d(theta).

  • Inner integral (integrate r cos(r) dr by parts): let u = r, dv = cos(r) dr. Then du = dr, v = sin(r). Result: r sin(r) + cos(r), evaluated from 0 to 2 = 2 sin(2) + cos(2) - 1.

  • Outer integral: (pi/2)(2 sin(2) + cos(2) - 1).

Centre of Mass with Variable Density

For a plate with density rho(x, y) over region D:

  • Total mass: M = double integral of rho(x, y) dA.

  • y-bar = (1/M) * double integral of y * rho(x, y) dA.

When the region is circular, convert everything to polar.

Worked example (from the exam): First-quadrant disc x^2 + y^2 <= a^2, density rho(x,y) = xy^2, y-bar = 1. Find a.

In polar: rho = (r cos(theta))(r^2 sin^2(theta)) = r^3 cos(theta) sin^2(theta).

  • M = integral from 0 to pi/2 of integral from 0 to a of r^3 cos(theta) sin^2(theta) * r dr d(theta) = integral of r^4 dr * integral of cos(theta) sin^2(theta) d(theta).

  • Integral of r^4 from 0 to a = a^5/5.

  • Integral of cos(theta) sin^2(theta) from 0 to pi/2 = 1/3 (using u = sin(theta)).

  • M = a^5/15.

For y-bar: multiply the integrand by y = r sin(theta).

  • Numerator = integral of r^5 dr * integral of cos(theta) sin^3(theta) d(theta).

  • Integral of r^5 from 0 to a = a^6/6.

  • Integral of cos(theta) sin^3(theta) from 0 to pi/2 = 1/4.

  • Numerator = a^6/24.

y-bar = (a^6/24) / (a^5/15) = (a^6/24)(15/a^5) = 15a/24 = 5a/8.

Set y-bar = 1: 5a/8 = 1, so a = 8/5.

Matching Integrals to Regions of Integration

This is a conceptual skill: given an iterated integral with specific limits, identify the shape of the region.

Key principles:

  • In Cartesian (dx dy or dy dx), the inner limits can depend on the outer variable. Sketch the boundary curves.

  • In polar (r dr d(theta)), the inner integral over r gives the radial extent; the outer integral over theta gives the angular sweep.

  • A constant upper limit on r means a circular arc. A limit on r that depends on theta (like r = (20/pi) * theta) traces a spiral or a line in disguise.

From the exam (Problem 6):

  • (a) Integral from 0 to 10 of integral from 0 to pi/4 of r d(theta) dr: r ranges 0 to 10, theta ranges 0 to pi/4. This is a wedge (sector) of a disc. Matches a triangular wedge region.

  • (b) Integral from 0 to 10 of integral from 0 to y of dx dy: for each y, x runs from 0 to y. This is the triangle below the line y = x. Matches the triangle with vertices (0,0), (0,10), (10,10).

  • (c) Integral from 0 to pi/2 of integral from (20/pi)*theta to 10 of r dr d(theta): the inner r starts at a value proportional to theta (a ray from the origin) and goes out to r = 10. This is a disc with a triangular wedge removed.

  • (d) Integral from 0 to 10 of integral from x to 10 of dy dx: for each x, y runs from x to 10. This is the triangle above y = x. Matches the triangle with vertices (0,0), (10,10), (0,10).


Formulas

Second derivative test: D = fxx * fyy - (fxy)^2. D > 0 and fxx > 0: local min. D > 0 and fxx < 0: local max. D < 0: saddle. D = 0: inconclusive.

Polar conversion: x = r cos(theta), y = r sin(theta), dA = r dr d(theta).

Total mass: M = double integral of rho(x, y) dA.

Centre of mass: x-bar = (1/M) double integral of x * rho dA, y-bar = (1/M) double integral of y * rho dA.

Integration by parts (for r cos(r) type integrals): integral of r cos(r) dr = r sin(r) + cos(r) + C.

Useful trig integrals: integral of cos(theta) sin^n(theta) d(theta) = sin^(n+1)(theta) / (n+1) + C.


Common Misconceptions

  • Students often forget to check the boundary when finding global extrema on a closed region. The global max or min can (and often does) occur on the boundary, not at the interior critical point.

  • When converting to polar coordinates, forgetting the extra factor of r in dA = r dr d(theta) is one of the most common mistakes. It leads to an answer that is off by an entire factor.

  • Students sometimes confuse the discriminant D = fxx*fyy - (fxy)^2 with other "D" quantities. Remember: this D has nothing to do with the determinant of a Jacobian.

  • In centre-of-mass problems, students sometimes divide by the area of the region instead of the mass M. When density is not constant, these are different quantities.


Why It Matters / Exam Flags

  • Critical-point classification with the second derivative test is almost guaranteed on any MATH 126 final. Have the D formula memorised cold.

  • Global-extrema-on-a-closed-region problems are worth significant points (11 on this exam). The boundary work is tedious but mechanical; do not skip any edge.

  • The question "does f have a global min/max on R^2?" tests conceptual understanding. Think about what happens as x and y grow large.

  • Switching the order of integration (Problem 4a) is a classic exam technique. If the inner integral looks impossible, draw the region and try the other order.

  • Polar coordinate problems (4b, 5) are worth 20+ points on this exam. The conversion is straightforward if you remember dA = r dr d(theta) and practise the trig integrals.

  • Matching integrals to regions (Problem 6) is a quick-points section. Practise reading limits as geometric descriptions.


Quick Self-Test

  1. True or False: If D > 0 at a critical point, the point is a local extremum.

  1. Fill in the blank: In polar coordinates, the area element dA equals ______.

  1. True or False: To find global extrema on a closed bounded region, you only need to check the interior critical points.

  1. Fill in the blank: Centre of mass y-bar equals the double integral of y*rho dA divided by ______.

  1. True or False: If a function has exactly one critical point and it is a local min, then it must be a global min on all of R^2.

Answers: 1. True (it is either a local max or local min depending on the sign of fxx). 2. r dr d(theta). 3. False (must also check the boundary). 4. The total mass M. 5. Not necessarily in general, but for many well-behaved functions (like quadratics) it is. On this exam, the answer was yes because the function grows without bound.


Practice Q&A

Q: Find and classify the critical points of g(x,y) = x^2 + xy + y^2 - 6x.

A: gx = 2x + y - 6 = 0, gy = x + 2y = 0. From the second equation, x = -2y. Substitute: -4y + y - 6 = 0, so y = -2, x = 4. Critical point (4, -2). D = (2)(2) - (1)^2 = 3 > 0, gxx = 2 > 0. Local minimum.

Q: Convert the double integral of e^(x^2 + y^2) over the disc x^2 + y^2 <= 9 into polar coordinates.

A: Integral from 0 to 2*pi of integral from 0 to 3 of e^(r^2) * r dr d(theta).

Q: A plate occupies the unit square [0,1] x [0,1] with density rho(x,y) = x + y. Find the total mass.

A: M = integral from 0 to 1 of integral from 0 to 1 of (x + y) dy dx = integral from 0 to 1 of (x + 1/2) dx = 1/2 + 1/2 = 1.


Connections to Other Topics

Critical-point analysis and the second derivative test connect directly to Lagrange multipliers (constrained optimisation), which may appear in other MATH 126 finals even though it is not on this one.

Double integrals in polar coordinates are the 2D version of what becomes triple integrals in cylindrical and spherical coordinates. If you are comfortable with the polar area element r dr d(theta), cylindrical (r dr d(theta) dz) and spherical (rho^2 sin(phi) d(rho) d(phi) d(theta)) will follow the same logic.

Centre-of-mass problems use the same integral setup as moments of inertia, which appear in physics and engineering courses.


Related Terms / Search Tags

critical points, second derivative test, discriminant, saddle point, local minimum, local maximum, global extrema, closed bounded region, Extreme Value Theorem, boundary analysis, double integral, iterated integral, switching order of integration, polar coordinates, dA = r dr dtheta, quarter disc, centre of mass, centroid, density function, mass integral, moment integral, matching integrals to regions, domain of integration, MATH 126, Calculus III, University of Washington, multivariable calculus, optimisation