Here is a typical setup for the newsvendor problem:
The newsvendor buys newspapers for $c$ each, sells them for $r$ each, and salvages unsold newspapers for $v$ each. The demand distribution has pdf $f(x)$ and cdf $F(x)$. What is the optimal order quantity, $Q^*$?
Each unsold unit (newspapers that the newsvendor buys but is unable to sell) incurs a holding cost of $h = c - v$. Each unmet demand (newspapers that customers demanded but the newsvendor did not have enough inventory to supply) incurs a stockout cost of $p = r - c$.
(Holding and stockout costs are sometimes called overage and underage costs and denoted $c_o$ and $c_u$, respectively.)
Here are three ways to approach formulating the objective function (minimizing the newsvendor's expected cost or maximizing expected profit). Each leads to a different "optimal" solution.
CAUTION: Two of these approaches are wrong! Keep reading.
Approach 1: Minimize the expected holding and stockout costs: $$g(Q) = \mathbb{E}\left[h(Q-D)^+ + p(D-Q)^+\right],$$ where $D$ is the random demand and $a^+ = \max\{0,a\}$; or, $$g(Q) = h\int_0^Q (Q-x)f(x)dx + \int_Q^\infty (x-Q)f(x)dx.$$ Taking the derivative, setting it equal to 0, and solving for $Q$, we get: $$Q^* = F^{-1}\left(\frac{p}{p+h}\right) = F^{-1}\left(\frac{r-c}{r-v}\right).$$
Approach 2: We purchase $Q$ units at a cost of $c$ each. Then we incur a cost of $h$ per unsold item and $p$ per unmet demand, so: $$\begin{align} g(Q) & = cQ + \mathbb{E}\left[h(Q-D)^+ + p(D-Q)^+\right] \\ & = cQ + h\int_0^Q (Q-x)f(x)dx + \int_Q^\infty (x-Q)f(x)dx. \end{align}$$ Then $$Q^* = F^{-1}\left(\frac{p-c}{p+h}\right) = F^{-1}\left(\frac{r - 2c}{r-v}\right).$$
Approach 3: We earn a revenue of $r$ per unit sold, and then we incur holding and stockout costs as above. Therefore, the expected profit is as follows: $$\begin{align} \pi(Q) & = r\mathbb{E}[\text{units sold}] - \mathbb{E}\left[h(Q-D)^+ + p(D-Q)^+\right] \\ & = r\left(\int_0^Q xf(x)dx + (1-F(Q))Q \right) - h\int_0^Q (Q-x)f(x)dx - \int_Q^\infty (x-Q)f(x)dx. \end{align}$$ This gives: $$Q^* = F^{-1}\left(\frac{r+p}{r+h+p}\right) = F^{-1}\left(\frac{2r-c}{2r-v}\right).$$
All three approaches seem logical. Which one is right, and why?