Then in terms of the standard normal cumulative distribution function:

$\displaystyle q=m+cP^{-1}_{0,1}(1-a/b)$

(Check that to make sure it is correct. for $\displaystyle a/b$ close to zero it will still give a negative $\displaystyle $$ q$, but that is because with a normal distribution there is always a finite probability of negative sales)

The above may still have errors you will have to check it, but the key idea is the use of the fundamental theorem of calculus:

If a>.5b then the value inside of is less than .5 and the value of q is less than 0. But if the cost of inventory is less than the cost of shortage (a<b), we know that optimal inventory I=m+q must be at least the expected demand m. Am I misunderstanding something?

If a>.5b then the value inside of is less than .5 and the value of q is less than 0. But if the cost of inventory is less than the cost of shortage (a<b), we know that optimal inventory I=m+q must be at least the expected demand m. Am I misunderstanding something?

Thank you for the time you've spent so far btw.

Did you read the caveats about checking as there may still be errors in the algebra?