- 111

- 0

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

Does anyone know how to solve this sort of problem?

Does anyone know how to solve this sort of problem?

Last edited: