Write a MATLAB code for "Finding the dimensions of a closed rectangular box with the maximum volume that can be inscribed in a unit sphere" using Lagranges Method.

Write a MATLAB code for "Finding the dimensions of a closed rectangular box with the maximum volume that can be inscribed in a unit sphere" using Lagranges Method.

Answers (1)

Sounds like your homework, and I'm sure you can't turn in our program as your own work, right? Read the link below.
I'm pretty sure the max box that could fit inside a sphere is a perfect cube with the long diagonal equal to the diameter of the sphere. I don't know what Lagranges Method is but you can find the dimensions of the box with sides sideLength from the equation sqrt(3)*sideLength = sphereDiameter. So
sphereDiameter=1;
sideLength = sphereDiameter / sqrt(3)
sideLength = 0.5774
I guess you can use that to check the results from your Lagrange Method of doing it.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!