Method: compute H and then C for a range of values of R, then find the minimum value of C and the corresponding values of R and H. To determine the range of R to investigate, make an approximation by assuming that H = R. Then from the tank volume: 2 5 Vtank = 500 = πR3 + πR3 = πR3 3 3 Solving for R: R= From Matlab: Rest = (300/pi)^(1/3) Rest = We will investigate R in the range to meters. Computational implementation: Matlab script to determine the minimum cost design: % % %. | Method compute H and then C for a range of values of R then find the minimum value of C and the corresponding values of R and H. To determine the range of R to investigate make an approximation by assuming that H R. Then from the tank volume Vtank 500 nR3 2 nR3 5 nR3 3 3 Solving for R From Matlab Rest 300 pi 1 3 Rest We will investigate R in the range to meters. Computational implementation Matlab script to determine the minimum cost design Tank design problem Compute H C as functions of R R 3 Generate trial radius values R H 500. pi R. 2 - 2 R 3 Height H C 300 2 pi R. H 400 2 pi R. 2 Cost Plot cost vs radius plot R C title Tank Design . xlabel Radius R m . ylabel Cost C Dollars grid Compute and display minimum cost corresponding H R Cmin kmin min C disp Minimum cost dollars disp Cmin disp Radius R for minimum cost m disp R kmin disp Height H for minimum cost m disp H kmin 139 Running the script Minimum cost dollars 004 Radius R for minimum cost m Height H for minimum cost m Note that the radius corresponding to minimum cost Rmin is close to the approximate value Rest that we computed to assist in the selection of a range of R to investigate. The plot of cost C versus radius R is shown in Figure . Figure Tank design problem cost versus radius Sums and Products If x is a vector with N elements denoted x n n 1 2 . N then The sum y is the scalar N y x n x 1 x 2 x N n 1 140 The product y is the scalar N y n x n x 1 x 2 x N n 1 The cumulative sum y is the vector having elements y k k 1 2 . N k y k yy x n x 1 x 2 --- x k n 1 The cumulative product y is the vector having elements y k k 1 2 . N k y k n x n x 1 x 2 x k n 1 If X is a matrix with M rows and N columns with elements denoted x m n m 1 2 . M n 1 2 . N then The column sum y is the vector having elements y n n 1 2 . N M y n yz x m n x 1 n x 2 n x M n m 1 The column product y is the vector having elements y n n 1 2 . N M y n x m n x 1 n x 2 n x