Find integers $x, y, z > 0$ where:
$xy - xz - 10z$ is maximal, and $2x + y + z = 110$
How would one solve something like this using just algebra? It would be trivial to solve with calculus, but that shouldn't be necessary here.
Find integers $x, y, z > 0$ where:
$xy - xz - 10z$ is maximal, and $2x + y + z = 110$
How would one solve something like this using just algebra? It would be trivial to solve with calculus, but that shouldn't be necessary here.
$z = 0$ seems obvious. (or smaller is better). Since $z$ is strictly greater than $0.$ Set $z = 1$
That makes it maximize $xy$ constrained by $2x+y = 109$
$y = 109 - 2x\\ 109x - 2x^2$
$ax^2 + bx + c$ is (with $a<0$) is maximized when $x = -b/2a$ (vertex of a parabola) $x = 110/4$
the non-integer solution is $(27.25, 54.5, 1)$
The maximal integer solution will be
$(27, 55, 1)$
@Doug M @fleablood
First of all, due to the constraint:
$$\tag{0}2x+y+z=110,$$
we have the following range of integer values: $1 \leq x \leq 54$, $1 \leq y,z \leq 106$.
Taking into account (0), one can factor this expression into:
$$xy - (x+10)z = 2(x^2 + x y - 45 x + 5 y - 550 )=2(x + 5)(x + y - 50) - 600.$$
It is clear that this maximization is equivalent to the maximization of
$$\tag{1}P=(x + 5)(x + y - 50)$$
Let us give a fixed value to $z$.
$P$ is a product of factors whose sum ($2x+y-45$) is a constant equal to $155-z$ (using (0)).
It is well known in such a case that the maximum occurs if the two factors are equal, i.e., if
$$x+5=x+y-50 \ \ \Leftrightarrow \ \ y=55.$$
Remark: this value of $y$, due to constraint (0), has the consequence that $x \leq 27.$
Plugging this value of $y$ into (1), one gets:
$P=(x+5)^2$ which is maximized for the largest possible value of $x$ i.e., $x=27$.
Thus, due to (1), $z=110-2x-y=1$ ; the final solution is then:
$$(x,y,z)=(27,55,1).$$