Skip to content
Free public beta until December 4, 2026: every course is open, no card needed. After that, the first chapter of each course stays free and full access is a one-time $39 ($19 for up to 100 founding members chosen for helpful feedback). Your progress is kept. How the beta works

Problem-solving recipes

A step-by-step procedure for every problem type this course teaches — what to do first, what to do next, and how to tell which case you're in.

What are you being asked to do?

Start with what you're actually holding.

Given a word problem, no equations written yet — the modeling recipe turns the paragraph into decision variables, an objective, and a constraint list, ready to classify and solve.

Minimizing a function you can't (or don't want to) differentiate — one variable with a bracket already trapping the minimum, golden-section search; the same setup but with a fixed number of iterations decided in advance, Fibonacci search; three known bracket points and a function that looks parabola-shaped near its minimum, quadratic-fit search; several variables, no bracket, only function values to compare, Nelder-Mead.

Already have a descent direction, need a step size — backtracking line search.

An equality-constrained problem, solved by hand with a Lagrange multiplier — the equality-constrained recipe for one constraint; a second constraint active at the same time extends it.

A constrained nonlinear problem, need a candidate point verified (or found) by hand — the KKT recipe.

Solving a linear program by hand — the simplex pivot recipe if an all-slack starting basic feasible solution is available; when a \ge or = constraint rules that starting basis out, the Big-M recipe if that's the only method taught so far, or the artificial-variables recipe once two-phase simplex is also available and either route will do.

Need the dual of an LP you already have in \min\ c^\top x form — the dual-construction recipe.

Given a finite point set, need to know which points are the convex hull's real corners — the convex-hull recipe; asking instead whether one specific point is reachable as a nonnegative combination of some generating vectors is the separate conic-hull-membership recipe.

A trust-region method, but the problem has a constraint too — the constrained trust-region step recipe, for deciding whether the ball or the linearized constraint caps the step and computing it either way.

Need a directional derivative, or want to confirm the gradient really is the steepest direction at a point — the directional-derivative recipe.

Know an LP's optimal vertex, need the range one number can move through before it stops being optimal — the cost-coefficient recipe for a cost, or its extension for a resource (right-hand-side) value too.

An LP relaxation's optimum is fractional and rounding can't be trusted — branch and bound.

A constrained nonlinear problem, want to reuse an unconstrained solver instead of building a constrained one from scratch — penalty as the simplest version; the method of multipliers once penalty's growing \rho makes subproblems too stiff; a log barrier when every iterate must stay strictly feasible along the way, with the primal-dual Newton step as one advance along that barrier's central path.

Running gradient descent with per-parameter adaptive step sizes — the Adam update step. Searching with no gradient at all, trying to escape local minima — simulated annealing (one point), a genetic algorithm (a population), or particle swarm (a swarm pulled toward personal and global bests) — pick by what you're already tracking.

Comparing feasible designs on more than one objective, or sizing a decision against a probabilistic guarantee — Pareto dominance or chance-constrained capacity, both in the multiobjective/robust chapter.

Need to know whether a multivariable function is convex, not just classify one critical point — the Hessian-convexity recipe: compute H, check it's positive semidefinite everywhere, and conclude.

Have the gradient and the true Hessian at the current point — Newton's method's own step. Have the gradient but no true Hessian, only an inverse-Hessian approximation built from past gradients — a BFGS update step instead.

Want directions better than plain steepest descent without ever forming a Hessian — conjugate gradient (uses the gradient/residual), coordinate descent (updates one variable at a time, no derivative at all), or Powell's method (builds conjugate-style directions from function values alone, no derivative either).

Have one side of an LP's optimal solution and need the other, without solving a second LP — the complementary-slackness recovery recipe.

Turning a word problem into a model

Working with gradients and directional derivatives

Running a second-order unconstrained-optimization step

Finding a minimum without a derivative

Running an alternative descent method without a full Hessian

Choosing a step size along a descent direction

Capping a step with a trust region

Solving an equality-constrained problem with Lagrange multipliers

Verifying optimality with constraints (KKT)

Working with convex and conic hulls

Checking whether a function is convex

Solving a linear program by hand

Constructing an LP's dual

Recovering one LP solution from the other

Finding how far one LP coefficient can move

Solving an integer program exactly

Handling constraints by solving a sequence of unconstrained problems

Adaptive gradient-based optimization

Searching without a gradient (metaheuristics)

Comparing designs and sizing under uncertainty