TeX source:
$=\frac{1}{T}[$ revenue from sale-purchase cost-holding cost+earned interest-payable interest-idle cost-ordering cost]$$\begin{aligned}=& \frac{1}{T}\left[\left(c_{r_{1}}-c_{r}\right) p_{m} T_{s}-\frac{h_{r}}{2}\left(\frac{p_{m}^{2} T_{s}^{2}}{D_{c}}-2 n p_{m} T_{s} T_{R}-(2 n+1) T_{R} D_{R}\right)\right.\\&+\frac{n c_{r_{1}} i_{e} D_{c} M^{2}}{2}+\frac{c_{r_{1}} i_{e}}{2}\left(p_{m} T_{s}-n D_{R}\right)\left(2 M-T^{\prime}\right) \\&\left.-\frac{n c_{r} I_{p}}{2}\left[T_{R} D_{R}+D_{c} M^{2}-2 M D_{R}\right]-\mathrm{id}_{r} T_{R}-A_{r}\right]\end{aligned}$$