weetabixharry
- 111
- 0
I want to find the positive integer, x, which minimises the following function:f(x) = (mn - 2(n-1)x - 1)^2where m and n are positive integers. I also have the further constraint that:\frac{m}{x} = \mathrm{positive \ integer}I guess calculus might not be a good route to take, since x can only take certain discrete values. Indeed, computing \frac{d}{dx}f(x) and equating to zero gives:x_{\mathrm{min}}=\frac{mn-1}{2(n-1)}which does not necessarily lead us to the correct solution (if we round to the nearest integer factor of m).
Does anyone know how to solve this sort of problem?
Does anyone know how to solve this sort of problem?
Last edited: