Topic:Optimisation
Contents |
What is optimisation?[edit]
Optimisation is the process of finding extrema (maximum or minimum values) of a particular function. In this guide we will use differentiation to determine these extrema of functions of one or more variables.
How to find extrema of 1 variable[edit]
Consider the following image:

As you can see it has a maximum value and the tangent at this value is horizontal. This means the gradient of the function at the maximum value is 0. Therefore to find these 'stationary points' you need to find where the derivative of the function is 0.
So differentiate the given function and then solve with the function equal to 0. This will give you the point(s) where the function has extrema.
To determine whether the point is a maximum or a minimum, you need to find the second derivative (ie differentiate again). If the value of this function at the stationary point is less than 0 it is a maximum, otherwise it is a minimum.
Example 1
The effectiveness of a particular drug is given by the function:

where E represents the effectiveness and C is the concentration of the drug. Find the concentration of the drug where it is most effective.



Ensure that this value is a maximum:

Therefore is a maximum
Example 2
A man needs to run from one point to another which is along a flat road measuring 200m and up a slope of length 50m. Given that he can run at 6ms-1 along the road and 4ms-1 up the slope, find the value of x (see diagram below) to minimise the time taken and therefore find the minimum time.

As can be seen, the shortest path is along the road and then up the slope at an angle. [marked in red] From mechanics, time is the distance divided by the speed.
Let the horizontal distance be x, therefore the time of that section =
.
To work out the slope distance we use pythagoras' theorem. ie dist = [(200 - x)2 + 502]0.5
and therefore the time taken is
.
Finally this gives us our equation of time: ![T=\frac{x}{6}+\frac{[(200 - x)^2 + 50^2]^{0.5}}{4}](http://upload.wikimedia.org/math/4/9/a/49a1da8e576f02347b81e10427ffb633.png)
Differentiation gives us the equation:
This is equal to 0 when x = 155.2786404m.
This means that ![T=\frac{155.2786404}{6}+\frac{[(200 - 155.2786404)^2 + 50^2]^{0.5}}{4}](http://upload.wikimedia.org/math/5/7/5/5754c1cde02ad7405b6773c76bcd6467.png)

Partial Differentiation[edit]
In functions of more than one variable you need to use partial differentiation. Partial differentiation is the process of differentiation with respect to a single variable in the equation treating others as a constant. Ie if a function has 4 variables, you get 4 partial derivatives. Denoted by
where n is the variable you are differentiating with respect to.
Example
f(w,x,y,z) = wx2z + ewyz + ln|y2|. Find all 4 partial derivatives.




Extrema of 2 variables[edit]
Consider the following image:
File:3doptim.jpg
functions of 2 variables also have extrema. However in this case you need to check where both the gradient in the x direction AND in the y direction are 0. To do this you need to do partial differentiation on the function you are trying to evaluate. Once you have these, you need to find when both functions are equal to 0 and then try and solve for both equations.