MATLAB: Finding Minimum value of radius

fminbndminimum

Problem 1: The volume V and paper surface area of a conical paper cup are given by:
V=1/3*pi*r^2*h
A =pi*r*sqrt(r^2+h^2)
For V = 10 in 3 , compute the value of the radius, r that minimizes the area A. What is the corresponding value of the height, h? What is the minimum amount that r can vary from its optimal value before the area increases by 10%.

Best Answer

hi Suman Koirla, try this :
The Volume is given by : V=(1/3)*r²*h, and the surface A=pi*r*sqrt(r²+h²)
for V=10 m^3, we search for r that minimizes the Surface , :
Min(A) , SUBject to V=10
we have : h=3*V/pi*r² then : A=pi*r*sqrt(r²+90/pi²*r^4) .
Min(A) means the dA/dr=0=......=4*pi*r^3-180 /(2*sqrt(pi*r^4+90/r²))=0
Fast way to find R :
syms r
A=(pi^2*r^2+90/r^2)^1/2
ezplot(A)
S=subs(A,-6:0.1:6); % AXIS based on the first graph
min(S)
1)so the minimum value for S=29.83 meter is R=1.89 ( FROM THE GRapH )
2) The corresponding value for h=3*10/(pi*1.89)=5.0525 meter .