Minimize the sum with regards to $p$ I need to minimize the following quantity with respect to $p$, but I don't know how to go about it. Here it is:
$$\frac {x(p+h)}{pb} + \frac{(k-1)(p+h)}{b}$$
According to my textbook the answer should be 
$$p = \sqrt \frac{xh}{k-1}$$
I tried deriving but didn't get the same result. Any ideas?
 A: Your problem reduces to minimizing
$$
{xh\over p}+{(k-1)p}=\left[\sqrt{xh\over p}-\sqrt{(k-1)p}\right]^2+2\sqrt{xh(k-1)}
$$
Equate the expression inside brackets to zero to get the desired result.
A: Just differentiate in regards to $p$ and set the derivative to $0$:
$${\partial\over \partial p}\left(\frac {x(p+h)}{pb} + \frac{(k-1)(p+h)}{b}\right) $$
$$= {1\over b}{\partial\over \partial p}\left(\frac {x(p+h)}{p} + (k-1)(p+h)\right) $$
$$= {1\over b}\left({\partial\over \partial p}\left(\frac {x(p+h)}{p} \right)+ {\partial\over \partial p}\big(  (k-1)(p+h)\big)\right) $$
$$= {1\over b}\left({\partial\over \partial p}\left(x+\frac {xh}{p} \right)+ {\partial\over \partial p}\big( kp-kh-p -h\big) \right)$$
$$= {1\over b}\left(\left(-\frac {xh}{p^2} \right)+ k - 1 \right)$$
Now, set the result to zero and solve for $p$:
$$ {1\over b}\left(\left(-\frac {xh}{p^2} \right)+ k - 1 \right) = 0$$
$$\iff  \left(-\frac {xh}{p^2} \right)+ k - 1  = 0$$
$$\iff -\frac {xh}{p^2}  = 1 - k$$
$$\iff {1 \over p^2}  = -{1 - k \over xh}$$
$$\iff {p^2}  = {xh \over k - 1}$$
$$\iff {p}  = \sqrt{xh \over k - 1}$$
