f={1 \over 2}\Bigg(a+c-\frac{ac}{d}\Bigg)