Fermat's method of calculus I'm researching Fermat's method of calculus and basically, I've found he wanted to solve a problem where two numbers add up to x and multiplied together is y. So you take 2 values $a$ and $b$, and $a=x−b,b=b$ therefore $(x−b)b=y$ and $xb−b^2=y$. Then you take e equal to some small value and do the same thing but replace b with (b+e) getting $(b+e)(x−(b+e))$ and eventually get $xb+xe−b^2−2be−e^2$. then you set the equations equal to each other( the one with e and without e) after this, you can cancel out terms and be left with $xe−2be−e^2=0$ and solve further by adding $2be$ to both sides then dividing by e on both sides you'll end up with 2b=−e+x. the method then says to take $e=0$ and then $b=x/2$ is the value which will give you a maximum y for $xb−b^2=y$.
Can someone explain to me how this works out?
 A: You need to state clearly what the problem is that is being solved. If you leave that to the very end, it makes it extremely hard to follow what is going on. But if you recognize that first, following the procedure makes more sense.
The problem being solved is: given a number $x$, find $a,b$ such that $a+b = x$ and the product $ab$ is as large as possible.
For the solution, first we note that $a = x - b$, so we can replace it, and have just one unknown variable to worry about. Fix a value for $b$. The product for $b$ is $b(x-b) = xb - b^2$.
Other values will differ from $b$ by some value $e$. The number is $b + e$ and the product is $(b+e)(x - (b+e)) = xb+xe−b^2−2be−e^2$.
The difference between the product for $b$ and for $b+e$ is
$$(xb-b^2) - (xb+xe−b^2−2be−e^2) = e^2 + 2be - xe = e(e+2b - x)$$
Notice that if we now choose $b = \frac x2$, this simplifies to $e^2$.
But $e^2 > 0$ if $e \ne 0$. So the difference in products between $b=\frac x2$ and any other value is always going to be a positive number, indicating that the product for $b=\frac x2$ is the maximum.
