Correct equations for profit and minimum investment