---
title: "Optimisation with Calculus"
description: "Turn a worded problem into one function of one variable, use a constraint to remove the second variable, then differentiate to find the best value and justify that it is a maximum or minimum."
canonical: https://lightmysky.com/learn/mathematics/optimisation-with-calculus-mt_9I0ql39Lzw
source: https://lightmysky.com/learn/mathematics/optimisation-with-calculus-mt_9I0ql39Lzw.md
retrieved: 2026-09-02
---

> **Agent view.** This is the Markdown twin of the page, for tools and assistants.
> When to use this site, and the call that answers each job: https://lightmysky.com/agent-instructions.md
> API description (OpenAPI 3.1): https://lightmysky.com/openapi.json · Authentication: https://lightmysky.com/auth.md
> Pricing: https://lightmysky.com/pricing.md · Catalog: https://lightmysky.com/llms.txt · Full catalog: https://lightmysky.com/llms-full.txt
> Every machine-readable file on this domain: https://lightmysky.com/.well-known/ai-catalog.json
> Ask for Markdown with `Accept: text/markdown`, a `.md` address, or `?mode=agent`.

# Optimisation with Calculus

Turn a worded problem into one function of one variable, use a constraint to remove the second variable, then differentiate to find the best value and justify that it is a maximum or minimum.

Subject: Mathematics · Area: Calculus & Analysis · Ages 17 to 18
Page: https://lightmysky.com/learn/mathematics/optimisation-with-calculus-mt_9I0ql39Lzw

## Ready when they can

- Use a fixed perimeter to write area as a function of one side, then maximise it
- Minimise the surface area of an open box of fixed volume
- Check that the stationary point found is the kind the question asked for

## Lesson: Optimisation with Calculus

Last stop handed you a rule and asked for its stationary points. Real questions do not arrive as rules. The Ridgeway crew has a fixed length of fencing and an existing wall, and wants the practice strip to enclose as much ground as possible. Nobody has written down a function of x. Building that function is the whole job, and once it exists the calculus is the routine you already have. So the hard part comes first and the familiar part comes last.

Four steps, in this order. One: name the variables and write down the quantity you are trying to make biggest or smallest. Two: write the constraint, the second equation that links the variables and says what is fixed. Three: rearrange the constraint and substitute, so the quantity becomes a function of one variable only. That step is why the constraint is there at all. Four: differentiate, set the derivative to zero, solve, and use the second derivative to check you have the kind of point the question wanted.

*(drawing: Three steps of setting up, one step of calculus. Most marks are lost in step three.)*

**Example.** The crew has 36 m of fencing for three sides, with the wall as the fourth. Call the two equal sides x and the far side y. The quantity to maximise is the area, A = xy. The constraint is the fencing: 2x + y = 36, so y = 36 - 2x. Substituting removes y: A = x(36 - 2x) = 36x - 2x². Now differentiate: dA/dx = 36 - 4x, which is zero at x = 9. Then y = 36 - 18 = 18, and the area is 9 times 18 = 162 m².

**Example.** Now a box with a square base of side x, no lid, and a fixed volume of 32 cm³. The height h is the second variable, and the constraint is x²h = 32, so h = 32/x². The quantity to minimise is the surface area: a base of x² plus four sides of xh each, so S = x² + 4xh. Substituting gives S = x² + 128/x. Rewrite that as x² + 128x⁻¹ before differentiating: dS/dx = 2x - 128x⁻², which is zero when 2x³ = 128, so x = 4 and h = 2.

*(drawing: Make the second variable the subject, then substitute it out of the thing you want.)*

Two things finish the job. First, justify. For the fence, d²A/dx² = -4, which is negative, so x = 9 really is a maximum. For the box, d²S/dx² = 2 + 256/x³, which is 6 at x = 4, positive, so that is a minimum. A stationary point is not automatically the kind you wanted. Second, answer the question that was asked. If it asks for dimensions, give both, not just x. If it asks for an area, give the area, which for the box means S = 16 + 32 = 48 cm².

**Recap.** Optimisation is three parts setting up and one part calculus. Name what you are maximising or minimising, write the constraint that links the variables, then use the constraint to get down to a function of one variable. Only then differentiate, set the derivative to zero and solve. Finish with the second derivative, which confirms whether you have found a maximum or a minimum, and then answer the question that was actually asked, in the quantity it asked for.

## Practice

24 questions on this page, each with its working shown.

## Needs first

- [Stationary Points and the Second Derivative](https://lightmysky.com/learn/mathematics/stationary-points-and-the-second-derivative-mt_VbGJEFFgfs)
- [Rearranging Formulae When the Subject Appears Twice](https://lightmysky.com/learn/mathematics/rearranging-formulae-when-the-subject-appears-twice-mt_Velmpnxfcj)

## Opens up

- [Integration as the Reverse of Differentiation](https://lightmysky.com/learn/mathematics/integration-as-the-reverse-of-differentiation-mt_edtk3ArxRk)
