If you're seeing this message, it means we're having trouble loading external resources on our website.

If you're behind a web filter, please make sure that the domains *.kastatic.org and *.kasandbox.org are unblocked.

## Differential Calculus

### Course: Differential Calculus>Unit 5

Lesson 11: Solving optimization problems

# Optimization: cost of materials

AP.CALC:
FUN‑4 (EU)
,
FUN‑4.B (LO)
,
FUN‑4.B.1 (EK)
,
FUN‑4.C (LO)
,
FUN‑4.C.1 (EK)
With all the storage you might have to handle for your shoe factory, I bet you'd also like to be able to minize the cost of storage. Created by Sal Khan.

## Want to join the conversation?

• While there were two variables in the equation, instead of defining h, could we have taken the derivative implicitly? •   It's always good to consider different strategies for solving problems, because sometimes implicit differentiation will save us a lot of effort. Bur if you did that in this case, you would get something like dC/dx = 40x + 36h + 36(dh/dx)x, and you'd be back to needing to find h(x) just like Sal did in order to solve dC/dx = 0 but you'd also need to calculate dh/dx. So this looks to me like a case where eliminating the dependent variables ahead of time will make for a less complicated solution.
• at 9.23 sal says there is only one critical point. however the way i caculated the x values for the derivative equal zero. i got x= -1.65096 and x=1.65096 • What if you wanted to get the maximum cost? • Same exact method, nearly. You find the points where the first derivative equals zero. Check the concavity of all these points (using the second derivative test) to find whether they are relative minimums or maximums, a negative concavity is a maximum. Check the Y-coordinates for all of your relative maximums, and find the largest one. HOWEVER, these are RELATIVE maximums. It is possible, such as in Sal's problem above, that your ABSOLUTE maximum is infinite (this is, of course, also true for minimums). The best method to know for sure is to learn, learn, learn you graphing, you should be able to tell fairly easily what most equations do. If you're not there yet, just plug in a very high positive and negative x-value and find if the corresponding y-value is higher then your relative maximum.
• How would you do the same thing but for an area of land? For instance, A=780 square feet and two corresponding sides cost \$6, and the other two cost \$4? • It's a relatively simple adjustment. You start with 3 variables. X=width of the space, Y=length of the space, and C=cost of materials.
Because you know that the area is 780 square feet, you know that 780 is the product of x and y.
X*Y=780
You also know that c is the combined cost of the materials. the cost of the materials is going to be determined by the perimeter of the space. Perimeter is equal to twice the length + twice the width. You can then assign the \$6 cost to one variable and the \$4 cost to the other. From this you can build the equation:
6(2X) +4(2Y)=C

to move on you need a single equation with only 2 variables. Simply isolate the Y variable on one side of the first equation so you can substitute the expression it's equal to into the second equation.

X*Y=780
Y=780/X

6(2x)+4(2(780/x))=C

no simplify a little.

6(2X)+4(2(780/X))=C
12X+4(1560/x)=C
12X+6240/x=C

Change the 6240/x to 6240X^-1 to make deriving easier. Then find dc/dx using the power rule.
12X+6240X^-1=C
dc/dx=12-6240X^-2

Next, set dc/dx equal to 0 this will allow you to find the x value for all mins and maxes in the original equation. Now solve for X.

dc/dx=12-6240X^-2
0=12-6240X^-2
6240X^-2=12
6240X^-2*X^2=12X^2
6240=12X^2
520=X^2
±√(520)=X
X=±√(520)
X=±√(130)*4
X=2√(130), -2√(130)

Right away you can discard the negative answer because X is a length and you cannot have negative length, so X=2√(130). If there were multiple positive X's it would be simple to test. You could either do the second derivative test to find out whether they are maximums or minimums, or you could simply plug into the cost equation and find out which one is cheaper. In either case we don't have to do that in this problem, so moving on.

to find Y plug into the first equation
X*Y=780
2√(130)*Y=780
Y=780/(2√(130))
Y=340/√(130)

Now to find C plug X into the cost equation.

12X+6240X^-1=C
12(2√(130))+6240(2√(130))^-1=C
24√(130)+6240/(2√(130))=C
24√(130)+3120/√(130)=C
24√(130)*√(130)/√(130)+3120/√(130)=C
24*130/√(130)+3120/√(130)=C
3120/√(130)+3120/√(130)+C
6240/√(130)=C

The \$6 per foot side X=2√(130)=11.402 feet
The \$4 per foot side Y=340/√(130)=29.820 feet
The total cost C=\$6240/√(130)=\$547.28
• @ 6.20 Sal simplifies 36x(5/x^2) to 180x^x-1; is someone able to explain how that works in more detail? I so confused • At 0 = 180/x^2 - 40x, why doesn't he simplify that to a linear equation for that to equal to 0 = 40x - 180? I don't understand why he made the highest degree of x to be cubic, not linear (as he derived the quadratic equation) • This doesn't algebraically simplify to a linear equation. Multiplying both sides of 0 = 180/x^2 - 40x by x^2 (to get rid of the denominator) would give 0 = 180 - 40x^3.

Note that we expect to get a cubic because the ratio of the term -40x to the term 180/x^2 (i.e. -40x/(180/x^2)) simplifies to a constant times x^3.

Have a blessed, wonderful day!
• in this scenario, when it is obvious that there is a minmum and no maximum, do we still have to take the second derivitave
(1 vote) • How does it work out that we only get one critical point and it's exactly the one we need? Like how does that work in real life? Does it always work out like that? Maybe there is no way to minimize the cost, like there is no absolute minimum point, then what?
(1 vote) • The answer to your question depends very much on which real-life situation we're modeling.

Some situations have no minimum solution...as a trivial example, how would you find the minimum number of basketball players on the court as a function of time? The mathematical expression of how many basketball players allowed on the court is f(t) = 5, so the minimum is constant at 5, which is the same as the maximum. Any constant function would result in the same outcome.

Some situations might have more than one minimum. I can think of a number of non-trivial real-life functions with multiple minima or maxima, which are sinusoidal in form. Can you think of such a function?  