Difference between revisions of "Applied Optimization Problems"

From Department of Mathematics at UTSA
Jump to navigation Jump to search
(Added video links)
Line 1: Line 1:
 +
==Introduction==
 +
Optimization is one of the uses of calculus in the real world. Perhaps we are a pizza parlor and wish to maximize profit. Perhaps we have a flat piece of cardboard and we need to make a box with the greatest volume. How does one go about this process?
 +
 +
This requires the use of maximums and minimums. We know that we find maximums and minimums via derivatives. Therefore, one can conclude that calculus will be a useful tool for maximizing or minimizing (collectively known as "optimizing") a situation.
 +
 +
In general, an optimization problem has a constraint that changes how we view the problem. The wording of the problem (whether subtle or not) can also drastically change how we view the problem. The constraint is the thing we will absolutely not change (such as the general shape, or the amount that we are willing to pay for the entire operation, etc.). If we can identify what we are going to change and what we are going to require stay the same, we will be on our way to solve the problem.
 +
==How to Solve==
 +
These general steps should be taken in order to complete an optimization problem.
 +
# Write out necessary formulas and other pieces of information given by the problem.
 +
#* The problems should have a variable you control and a variable that you want to maximize/minimize.
 +
#* The formulas you find may contain extra variables. Depending on how the question works out, they may be substituted out or can be ignored (which will be explained later).
 +
# Combine the formulas together so that the variable you want to maximize/minimize is on one side of the equation and everything else on the other.
 +
# Differentiate the formula. If your equation has multiple variables, pick any variable to differentiate as long as it is not the one you control (i.e. pick the variable that you could not get rid of from the formula).
 +
#* Note that during differentiation, if you come across a variable that you have not picked, imagine it as a number and apply the necessary differentiation rule. Do not treat it as a variable in this case.
 +
# Set the differentiated formula to equal 0 and solve for the variable you control.
 +
# The value you get here is your answer. If you instead have another formula, that means that your answer depends on those other variables, which would usually be what the question asked for if you have such a situation that you have another variable to juggle to begin with.
 +
The reason why this algorithm works comes from a few mathematical theorems which you will probably not need to know when completing these problems. Usually the problems given will be mathematically simple (in other words, there are not a lot of cases to test). However, if you wish to know, they work like this:
 +
*A derivative of 0 is either a global or local maximum or minimum. Usually the question will tend towards answering that question without much difficulty (like always positive numbers, for example)
 +
==Examples==
 +
===Volume Example===
 +
<div class="PrettyTextBox">A box manufacturer desires to create a closed box with a surface area of 100 inches squared and with a square base yet rectangular sides. What is the maximum  volume that can be formed by bending this material into a box?</div>
 +
*Write out known formulas and information
 +
:<math>A_{base}=x^2</math>
 +
:<math>A_{side}=x\cdot h</math>
 +
:<math>A_{total}=2x^2+4x\cdot h=100</math>
 +
:<math>V=l\cdot w\cdot h=x^2\cdot h</math>
 +
*Write the variable <math>h</math> in terms of <math>x</math> in the volume equation.
 +
:<math>2x^2+4xh=100</math>
 +
:<math>x^2+2xh=50</math>
 +
:<math>2xh=50-x^2</math>
 +
:<math>h=\frac{50-x^{2}}{2x}</math>
 +
:<math>\begin{align}
 +
V &=\left(x^{2}\right)\left(\frac{50-x^2}{2x}\right)\\
 +
&=\frac{50x-x^3}{2}
 +
\end{align}</math>
 +
*Find the derivative of the volume equation in order to maximize the volume
 +
:<math>\frac{dV}{dx}=\frac{50-3x^2}{2}</math>
 +
*Set <math>\frac{dV}{dx}=0</math> and solve for <math>x</math>
 +
:<math>\frac{50-3x^2}{2}=0</math>
 +
:<math>50-3x^2=0</math>
 +
:<math>3x^2=50</math>
 +
:<math>x=\pm\frac{\sqrt{50}}{\sqrt3}</math>
 +
*Plug-in the <math>x</math> value into the volume equation and simplify
 +
:<math>\begin{align}
 +
V &=\frac{1}{2}\left[50\sqrt{\frac{50}{3}}-\left(\sqrt{\frac{50}{3}}\right)^3\right]\\
 +
&=68.04138174...
 +
\end{align}</math>
 +
<div class="PrettyTextBox">Answer: <math>V_{max}=68.04138174...</math></div>
 +
===Volume Example II===
 +
[[File:Open-top box.svg|280x280px|right]]
 +
<div class="PrettyTextBox">It is desired to make an open-top box of greatest possible volume from a square piece of tin whose side is <math>\alpha</math> by cutting equal squares out of the corners and then folding up the tin to form the sides. What should be the length of the side of a cut-out square?</div>
 +
If we call the side length of the cut-out squares <math>x</math>, then each side of the base of the folded box is <math>\alpha-2x</math>, and the height is <math>x</math>. Therefore, the volume function is <math>V(x)=x(\alpha-2x)^2=x(\alpha^2-4\alpha x+4x^2)=\alpha^2x-4\alpha x^2+4x^3</math>.
 +
We must optimize the volume by taking the derivative of the volume function and setting it equal to 0. Since it does not change, <math>\alpha</math> is treated as a constant, not a variable.
 +
:<math>V(x)=\alpha^2x-4\alpha x^2+4x^3</math>
 +
:<math>\begin{align}
 +
0&=V'(x)=\alpha^2-8\alpha x+12x^2\\
 +
&= 12x^{2}-8\alpha x+\alpha^{2}
 +
\end{align}</math>
 +
We can now use the quadratic formula to solve for <math>x</math>:
 +
:<math>x=\frac{-b\pm\sqrt{b^2-4ac}}{2a}</math>
 +
:<math>\begin{align}
 +
x &=\frac{-(-8\alpha)\pm\sqrt{(-8\alpha)^2-4(12)(\alpha^2)}}{2(12)}\\
 +
&=\frac{8\alpha\pm\sqrt{64\alpha^2-48\alpha^2}}{24}\\
 +
&=\frac{8\alpha\pm\sqrt{16\alpha^2}}{24}\\
 +
&=\frac{8\alpha\pm 4\alpha}{24}
 +
\end{align}</math>
 +
:<math>x=\frac{\alpha}{6},\frac{\alpha}{2}</math>
 +
We reject <math>x=\frac{\alpha}{2}</math>, since it is a minimum (it results in the base length <math>\alpha-2x</math> being 0, making the volume 0).
 +
<div class="PrettyTextBox">Therefore, the answer is <math>x=\frac{\alpha}{6}</math>.</div>
 +
===Volume Example III===
 +
<div class="PrettyTextBox">A cylindrical can is required to hold <math>1.024\text{ L}</math> of liquid. Determine the measurements that will minimize the amount of material required to construct the can of specified volume.</div>
 +
This is a classic problem for optimization. The problem is we do not have any specified measurements. Luckily enough, we are given [[:w:International_System_of_Units|SI units]], so we can write what we are given accordingly,
 +
*Conversion factor: <math>1\text{ L}=1000\text{ cm}^{3}</math>. This means that through dimensional analysis (or basic algebra): <math>1.024\text{ L}=1024\text{ cm}^{3}</math>. Recall that this is the volume!
 +
*Volume of a cylinder: <math>V=\pi r^{2}h</math>
 +
*Surface area of a cylinder: <math>S=2\pi rh+2\pi r^{2}</math>
 +
Recall what we are trying to minimize: "the amount of material required to construct the can of specified volume." This means the surface area needs to be minimized! The unfortunate part is we have two variables (it is not constant). Luckily, we can use the volume to write <math>h</math> in terms of <math>r</math>:
 +
:<math>1024\text{ cm}^{3}=\pi r^{2}h</math>
 +
:<math>\Rightarrow \frac{1024\text{ cm}^{3}}{\pi {r\text{ cm}}^{2}}=\frac{1024}{\pi r^{2}}\text{ cm}=h</math>
 +
We can the substitute this information into the surface area formula and minimize (set the first derivative to zero):
 +
:<math>S(r)=2\pi r\left(\frac{1024}{\pi r^{2}}\right)+2\pi r^{2}</math>. Eliminate the <math>\pi</math> and <math>r</math>.
 +
:<math>\Rightarrow S(r)=2\cdot\frac{1024}{r}+2\pi r^{2}</math> Set the first derivative equal to zero.
 +
:<math>\begin{align}
 +
\Rightarrow0=S'(r)&=\frac{d}{dr}\left(\frac{2048}{r}+2\pi r^{2}\right)\\
 +
&=\frac{d}{dr}\left(\frac{2048}{r}\right)+\frac{d}{dr}\left(2\pi r^{2}\right)\\
 +
&=\frac{d}{dr}\left(2048\cdot{r}^{-1}\right)+2\pi\frac{d}{dr}\left(r^{2}\right)\\
 +
&=2048\cdot\frac{d}{dr}\left({r}^{-1}\right)+2\pi\left(2r\right)\\
 +
&=2048\cdot(-1){r}^{-2}+4\pi r\\
 +
&=-\frac{2048}{{r}^{2}}+4\pi r\\
 +
&=\frac{4\pi r^{3}-2048}{{r}^{2}}
 +
\end{align}</math>
 +
All that is left to do is find the critical values of the operation. This ultimately means to let the numerator equal zero and find what values of <math>r</math> make the denominator equal to zero. Here is the operation for the numerator:
 +
:<math>4\pi r^{3}-2048=0</math>
 +
:<math>\Leftrightarrow 4\pi r^{3}=2048</math>
 +
:<math>\Leftrightarrow r^{3}=\frac{2048}{4\pi}=\frac{512}{\pi}</math>
 +
:<math>\Leftrightarrow r=\sqrt[3]{\frac{512}{\pi}}=\frac{8}{\sqrt[3]{\pi}}\approx5.4623</math>
 +
Here is the operation for the denominator:
 +
:<math>{r}^{2}=0</math>
 +
:<math>r=\pm0</math>
 +
Let us note that we do not care about one of the critical values being equal to zero. This problem is asking us to find the value that makes the condition true but also minimized. While zero does minimize the amount of material used to construct the can, we cannot make a can if we do not show one. This solution would be interesting, however, if we were asked about the graph of <math>S(r)</math>. Nevertheless, our final answer may not necessarily be <math>r\approx5.4623\text{ cm}</math> and <math>h\approx10.9245\text{ cm}</math>. We need to verify that the critical value we found is the correct answer. That is where we substitute values for <math>r\in\left(0,\,\frac{8}{\sqrt[3]{\pi}}\right)</math> and <math>r\in\left(\frac{8}{\sqrt[3]{\pi}},\,\infty\right)</math> into the first derivative:
 +
:For <math>r\in\left(0,\,\frac{8}{\sqrt[3]{\pi}}\right)</math>, let <math>r=5</math>: <math>S'(5)=\frac{4\pi(5)^{3}-2048}{(5)^{2}}<0</math>. For <math>r\in\left(\frac{8}{\sqrt[3]{\pi}},\,\infty\right)</math>, let <math>r=6</math>: <math>S'(6)=\frac{4\pi(6)^{3}-2048}{(6)^{2}}>0</math>.
 +
Based on these results above, it is clear that <math>r=\frac{8}{\sqrt[3]{\pi}}</math> is a value that minimizes the function such that it allows us to make a can. Keep in mind, if you do not show that the value we found is a minimum, then this value could also be a maximum. Imagine if that were the case, and we suggested the company to produce a can that would maximize the amount of material used. Potentially millions of dollars of material costs would offset the profit from the optimum. Either way, we have found our answers:
 +
<div class="PrettyTextBox">Answer: the radius is <math>5.4623\text{ cm}</math> and the height is <math>10.9245\text{ cm}</math>.</div>
 +
 +
 +
==Resources==
 
* [https://mathresearch.utsa.edu/wikiFiles/MAT1214/Applied%20Optimization/MAT1214-5.1AppliedOptimizationPwPt.pptx Applied Optimization] PowerPoint file created by Dr. Sara Shirinkam, UTSA.
 
* [https://mathresearch.utsa.edu/wikiFiles/MAT1214/Applied%20Optimization/MAT1214-5.1AppliedOptimizationPwPt.pptx Applied Optimization] PowerPoint file created by Dr. Sara Shirinkam, UTSA.
  
 
* [https://mathresearch.utsa.edu/wikiFiles/MAT1214/Applied%20Optimization/MAT1214-5.1AppliedOptimizationWS1.pdf Applied Optimization Worksheet]
 
* [https://mathresearch.utsa.edu/wikiFiles/MAT1214/Applied%20Optimization/MAT1214-5.1AppliedOptimizationWS1.pdf Applied Optimization Worksheet]
  
 +
* [https://youtu.be/p1R0yiMl1Ag Cal1 Applied Optimization Part1] video lecture by Instructor Beatty
  
[https://youtu.be/p1R0yiMl1Ag Cal1 Applied Optimization Part1] video lecture by Instructor Beatty
+
* [https://youtu.be/y92f_F_EuKo Cal1 Applied Optimization Part2] video lecture by Instructor Beatty
 
 
[https://youtu.be/y92f_F_EuKo Cal1 Applied Optimization Part2] video lecture by Instructor Beatty
 

Revision as of 16:23, 30 September 2021

Introduction

Optimization is one of the uses of calculus in the real world. Perhaps we are a pizza parlor and wish to maximize profit. Perhaps we have a flat piece of cardboard and we need to make a box with the greatest volume. How does one go about this process?

This requires the use of maximums and minimums. We know that we find maximums and minimums via derivatives. Therefore, one can conclude that calculus will be a useful tool for maximizing or minimizing (collectively known as "optimizing") a situation.

In general, an optimization problem has a constraint that changes how we view the problem. The wording of the problem (whether subtle or not) can also drastically change how we view the problem. The constraint is the thing we will absolutely not change (such as the general shape, or the amount that we are willing to pay for the entire operation, etc.). If we can identify what we are going to change and what we are going to require stay the same, we will be on our way to solve the problem.

How to Solve

These general steps should be taken in order to complete an optimization problem.

  1. Write out necessary formulas and other pieces of information given by the problem.
    • The problems should have a variable you control and a variable that you want to maximize/minimize.
    • The formulas you find may contain extra variables. Depending on how the question works out, they may be substituted out or can be ignored (which will be explained later).
  2. Combine the formulas together so that the variable you want to maximize/minimize is on one side of the equation and everything else on the other.
  3. Differentiate the formula. If your equation has multiple variables, pick any variable to differentiate as long as it is not the one you control (i.e. pick the variable that you could not get rid of from the formula).
    • Note that during differentiation, if you come across a variable that you have not picked, imagine it as a number and apply the necessary differentiation rule. Do not treat it as a variable in this case.
  4. Set the differentiated formula to equal 0 and solve for the variable you control.
  5. The value you get here is your answer. If you instead have another formula, that means that your answer depends on those other variables, which would usually be what the question asked for if you have such a situation that you have another variable to juggle to begin with.

The reason why this algorithm works comes from a few mathematical theorems which you will probably not need to know when completing these problems. Usually the problems given will be mathematically simple (in other words, there are not a lot of cases to test). However, if you wish to know, they work like this:

  • A derivative of 0 is either a global or local maximum or minimum. Usually the question will tend towards answering that question without much difficulty (like always positive numbers, for example)

Examples

Volume Example

A box manufacturer desires to create a closed box with a surface area of 100 inches squared and with a square base yet rectangular sides. What is the maximum volume that can be formed by bending this material into a box?
  • Write out known formulas and information
  • Write the variable in terms of in the volume equation.
  • Find the derivative of the volume equation in order to maximize the volume
  • Set and solve for
  • Plug-in the value into the volume equation and simplify
Answer:

Volume Example II

Open-top box.svg
It is desired to make an open-top box of greatest possible volume from a square piece of tin whose side is by cutting equal squares out of the corners and then folding up the tin to form the sides. What should be the length of the side of a cut-out square?

If we call the side length of the cut-out squares , then each side of the base of the folded box is , and the height is . Therefore, the volume function is . We must optimize the volume by taking the derivative of the volume function and setting it equal to 0. Since it does not change, is treated as a constant, not a variable.

We can now use the quadratic formula to solve for :

We reject , since it is a minimum (it results in the base length being 0, making the volume 0).

Therefore, the answer is .

Volume Example III

A cylindrical can is required to hold of liquid. Determine the measurements that will minimize the amount of material required to construct the can of specified volume.

This is a classic problem for optimization. The problem is we do not have any specified measurements. Luckily enough, we are given SI units, so we can write what we are given accordingly,

  • Conversion factor: . This means that through dimensional analysis (or basic algebra): . Recall that this is the volume!
  • Volume of a cylinder:
  • Surface area of a cylinder:

Recall what we are trying to minimize: "the amount of material required to construct the can of specified volume." This means the surface area needs to be minimized! The unfortunate part is we have two variables (it is not constant). Luckily, we can use the volume to write in terms of :

We can the substitute this information into the surface area formula and minimize (set the first derivative to zero):

. Eliminate the and .
Set the first derivative equal to zero.

All that is left to do is find the critical values of the operation. This ultimately means to let the numerator equal zero and find what values of make the denominator equal to zero. Here is the operation for the numerator:

Here is the operation for the denominator:

Let us note that we do not care about one of the critical values being equal to zero. This problem is asking us to find the value that makes the condition true but also minimized. While zero does minimize the amount of material used to construct the can, we cannot make a can if we do not show one. This solution would be interesting, however, if we were asked about the graph of . Nevertheless, our final answer may not necessarily be and . We need to verify that the critical value we found is the correct answer. That is where we substitute values for and into the first derivative:

For , let : . For , let : .

Based on these results above, it is clear that is a value that minimizes the function such that it allows us to make a can. Keep in mind, if you do not show that the value we found is a minimum, then this value could also be a maximum. Imagine if that were the case, and we suggested the company to produce a can that would maximize the amount of material used. Potentially millions of dollars of material costs would offset the profit from the optimum. Either way, we have found our answers:

Answer: the radius is and the height is .


Resources