A water tank consists of a cylindrical part of radius r and height h, and a hemi
ID: 1822574 • Letter: A
Question
A water tank consists of a cylindrical part of radius r and height h, and a hemispherical top. The tank is to be constructed to hold 500 m3 of fluid when filled. The surface area of the cylindrical part is (2*pi*r*h), and its volume is (pi*r^2*h). The surface area of the hemispherical top is given by (2*pi*r^2) and its volume is given by (2*pi*r^3 / 3). The cost to construct the cylindrical part of the tank is $300.00/m^2 of the surface area and 400 / m^3 for the hemispherical top. Plot the cost versus r for 2<= r <=10mExplanation / Answer
first: look at your given equations.
1) V = 500m3 = pi*r^2*h + (2/3)*pi*r^3
2) SA = 2*pi*r*h + 2*pi*r^2
you want to minimize the cost of the surface area using 2 different prices, so you need to assign a "weight" to the cylinder SA and hemisphere SA.
SA = 300*(2*pi*r*h) + 400*(2*pi*r^2)
now, you need to turn SA into a function of r only. Use eqn 1) to solve for h. Substitute h into SA. Minimize this SA using fminbnd.
Open a new M-file in matlab.
Create your function: f = @(r)SA
Use the fminbnd: x = fminbnd(f,r1,r2)
r1 and r2 are your lower and upper limits for the bounds.
Hint: r1 > 0, r2 < 10
M-file:
f = @(r)SA
x = fminbnd(f,r1,r2)
once you know r, you can go back and find h using eqn 1)
A note: When you create your function f, you need the @(r) to define it as a function. Try using Matlab's help for fminbnd and look at the examples.
Hopefully you can make sense of this.
So you can check your results:
1<h<2
5<r<6
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.