Skip to content
spmaddmath.com.my
Tuition

Study

SyllabusFormulasMethodsExam & PapersTools
LocationsPricingBlogOur TeachersContact
EN

Method · Differentiation

Solving maximum and minimum problems

To maximise or minimise a quantity, write it as one variable, differentiate, and set dydx=0\frac{dy}{dx}=0 to find the stationary point. Then confirm whether it is a maximum or a minimum using the sign of d2ydx2\frac{d^{2}y}{dx^{2}}.

What this method is for

Optimisation questions ask for the largest or smallest possible value of something, the maximum area a fence can enclose, the minimum surface area of a container, the greatest volume of a box. This method uses differentiation to find that best value exactly, rather than by guessing.

The idea rests on turning points. At a maximum or minimum the curve momentarily flattens, so its gradient is zero: dydx=0\frac{dy}{dx}=0.

By expressing the quantity we care about as a single-variable function and solving dydx=0\frac{dy}{dx}=0, we locate the turning point, and the second derivative tells us whether it is a peak or a trough. In Add Math these questions carry good marks in the Differentiation chapter and often come dressed as a real-world scenario, so recognising the underlying structure is half the battle.

When to reach for it

Reach for this method whenever a question asks for a maximum or minimum value, the largest or smallest, the greatest area or volume, or the value that makes a cost 'as small as possible'. These words signal a turning point, and turning points come from dydx=0\frac{dy}{dx}=0.

A reliable clue is that the problem gives a constraint, a fixed length of fencing, a fixed perimeter, a set amount of material, alongside the quantity to optimise. That constraint is what lets you reduce two variables down to one.

If you can write the target quantity as a function of a single variable and the question wants its best value, this is exactly the method to use.

The method, step by step

Stationary point and its natureMust memorise
dydx=0   gives a turning point;d2ydx2<0max,    d2ydx2>0min\frac{dy}{dx}=0 \;\text{ gives a turning point};\quad \frac{d^{2}y}{dx^{2}}<0 \Rightarrow \text{max},\;\; \frac{d^{2}y}{dx^{2}}>0 \Rightarrow \text{min}
  1. 1

    Name the quantity

    Write an expression for the thing to be maximised or minimised, such as area AA or volume VV.

  2. 2

    Use the constraint

    Use the given fixed condition to eliminate one variable, so the quantity depends on one variable only.

  3. 3

    Differentiate

    Find the first derivative of the single-variable expression.

  4. 4

    Solve the derivative equals zero

    Set the first derivative to 00 and solve to find the value at the turning point.

  5. 5

    Confirm the type

    Find the second derivative; a negative value means a maximum, a positive value means a minimum.

  6. 6

    State the answer

    Substitute back to find the required maximum or minimum value, with units.

Worked example

Q1[6 marks]

A rectangular garden is to be fenced on three sides, with an existing wall forming the fourth side. The total length of fencing available is 1212 m.

Find the maximum area of the garden.

Show worked solution

Let the two sides perpendicular to the wall each have length xx m, and let the side parallel to the wall have length yy m.

The fencing covers the two xx-sides and the one yy-side, so the constraint is 2x+y=122x+y=12, giving y=122xy=12-2x.

The area is A=xyA=xy. Substitute the constraint:

A=x(122x)=12x2x2A=x(12-2x)=12x-2x^{2}

Differentiate and set equal to zero:

dAdx=124x=0    x=3\frac{dA}{dx}=12-4x=0\;\Rightarrow\; x=3

Confirm it is a maximum using the second derivative:

d2Adx2=4<0    maximum\frac{d^{2}A}{dx^{2}}=-4<0 \;\Rightarrow\; \text{maximum}

When x=3x=3, y=122(3)=6y=12-2(3)=6. The maximum area is A=3×6=18A=3\times 6=18 m2^{2}.

Common mistakes to avoid

  • Trying to differentiate a two-variable expression. You must use the constraint to get down to one variable first.
  • Forgetting the second-derivative check, so a minimum is reported when a maximum was wanted, or vice versa.
  • Solving dydx=0\frac{dy}{dx}=0 for xx and stopping, you still need to find the actual maximum or minimum value.
  • Setting up the constraint wrongly, for example counting all four sides when the wall replaces one of them.
  • Dropping units in the final answer, or giving a length when an area or volume was requested.

How one-to-one teaching helps

The step that decides these questions is the setup: translating the words into a quantity and a constraint, then reducing to one variable. Students who rush this end up differentiating the wrong expression and cannot recover.

In a one-to-one lesson our teachers slow down that first stage with you, labelling the diagram and writing the constraint before any calculus begins, so the differentiation is straightforward. Because the paper awards method marks, a clear dydx=0\frac{dy}{dx}=0 line and a second-derivative check earn credit even under time pressure.

Teachers at spmaddmath.com.my are experienced, and lessons are online and taught in English. To practise optimisation with guided setups, message us on WhatsApp to arrange a one-hour paid class from RM50/hr at the teacher's rate.

Get 1-to-1 help.

Book a Trial Class

Frequently asked questions

Why does dydx=0\frac{dy}{dx}=0 give a maximum or minimum?

At a maximum or minimum the curve levels off for an instant, so its gradient is zero. Setting dydx=0\frac{dy}{dx}=0 finds exactly those flat points, called stationary points, where a maximum or minimum can occur.

How do I tell a maximum from a minimum?

Use the second derivative. If d2ydx2<0\frac{d^{2}y}{dx^{2}}<0 at the stationary point, the curve bends downward, so it is a maximum.

If d2ydx2>0\frac{d^{2}y}{dx^{2}}>0, the curve bends upward, so it is a minimum.

What is the role of the constraint in the problem?

The constraint is the fixed condition, such as a set length of fencing, that links your variables. It lets you replace one variable in terms of another so the quantity you want to optimise becomes a function of a single variable, which is what you can differentiate.

Do I always need the second derivative test?

It is the clearest way to confirm the nature of a turning point and is expected working. You can also test the sign of dydx\frac{dy}{dx} just before and after the point, but the second-derivative test is usually quicker and tidier for these questions.

Source:SRC-DSKP-EN

Written by the spmaddmath.com.my editorial team.· Last updated 5 September 2026

Ready to get started?

Book a Trial Classfrom RM50/hr · One-hour paid trial · Same-day reply
Book a Trial ClassOne-hour paid trial · Same-day reply