Hmm.... this looks like a job for Lagrange multipliers.
It's useful to find the best compromise in a quantity that depends on two or more variables.... which seems to be what you want.
It's useful to find the best compromise in a quantity that depends on two or more variables.... which seems to be what you want.