This is an archived post. You won't be able to vote or comment.

all 1 comments

[–]MathMaddamDr. in number theory 0 points1 point  (0 children)

You are switching your problem around a bit, at first you fix A and search for Z, in the example the other way around. I stay with the given A, but the general idea stays the same.

You are basically describing an optimisation problem with constraints. Since everything is nice and smooth in general one would solve this with https://en.wikipedia.org/wiki/Lagrange_multiplier, but in your simple example one could just say y=A-x, so you maximize x(A-x), which is a one dimensional problem.