<s>[INST] Find the natural numbers $a$ and $b$ so that $a\cdot b$ has the largest possible value but $a + b = x$ must hold. Is there a way to find the natural numbers $a$ and $b$ so that $a\cdot b$ has the largest possible value but $a + b = x$ must hold. It's easy small numbers but is there any way, through calculus or otherwise, to solve the general case?
 [/INST] Take $(a-b)^2$.  Any square is positive (except $0^2=0$) so you can conclude that
\begin{align}
0&\le(a-b)^2  &&\text{expand square binom:}\\
0&\le a^2-2ab+b^2   &&\text{add $4ab$ at both sides:}\\
4ab&\le a^2+2ab+b^2  &&\text{factorize square binom:}\\
4ab&\le(a+b)^2  &&\text{replace $x$:}\\
4ab&\le x^2  &&\text{divide by $4$:}\\
a\cdot b&\le\frac14x^2
\end{align}
So we have a max boundary for $a\cdot b$.  Now we must find that $a\cdot b=\frac14x^2$. If $x$ is odd it does not as $x^2$ is odd and $4$ does not divide $x^2$.
In the formula above, we can replace all $\le$ with $=$ if we make $a-b=0$, this is when $a=b=\frac12x$ which work for $x$ even.
For $x$ odd we cannot have $a=b$ so we will try the closest alternative: $a=b+1$ which means $a=\frac{x+1}2$ and $b=\frac{x-1}2$.  We hav (following the formulas)
\begin{align}
a-b &= 1\\
(a-b)^2 &= 1\\
a^2-2ab+b^2 &= 1\\
a^2+2ab+b^2 &= 4ab+1 \\
(a+b)^2 &= 4ab+1 \\
x^2 &= 4ab+1 \\
x^2-1 &= 4ab \\
ab &= \frac14(x^2-1)
\end{align}
Note that $\frac14(x^2-1)$ is the closest integer bellow $x^2$ for $x$ odd.
So the maximum value for $a\cdot b$ is:
$$
a\cdot b=\left\lfloor\frac14x^2\right\rfloor,
\qquad a=\left\lceil\frac12x\right\rceil,
\qquad b=\left\lfloor\frac12x\right\rfloor.
$$
(And no calculus was required)
</s>