this review article is all about optimization. here, you’ll learn the tools and techniques for setting up and solving these often difficult problems. and along the way, we’ll work out a few examples!
optimization
the method of optimization uses derivatives to find maximum or minimum values. however, the functions that need to be optimized typically have more than one variable. hence, considerable work goes into transforming the problem into a single-variable function first.
let’s introduce the methods using a concrete example.
example: a widget factory
suppose you own a business that makes and sells widgets. if you sell x widgets at a price of p dollars each, then that earns your company a total of xp dollars. by the way, the quantity r = xp is called the revenue.
so why not just charge a huge price for each widget to earn the most money you can? after all, the objective of most successful companies is to maximize their revenue.
well, you would raise prices, except that you noticed in the past that every time you did so, there were fewer sales of widgets. in other words, as p increases, x decreases.
fortunately, if you know exactly what the relationship between price and number of widgets sold at that price (or demand), then you can use optimization to find the price that maximizes your revenues!
using the relation to reduce variables
next, suppose that we add one vital piece of information to this problem: the relationship between price and demand is given:
x = 400 – 40p + p2, for 0 ≤ p ≤ 20
note, any equation that relates the variables of an optimization problem is a constraint equation.
now do you remember that revenue function? (in case you forgot, it was r = xp.)
let’s use the relationship between x and p replace x to create an objective function having only one variable.
r = xp = (400 – 40p + p2)p = 400p – 40p2 + p3
using the derivative to find the maximum
now that we have a single-variable expression, we can use the usual techniques from calculus to find its maximum value.
first take the derivative of the objective function:
r ' = 400 – 80p + 3p2
next, set the derivative equal to zero to locate any critical points. here, we’ll have to use the quadratic formula.
400 – 80p + 3p2 = 0
p = 6.67, or 20.
because we got two answers, we have to check which one (if any) gives the correct result. plugging in each one into the revenue function, we find:
r(6.67) = 400(6.67) – 40(6.67)2 + (6.67)3 = 1185.18
r(20) = 400(20) – 40(20)2 + (20)3 = 0
clearly p = 6.67 gives better revenue.
(by the way, since there was a restriction that 0 ≤ p ≤ 20, we do not have to worry about what the revenue function does beyond p = 20.)
solving the original problem
according to the work above, the price should be p = $6.67. then, to find the actual number of widgets that produces this amount, simply plug into the constraint.
x = 400 – 40(6.67) + (6.67)2 = 177.7
rounding to the nearest widget, your company should produce and sell 178 widgets at a price of $6.67 each to achieve a maximum revenue of (178)(6.67) = $1,187 (approximately).
method of optimization
so what have we learned from the above example? even though most of the work was peculiar to this situation (revenue, price, demand, etc.), there are a number of steps that are useful in general.
- read the problem carefully. (this should go without saying.) identify what you are trying to maximize or minimize (the objective) and what relationships exist among the variables (constraint equation).
- write the objective as well as any constraints in terms of the variables in the problem.
- use algebra to solve the constaint(s) and reduce the number of variables in the objective. the goal is to express your objective function in terms of only one variable.
- use calculus to find the max or min of the objective function. this means taking a derivative, setting it equal to zero, solving, and determining which solutions give the appropriate answers for the given problem.
- make sure you answer the original question. you might have to find the values of the other variables or quantities now.
the hardest thing about optimization problems is the setup (steps 1-2), because that changes from problem to problem.
example: rectangles and parabolas
find the largest area possible for a rectangle inscribed between the parabola y = 9 – x2 and the x-axis, with its base on the x-axis.
solution
first, let’s sketch the graph of the parabola as well as a typical inscribed rectangle.
our objective is to maximize the area of the rectangle.
area of a rectangle: a = bh.
because the parabola touches the rectangle at its upper corners, we know that the height of the rectangle is the same as the y-coordinate of the upper right corner point. that is, h = y = 9 – x2.
the base length of the rectangle is b = 2x (a distance of x on the left and the right side).
the two equations above are the constraints. let’s replace the variables b and h in our objective function by their equivalent expressions in terms of x.
a = bh = (2x)(9 – x2) = 18x – 2x3
now we can take a derivative and set it equal to zero.
of course, only the positive x-value makes sense in this context. plug x = √3 into the area formula (objective function) to find the maximum area.
leave a reply