MATLAB: Volume/Surface Area of Paper Cup

  • Thread starter Thread starter malindenmoyer
  • Start date Start date
  • Tags Tags
    Area Matlab Paper
Click For Summary
SUMMARY

The discussion focuses on calculating the optimal dimensions of a paper cup modeled as a frustum of a cone using MATLAB. The cup is designed to hold a volume of 240 cm³, with the relationship R₂ = 1.3R₁. Participants discuss the use of MATLAB commands such as syms, fminbnd, and function handles to derive the surface area and volume equations. The primary goal is to minimize the surface area while adhering to the volume constraint, and the correct approach involves deriving the surface area equation in terms of a single variable, R₁.

PREREQUISITES
  • Understanding of frustum of a cone geometry
  • Familiarity with MATLAB syntax and commands
  • Knowledge of symbolic mathematics in MATLAB using syms
  • Experience with optimization techniques in MATLAB, specifically fminbnd
NEXT STEPS
  • Implement the optimization process using fminbnd to minimize surface area
  • Explore symbolic differentiation in MATLAB to find critical points
  • Study the MATLAB documentation on function handles for better code organization
  • Review examples of volume and surface area calculations for geometric shapes in MATLAB
USEFUL FOR

Students and professionals in engineering, mathematics, or design fields who are working on optimization problems using MATLAB, particularly those focused on geometric modeling and surface area minimization.

malindenmoyer
Messages
30
Reaction score
0
A paper cup shpaed as a frustum of a cone with R_2=1.3R_1 is designed to have a volume of 240 cm3. Determine R_1 and height hof the cup such that the least amount of paper will be used for making the cup.

The problem must be done in MATLAB, so please keep that in mind. We have learned commands such as feval, fminbnd, syms, and function handles...all of which I think could be applicable to the problem.
 
Last edited:
Physics news on Phys.org
Show us the MATLAB code you have written. You won't get much help until you try something first.
 
I am not particularly sure if this is even how you start the problem, but this is what I have done so far.

Code:
syms R1 h;
R2=1.3*R1;
V=(pi*h)/3*(R1^2+R2^2+R1*R2)-240;
S=pi*(R1+R2)*sqrt((R2-R1)^2+h^2)+pi*R1^2;

I know that I could solve for h using the Volume equation, and then have the Surface Area equation in terms of one variable essentially, as R2 is defined by R1; my thought process is such that I would take the new Surface Area equation (in terms of only R1) and take its derivative to find the critical points. This would give me R2 and then I could solve for h. Is this the right process?

Per LCKurtz's request, the two formulas I used to write the above code were the following:
V=\frac{1}{3}\pi h(\left R_1^2+R_2^2+R_1R_2)\right
S=\pi(R_1+R_2)\sqrt{(\left R_2-R_1)\right^2+h^2}+\pi R_1^2
 
Last edited:
malindenmoyer said:
I am not particularly sure if this is even how you start the problem, but this is what I have done so far.

Code:
syms R1 h;
R2=R1/3;
V=(pi*h)/3*(R1^2+R2^2+R1*R2)-240;
S=pi*(R1+R2)*sqrt((R2-R1)^2+h^2)+pi*R1^2;

I know that I could solve for h using the Volume equation, and then have the Surface Area equation in terms of one variable essentially, as R2 is defined by R1; my thought process is such that I would take the new Surface Area equation (in terms of only R1) and take its derivative to find the critical points. This would give me R2 and then I could solve for h. Is this the right process?

I don't use Matlab, but still...in your statement of the problem you give R2 = 1.3R1. Then in your code you put R2 = R1/3. Which is it? You need to be more careful.

For starters, your equation for volume needs to be just that, an equation, not a function.
 

Similar threads

Replies
3
Views
2K
  • · Replies 33 ·
2
Replies
33
Views
3K
  • · Replies 4 ·
Replies
4
Views
2K
Replies
3
Views
5K
Replies
11
Views
4K
  • · Replies 33 ·
2
Replies
33
Views
3K
Replies
6
Views
3K
  • · Replies 14 ·
Replies
14
Views
4K
Replies
3
Views
2K
  • · Replies 3 ·
Replies
3
Views
6K