Maximum and Minimum with Restricted Inputs

Summary: A function may have an obvious maximum or minimum, but a TMUA problem may restrict which inputs are allowed. The maximum or minimum must be found using only those allowed inputs.

Consider f(x)=(x3)2+2f(x)=(x-3)^2+2.

Over all real values of xx, the graph has its minimum at (3,2)(3,2).

Now compare two different restrictions on xx.

For 0x40\le x\le4, the vertex is allowed, so it gives the minimum.

For 5x85\le x\le8, the vertex is not allowed. The minimum occurs at the endpoint x=5x=5.

The formula has not changed. Only the allowed inputs have changed.

So the first question should be:

Which values of xx am I actually allowed to use?

Find the Allowed Inputs First

A restriction may be given directly, or it may need to be extracted from another condition.

Given conditionAllowed inputs
2x5-2\le x\le52x5-2\le x\le5
(x1)(x6)0(x-1)(x-6)\le01x61\le x\le6
x23\lvert x-2\rvert\le31x5-1\le x\le5

Do this before searching for a maximum or minimum.

A turning point outside the allowed interval cannot give the required maximum or minimum.

First find the allowed inputs. Then optimise only over those inputs.

The restriction does not always apply directly to xx.

For example, if u=5xu=5^x, then u>0u>0.

So if an expression is rewritten in terms of uu, only positive values of uu can be used.

Similarly, if 2f(x)2-2\le f(x)\le2 and we define t=f(x)t=f(x), then 2t2-2\le t\le2.

Any maximum or minimum involving tt must therefore be found using only this range of values.

The same idea applies whenever a new variable is introduced: first find which values that variable can actually take.

Find the Candidates

Once the allowed interval is known, there are usually only a few points that can give the maximum or minimum.

CandidateWhen should it be checked?
Stationary pointIt lies inside the allowed interval
Sharp turning pointIt lies inside the allowed interval
Left endpointThe endpoint is included
Right endpointThe endpoint is included

A turning point outside the allowed interval is not a candidate.

Sometimes the behaviour of the function makes the comparison even quicker.

Behaviour throughout the intervalWhat follows?
IncreasingMinimum at the left endpoint; maximum at the right endpoint
DecreasingMaximum at the left endpoint; minimum at the right endpoint

For a differentiable function on a closed interval, a useful approach is:

StepQuestion
1What inputs are allowed?
2Which stationary points lie inside the interval?
3What are the endpoint values?
4Which candidate gives the largest value?
5Which candidate gives the smallest value?

If the graph has a sharp turning point, such as the vertex of a modulus graph, include that point as well.

Stationary Points Are Only Candidates

Consider f(x)=x33xf(x)=x^3-3x for 2x2-2\le x\le2.

Differentiating gives f(x)=3x23f'(x)=3x^2-3.

So the stationary points satisfy 3x23=03x^2-3=0, giving x=1andx=1x=-1 \qquad\text{and}\qquad x=1.

Both lie inside the allowed interval.

Together with the endpoints, there are four candidates.

xxWhy check it?f(x)f(x)
2-2Left endpoint2-2
1-1Stationary point22
11Stationary point2-2
22Right endpoint22

Therefore maximum=2\text{maximum}=2 and minimum=2\text{minimum}=-2.

Finding the stationary points is not enough. Compare every allowed candidate.

Check Whether the Boundary Is Included

A maximum or minimum must actually be reached.

Compare the following two domains for f(x)=xf(x)=x.

DomainWhat happens near 00?Minimum
0x30\le x\le3x=0x=0 is allowed00
0<x30<x\le3Values can approach 00, but x=0x=0 is excludedNo minimum

For 0<x30<x\le3, the function can take values as close to 00 as we like, but it can never equal 00.

So 00 is a lower bound, but it is not a minimum.

A maximum or minimum must actually be reached.

This distinction is important whenever a problem contains strict inequalities or excludes a boundary point.

When a Parameter Changes the Candidates

A parameter can change which points are available or which point gives the maximum or minimum.

There are two common ways this happens:

  • the turning point moves;
  • the allowed interval moves.

The important question is always:

As the parameter changes, which candidates are available, and which one gives the required extreme?

A Moving Turning Point

Consider f(x)=(xp)2f(x)=(x-p)^2 for 0x60\le x\le6.

The vertex is at x=px=p.

Value of ppPosition of the vertexMinimum
p<0p<0Left of the intervalAt x=0x=0
0p60\le p\le6Inside the interval00 at x=px=p
p>6p>6Right of the intervalAt x=6x=6

So p=0andp=6p=0 \qquad\text{and}\qquad p=6 are important values because they mark when the vertex enters or leaves the allowed interval.

The maximum requires a different comparison.

When 0p60\le p\le6, the maximum occurs at whichever endpoint is farther from pp.

At the endpoints, f(0)=p2f(0)=p^2 and f(6)=(6p)2f(6)=(6-p)^2.

These are equal when p2=(6p)2p^2=(6-p)^2, which gives p=3p=3.

Therefore:

Value of ppWhere is the maximum?
0p<30\le p<3x=6x=6
p=3p=3Both endpoints
3<p63<p\le6x=0x=0

Different parameter values matter for different reasons:

  • p=0p=0 and p=6p=6 determine whether the vertex is inside the allowed interval;
  • p=3p=3 determines which endpoint gives the maximum.

A Moving Allowed Interval

Now consider f(x)=(x1)2f(x)=(x-1)^2 for pxp+2p\le x\le p+2.

The function has its unrestricted minimum at x=1x=1.

But the allowed interval now moves as pp changes.

If p+2<1p+2<1, the whole interval lies to the left of 11.

The allowed point closest to 11 is the right endpoint x=p+2x=p+2, so m(p)=(p+1)2m(p)=(p+1)^2.

If p1p+2p\le1\le p+2, then x=1x=1 is allowed, so m(p)=0m(p)=0.

This happens when 1p1-1\le p\le1.

If p>1p>1, the whole interval lies to the right of 11.

The allowed point closest to 11 is the left endpoint x=px=p, so m(p)=(p1)2m(p)=(p-1)^2.

Therefore

m(p)={(p+1)2,p<1,0,1p1,(p1)2,p>1.m(p)= \begin{cases} (p+1)^2, & p<-1,\\[4pt] 0, & -1\le p\le1,\\[4pt] (p-1)^2, & p>1. \end{cases}

The graph of m(p)m(p) shows clearly what happens as the allowed interval moves.

For 1p1-1\le p\le1, the moving interval contains x=1x=1.

So the minimum remains m(p)=0m(p)=0, which produces the flat part of the graph.

When p<1p<-1 or p>1p>1, the interval no longer contains x=1x=1.

The minimum is then determined by the endpoint closest to 11, and the minimum value increases as the interval moves farther away.

So the graph makes the change in candidates visible:

turning point is allowedm(p)=0\boxed{ \text{turning point is allowed} \Rightarrow m(p)=0 }

but

turning point is not allowednearest endpoint determines m(p)\boxed{ \text{turning point is not allowed} \Rightarrow \text{nearest endpoint determines }m(p) }

The function itself has not changed. The allowed interval has moved, and this creates a new function m(p)m(p).

More generally, in parameter questions look for values where:

  • a turning point enters or leaves the allowed interval;
  • an endpoint passes a turning point;
  • two candidate values become equal;
  • a different candidate begins to give the maximum or minimum.

These values often mark where the formula for the extreme value changes.

Optimising a Maximum or Minimum

Sometimes finding the maximum or minimum is only the first stage of the problem.

For each value of a parameter, we may first obtain a maximum or minimum.

That extreme value is then itself a function of the parameter.

For example, we might call it M(p)M(p) for a maximum, or m(p)m(p) for a minimum.

The problem may then ask how large or small this new quantity can be.

The important idea is:

fix the parameterfind the required extremeobtain a new function of the parameteroptimise again\boxed{ \text{fix the parameter} \longrightarrow \text{find the required extreme} \longrightarrow \text{obtain a new function of the parameter} \longrightarrow \text{optimise again} }

This same method works whether the question asks for:

  • the smallest possible maximum;
  • the largest possible maximum;
  • the smallest possible minimum;
  • the largest possible minimum.

There is no need to learn four separate methods.

First Find the Extreme for Each Parameter Value

Return to f(x)=(xp)2,0x6f(x)=(x-p)^2, \qquad 0\le x\le6, with 0p60\le p\le6.

For a fixed value of pp, the maximum occurs at whichever endpoint is farther from pp.

At the endpoints, f(0)=p2f(0)=p^2 and f(6)=(6p)2f(6)=(6-p)^2.

For 0p30\le p\le3, the farther endpoint is x=6x=6, so M(p)=(6p)2M(p)=(6-p)^2.

For 3p63\le p\le6, the farther endpoint is x=0x=0, so M(p)=p2M(p)=p^2.

Therefore

M(p)={(6p)2,0p3,p2,3p6.M(p)= \begin{cases} (6-p)^2, & 0\le p\le3,\\[4pt] p^2, & 3\le p\le6. \end{cases}

The first stage is complete.

Seeing the Extreme Value as a New Graph

The original function was a function of xx.

The new function M(p)M(p) records the maximum value obtained for each value of pp.

For every value of pp, the height of this graph is the maximum value of the original function.

Now we can optimise the new graph.

Its lowest point occurs at p=3p=3, where M(3)=9M(3)=9.

Therefore the smallest possible maximum is 99.

The largest values occur at the ends of the parameter range: M(0)=M(6)=36M(0)=M(6)=36.

Therefore the largest possible maximum is 3636.

So the two stages can be viewed as

f(x)M(p) or m(p)optimise the new function\boxed{ f(x) \longrightarrow M(p)\text{ or }m(p) \longrightarrow \text{optimise the new function} }

The same idea applies if the first stage gives a minimum rather than a maximum.

Do not try to optimise everything at once. First find the required maximum or minimum for each parameter value. Then optimise those extreme values.

The second stage also needs the usual boundary check.

If the allowed range of the parameter has an excluded endpoint, the new function M(p)M(p) or m(p)m(p) may approach a value without ever reaching it.

What Should You Look For?

When the first-stage extreme depends on a parameter, important parameter values often occur when:

  • the point giving the extreme changes;
  • two competing candidate values become equal;
  • a stationary or turning point enters or leaves the allowed region;
  • the parameter reaches an endpoint of its own allowed range.

These are the natural places to check when optimising the extreme value itself.

When an Extreme Value Becomes a Condition

Sometimes the question does not ask you to optimise M(p)M(p) or m(p)m(p).

Instead, it tells you that the extreme value must satisfy a condition.

Return again to f(x)=(xp)2,0x6f(x)=(x-p)^2, \qquad 0\le x\le6, where 0p60\le p\le6.

We already know that

M(p)={(6p)2,0p3,p2,3p6.M(p)= \begin{cases} (6-p)^2, & 0\le p\le3,\\[4pt] p^2, & 3\le p\le6. \end{cases}

Suppose the maximum is required to satisfy M(p)16M(p)\le16.

The graph gives a useful picture of the condition.

We want the part of the graph at or below the level M=16M=16.

The graph meets this level at p=2andp=4p=2 \qquad\text{and}\qquad p=4.

So the graph suggests 2p42\le p\le4.

Now confirm this algebraically.

For 0p30\le p\le3, we need (6p)216(6-p)^2\le16.

Since 6p6-p is positive in this range, 6p46-p\le4, so p2p\ge2.

Together with the case condition, 2p32\le p\le3.

For 3p63\le p\le6, we need p216p^2\le16, so p4p\le4.

Together with the case condition, 3p43\le p\le4.

Combining the two cases gives 2p4.2\le p\le4.

The structure is

find the extremeexpress it as a function of the parameterapply the conditionsolve for the parameter\boxed{ \text{find the extreme} \longrightarrow \text{express it as a function of the parameter} \longrightarrow \text{apply the condition} \longrightarrow \text{solve for the parameter} }

This works with conditions such as M(p)<k,M(p)k,m(p)>k,m(p)kM(p)<k, \qquad M(p)\ge k, \qquad m(p)>k, \qquad m(p)\le k.

If the extreme value has different formulas in different cases, there is one final check:

After solving a case, keep only the parameter values that actually belong to that case.

For example, a solution obtained from the formula for 0p30\le p\le3 cannot be used if it gives p=5p=5.

The graph helps show the structure, while the algebra confirms the exact answer.

Worked Example

For real xx satisfying x24x0x^2-4x\le0, let f(x)=x26x+13f(x)=x^2-6x+13.

Find the difference between the maximum and minimum values of f(x)f(x).

Solution

First find the allowed inputs.

Since x24x=x(x4)x^2-4x=x(x-4), the condition x(x4)0x(x-4)\le0 gives 0x40\le x\le4.

Now rewrite the function as f(x)=(x3)2+4f(x)=(x-3)^2+4.

The vertex occurs at x=3x=3, which lies inside the allowed interval.

The candidates are therefore:

xxWhy check it?f(x)f(x)
00Left endpoint1313
33Vertex44
44Right endpoint55

Hence maximum=13\text{maximum}=13 and minimum=4\text{minimum}=4.

Therefore the required difference is 134=913-4=\boxed{9}.

The key step was finding the allowed interval first. Without the restriction 0x40\le x\le4, the optimisation problem would be different.

Practical Approach

For a maximum or minimum problem with restricted inputs:

StepAction
1Find the allowed inputs.
2Find stationary points, turning points and included endpoints.
3Evaluate the function at the candidates.
4Check that the claimed maximum or minimum is actually reached.
5If a parameter is present, identify where the available or winning candidate changes.
6If this creates a new extreme-value function such as M(p)M(p) or m(p)m(p), write it down clearly, often piecewise.
7If the extreme value itself must be optimised, optimise this new function over the allowed parameter range.
8If the extreme value must satisfy a condition, apply the condition and solve for the parameter.
9For a piecewise result, check that every solution belongs to the case in which it was found.
10Check that any final maximum or minimum is actually attained.

Practice Questions

1

Combining a Hidden Restriction with Stationary Points

MEMBERLogin required