#### Answer

$$\frac{dA}{dq}=\frac{-km}{q^2}+\frac{h}{2}$$
$$\frac{d^2A}{dq^2}=\frac{2km}{q^3}$$

#### Work Step by Step

$$A(q)=\frac{km}{q}+cm+\frac{hq}{2}$$
Find $dA/dq$:
$$\frac{dA}{dq}=\frac{d}{dq}\Big(\frac{km}{q}+cm+\frac{hq}{2}\Big)$$
Remember that we concern ourvselves with the variable $q$ only. All the others are constants, so we treat them like numbers.
$$\frac{dA}{dq}=\frac{d}{dq}\frac{km}{q}+\frac{d}{dq}(cm)+\frac{d}{dq}\frac{hq}{2}$$
$$\frac{dA}{dq}=\frac{(km)'q-km(q)'}{q^2}+0+\frac{h}{2}(q)'$$
$$\frac{dA}{dq}=\frac{0\times q-km\times1}{q^2}+\frac{h}{2}\times1$$
$$\frac{dA}{dq}=\frac{-km}{q^2}+\frac{h}{2}$$
Find $d^2A/dq^2$: $$\frac{d^2A}{dq^2}=\frac{d}{dq}\Big(\frac{-km}{q^2}+\frac{h}{2}\Big)$$
$$\frac{d^2A}{dq^2}=\frac{d}{dq}\frac{-km}{q^2}+\frac{d}{dq}\frac{h}{2}$$
$$\frac{d^2A}{dq^2}=\frac{(-km)'q^2-(-km)(q^2)'}{q^4}+0$$
$$\frac{d^2A}{dq^2}=\frac{0\times q^2+km\times2q}{q^4}$$
$$\frac{d^2A}{dq^2}=\frac{2kmq}{q^4}=\frac{2km}{q^3}$$