Optimization with multiple variables
I was playing modded Minecraft and started wondering what the optimal dimensions for a multi block were; the multi block is basically a cube without corners (I'll attach a screenshot) and without the top surface with an empty interior, kinda like a bowl, and the value to optimize for Is the internal volume; what I was thinking of doing was get a constraint for the cost in blocks and use that to get the height in function of width and length, then derive by one of these 2 the volume (the number of blocks is a constant) and get the optimized length (or width) at a given width (or length), then substitute that so you get the volume in function of one variable and the constant max blocks and derive again to get the optimized value, but I feel like this isn't correct cause you are considering a variable like it is a constant and I don't think that would work, not sure though, what is the correct way to approach this and where is my approach wrong?