7.7 Applications

7.7.1 Gradient of a curve

The derivative evaluated at a point gives the gradient of the tangent there.

Example 7.26. Find the gradient of \(y=x^3-4x\) at the point where \(x=2\), and hence the equations of the tangent and the normal there.

Solution. \[\frac {dy}{dx}=3x^2-4\quad \implies \quad \left .\frac {dy}{dx}\right |_{x=2}=3(4)-4=8.\] The gradient is \(8\). At \(x=2\) the curve is at \(y=8-8=0\), so both lines pass through \((2,0)\).

Tangent. It has the same gradient as the curve: \[y-0=8(x-2)\quad \implies \quad y=8x-16.\]

Normal. The normal is perpendicular to the tangent, and perpendicular gradients multiply to \(-1\), so its gradient is \(-\frac {1}{8}\): \[y-0=-\frac {1}{8}(x-2)\quad \implies \quad 8y=-x+2\quad \implies \quad x+8y=2.\]

Note 7.27. The normal’s gradient is the negative reciprocal, not just the negative. A tangent gradient of \(8\) gives \(-\frac {1}{8}\), not \(-8\). Both lines go through the same point on the curve, so only the gradient changes between them.

7.7.2 Increasing and decreasing functions

Note 7.28. Where \(f'(x)>0\) the function is increasing; where \(f'(x)<0\) it is decreasing. The sign of the derivative, not its size, is what tells you the direction.

The values of \(x\) at which \(f'(x)=0\) are the critical values. They are the only places where the function can change from increasing to decreasing or back, so they cut the line into intervals on each of which the direction is settled.

Example 7.29. Find the critical values of \(f(x)=2x^3+3x^2-36x\), and state where the function is increasing and where it is decreasing.

Solution. Step 1 — differentiate and solve \(f'(x)=0\). \[f'(x)=6x^2+6x-36=6\left (x^2+x-6\right )=6(x+3)(x-2),\] \[f'(x)=0\quad \implies \quad x=-3\ \text { or }\ x=2.\] These are the critical values.

Step 2 — test the sign of \(f'\) on each interval. The two critical values cut the line into three pieces. Pick any convenient point in each:

Interval \(x<-3\) \(-3<x<2\) \(x>2\)
Test value \(x=-4\) \(x=0\) \(x=3\)
\(f'(x)=6(x+3)(x-2)\) \(6(-1)(-6)=36\) \(6(3)(-2)=-36\) \(6(6)(1)=36\)
Sign positive negative positive
Behaviour increasing decreasing increasing

\[\therefore \quad f \text { is increasing for } x<-3 \text { and } x>2, \text { and decreasing for } -3<x<2.\]

Note 7.30. Only the sign of each factor is needed, not the value, so the arithmetic can be done in the head. At \(x=-4\) both brackets are negative and the product is positive — which is exactly the sort of step where a hurried minus sign goes missing.

7.7.3 Turning points

At a maximum or minimum the tangent is horizontal, so \(f'(x)=0\). Which kind it is follows from the second derivative.

Note 7.31. Solve \(f'(x)=0\) to find the turning points, then test each with \(f''(x)\): \[f''(x)>0 \implies \text {minimum},\qquad f''(x)<0 \implies \text {maximum}.\] If \(f''(x)=0\) the test is inconclusive and the sign of \(f'\) either side must be examined instead.

Example 7.32. Find the turning points of \(f(x)=x^3-3x^2-9x+5\) and determine their nature.

Solution. Step 1 — differentiate and solve \(f'(x)=0\). \[f'(x)=3x^2-6x-9=3\left (x^2-2x-3\right )=3(x-3)(x+1)\] \[f'(x)=0\quad \implies \quad x=3 \text { or } x=-1.\]

Step 2 — find the second derivative. \[f''(x)=6x-6.\]

Step 3 — test each point. \[f''(-1)=6(-1)-6=-12<0\quad \implies \quad \text {maximum at } x=-1\] \[f''(3)=6(3)-6=12>0\quad \implies \quad \text {minimum at } x=3.\]

Step 4 — find the \(y\) values. A turning point is a point, so both coordinates are needed: \[f(-1)=-1-3+9+5=10,\qquad f(3)=27-27-27+5=-22.\]

\[\therefore \quad \text {maximum at } (-1,10),\qquad \text {minimum at } (3,-22).\]

Note 7.33. The maximum here sits above the minimum but is not the largest value the function ever takes — as \(x\) grows, \(x^3\) grows without bound. These are local turning points, describing the curve near those points only.

7.7.4 Points of inflexion

Maxima and minima are not the only places where the tangent is horizontal. A curve can flatten out and then continue in the same direction, and such a point is called a point of inflexion. Maxima, minima and points of inflexion together are called stationary points.

Example 7.34. Find the stationary point of \(f(x)=x^3-3x^2+3x+2\) and determine its nature.

Solution. Step 1 — solve \(f'(x)=0\). \[f'(x)=3x^2-6x+3=3\left (x^2-2x+1\right )=3(x-1)^2,\] \[f'(x)=0\quad \implies \quad x=1,\] a single stationary point.

Step 2 — try the second derivative test. \[f''(x)=6x-6,\qquad f''(1)=6-6=0.\] The test gives no answer, so it must be abandoned in favour of the sign of \(f'\).

Step 3 — examine \(f'\) on either side. Since \(f'(x)=3(x-1)^2\) is a square multiplied by \(3\), it is positive for every \(x\) except \(x=1\): \[f'(0)=3(-1)^2=3>0,\qquad f'(2)=3(1)^2=3>0.\] The gradient is positive before and positive after, so the curve does not turn — it flattens for an instant and carries on rising.

Step 4 — find the \(y\) value. \[f(1)=1-3+3+2=3.\]

\[\therefore \quad \text {there is a point of inflexion at } (1,3).\]

Note 7.35. \(f''=0\) does not by itself mean a point of inflexion; it means the test has failed and the sign of \(f'\) must settle the matter. For \(f(x)=x^4\) the second derivative is also zero at the origin, yet the sign of \(f'\) does change there and the point is a genuine minimum.

7.7.5 Greatest and least values on an interval

A question restricted to an interval such as \([0,3]\) is asking a different thing from a question about turning points. The largest value on an interval may occur at an end, where the curve is still climbing and never turns at all.

Note 7.36. To find the greatest and least values of \(f\) on \([a,b]\): find the stationary points lying inside the interval, then evaluate \(f\) at those points and at both endpoints \(a\) and \(b\). The largest and smallest of that list are the answers.

Example 7.37. Find the greatest and least values of \(f(x)=2x^3-9x^2+12x\) on the interval \([0,3]\).

Solution. Step 1 — find the stationary points. \[f'(x)=6x^2-18x+12=6\left (x^2-3x+2\right )=6(x-1)(x-2),\] \[f'(x)=0\quad \implies \quad x=1\ \text { or }\ x=2.\] Both lie inside \([0,3]\), so both are candidates.

Step 2 — evaluate \(f\) at the candidates and at both endpoints. \[f(0)=0,\] \[f(1)=2-9+12=5,\] \[f(2)=16-36+24=4,\] \[f(3)=54-81+36=9.\]

Step 3 — compare the four values. \[\therefore \quad \text {greatest value } 9 \text { at } x=3,\qquad \text {least value } 0 \text { at } x=0.\]

Note 7.38. Neither answer is a turning point — both occur at the ends of the interval. Stopping after Step 1 and reporting the local maximum \(5\) at \(x=1\) would be wrong twice over. The endpoints must always be tested.

7.7.6 Optimisation

Many practical questions come down to maximising or minimising something. The calculus is the easy part; the work is in getting the quantity written as a function of one variable before differentiating.

Example 7.39. A farmer has \(60\) m of fencing and wants to enclose a rectangular pen against a long straight wall, using the wall as one of the four sides. Find the dimensions that give the largest possible area, and state that area.

Solution. Step 1 — draw and name. Let the two sides perpendicular to the wall each have length \(x\) metres. The wall forms one long side, so only the other long side is fenced, and the fencing used is \(x+x+(\text {length})=60\): \[\text {length}=60-2x.\]

Step 2 — write the quantity to be maximised in terms of \(x\) alone. \[A=x(60-2x)=60x-2x^2.\] This step is the one that matters. Until the area is a function of a single variable, it cannot be differentiated.

Step 3 — differentiate and solve. \[\frac {dA}{dx}=60-4x=0\quad \implies \quad x=15.\]

Step 4 — confirm it is a maximum. \[\frac {d^2A}{dx^2}=-4<0,\] so \(x=15\) gives a maximum, as required.

Step 5 — answer the question that was asked. \[\text {length}=60-2(15)=30,\qquad A=15\times 30=450.\]

\[\therefore \quad \text {the pen should be } 15\text { m by } 30\text { m, giving an area of } 450\text { m}^2.\]

Note 7.40. The wall side is not fenced, so the perimeter equation is \(2x+\text {length}=60\) and not \(2x+2(\text {length})=60\). Nearly every error in questions of this kind is made here, in setting up, rather than in the differentiation.

Note 7.41. Step 5 matters too. The question asked for dimensions and an area, so stopping at \(x=15\) answers only part of it.

Example 7.42. A firm’s profit from selling \(x\) units is \[P(x)=-0.02x^2+400x-15000\ \text {kwacha}.\] Find the number of units that maximises the profit, and the maximum profit.

Solution. Step 1 — differentiate and solve \(P'(x)=0\). \[P'(x)=-0.04x+400=0\quad \implies \quad x=\frac {400}{0.04}=10\,000.\]

Step 2 — confirm it is a maximum. \[P''(x)=-0.04<0,\] so the profit is greatest, not least, at this level of output.

Step 3 — find the profit there. \[P(10\,000)=-0.02(10\,000)^2+400(10\,000)-15000\] \[=-2\,000\,000+4\,000\,000-15\,000=1\,985\,000.\]

\[\therefore \quad \text {producing } 10\,000 \text { units gives a maximum profit of K}1\,985\,000.\]

Note 7.43. The second-derivative check is not a formality here. A firm that found \(P'(x)=0\) and assumed a maximum could just as easily have located the worst possible output. With \(P''\) constant and negative the whole curve bends downward, so there is one turning point and it is a maximum.

Questions on this section

Stuck on something here? Ask below and it stays attached to this topic.