\( \definecolor{colordef}{RGB}{249,49,84} \definecolor{colorprop}{RGB}{18,102,241} \)

Modelling and Optimisation

Optimisation

Optimisation is one of the most important applications of differential calculus. It involves finding the maximum or minimum value that a function can take, subject to given conditions. In many problems, this corresponds to finding the global maximum or minimum of that function on a specified domain.
Definition Optimisation
Optimisation is the process of finding a maximum or minimum value of a function, known as the objective function, subject to a set of constraints (or over a specified domain). The solution that achieves this is called the optimal solution.
Example
In machine learning, a key goal is to minimize a loss (error) function by adjusting model parameters. This optimisation process underlies how modern neural networks are trained.
Method Solving Optimisation Problems
  1. Model: Identify the quantity to be optimised and express it as a function of a single variable (for example \(f(x)\)). Use any given constraints to eliminate other variables. Determine the feasible domain for \(x\).
  2. Differentiate: Find the first derivative of the function, \(f'(x)\).
  3. Find Stationary Points: Solve \(f'(x)=0\) for \(x\) in the domain.
  4. Test and Justify: Use the first derivative test (sign diagram) or the second derivative test to confirm whether each stationary point is a local maximum, local minimum, or neither.
  5. Check Endpoints: If the domain is a closed interval \([a, b]\), evaluate the function at the stationary points and also at the endpoints, \(f(a)\) and \(f(b)\), to find the global extremum on that interval.
  6. Conclusion: State the final answer clearly in the context of the problem, including units.
Example
A rectangle has a perimeter of 12 cm. Find its dimensions to maximize the area.

  • Model: Let the length be \(x\) and the width be \(y\).
    The perimeter is \(2x+2y=12\), which simplifies to \(x+y=6\) and hence \(y=6-x\).The area is \(A=xy\). We write \(A\) as a function of \(x\):$$ A(x) = x(6-x) = 6x-x^2. $$Since lengths must be non-negative, \(x \ge 0\) and \(y=6-x \ge 0 \implies x \le 6\). The domain is \(x \in [0,6]\).
  • Derivative:$$A'(x) = 6-2x.$$
  • Stationary point:$$ A'(x) = 0 \implies 6-2x=0 \implies 2x=6 \implies x=3. $$
  • Justification: We use the second derivative test.$$A''(x) = -2.$$Since \(A''(3)=-2 < 0\), the point \(x=3\) corresponds to a local maximum of \(A\).
  • Check endpoints:The domain is the closed interval \([0,6]\). We check the area at the critical point and at the endpoints:
    • \(A(0) = 6(0)-0^2 = 0\)
    • \(A(3) = 6(3)-3^2 = 18-9 = 9\)
    • \(A(6) = 6(6)-6^2 = 0\)
    The area is maximised at \(x=3\).
  • Conclusion: The area is maximised when the length is \(x=3\) cm. The corresponding width is \(y=6-3=3\) cm. The rectangle with maximum area is therefore a square of side 3 cm, with an area of \(9\text{ cm}^2\).

Rates of Change

The derivative of a function measures its instantaneous rate of change. This concept is fundamental to describing how one quantity changes in relation to another. For example, velocity is the rate of change of position with respect to time, and acceleration is the rate of change of velocity with respect to time.
Definition Average and Instantaneous Rate of Change
For a function \(y=f(x)\):
  • The average rate of change over the interval \([x_1, x_2]\) is the slope of the secant line:$$ \frac{\Delta y}{\Delta x} = \frac{f(x_2)-f(x_1)}{x_2-x_1}. $$
  • The instantaneous rate of change at \(x=a\) is the derivative of the function at that point:$$ \frac{dy}{dx}\bigg|_{x=a} = f'(a). $$
In many real-world situations, several quantities vary with time, and their rates of change are related. For example, the volume, radius, and surface area of a growing spherical balloon are all functions of time, and their rates of change are connected. Related rates problems involve finding the rate of change of one quantity by relating it to other quantities whose rates of change are known.
Method Solving Related Rates Problems
  1. Model: Identify all quantities that are changing with time and assign them variables. Write down the given rates of change and the rate you need to find (at a specific instant).
  2. Equation: Find an equation that relates the variables.
  3. Differentiate: Differentiate both sides of the equation with respect to time (\(t\)), using the chain rule.
  4. Substitute and Solve: Substitute all known values (including the value of each variable at the instant of interest) into the differentiated equation and solve for the unknown rate.
Example
Air is being pumped into a spherical balloon so that its volume increases at a rate of 100 cm\(^3\)/s. How fast is the radius of the balloon increasing when the diameter is 50 cm?

  • Model: Let \(V\) be the volume and \(r\) be the radius of the balloon.We are given the rate of change of the volume:$$\dfrac{dV}{dt} = 100\ \text{cm}^3/\text{s}.$$We want to find the rate of change of the radius, \(\dfrac{dr}{dt}\), at the instant when the diameter is 50 cm, which means the radius is \(r = 25\) cm.
  • Equation: The volume of a sphere is given by the formula$$V = \frac{4}{3}\pi r^3.$$
  • Differentiate: We differentiate both sides with respect to time \(t\):$$ \frac{d}{dt}(V) = \frac{d}{dt}\left(\frac{4}{3}\pi r^3\right). $$Using the chain rule on the right side:$$ \frac{dV}{dt} = \frac{4}{3}\pi \cdot (3r^2) \cdot \frac{dr}{dt} = 4\pi r^2 \frac{dr}{dt}. $$
  • Substitute and solve: Now, we substitute the known values into this equation:$$ 100 = 4\pi (25)^2 \frac{dr}{dt} $$$$ 100 = 4\pi(625) \frac{dr}{dt} $$$$ 100 = 2500\pi \frac{dr}{dt}. $$Solving for \(\dfrac{dr}{dt}\):$$ \frac{dr}{dt} = \frac{100}{2500\pi} = \frac{1}{25\pi}. $$
  • Conclusion: The radius of the balloon is increasing at a rate of$$\dfrac{1}{25\pi}\ \text{cm/s}$$when the diameter is 50 cm.