Let x and y be real numbers such that 2(x^2 + y^2) = x + y + 1. Find the maximum value of x - y.
x - y = a
x = a + y
2(x^2 + y^2) = x + y + 1
2((a + y)^2 + y^2) = (a + y) + y + 1
2(a^2 + 2y^2 + 2ay) = a + 2y + 1
4y^2 + 4ay + 2a^2 = a + 2y + 1
(4)y^2 + (4a-2)y + 2a^2 - a - 1 = 0
We're looking for the highest possible a value.
This equation is only true when the discriminant is non negative.
b^2 - 4ac >= 0
(4a-2)^2 - 4(4)(2a^2 - a - 1) >= 0
-16a^2 + 20 >=0
-4a^2 + 5 >= 0
-4a^2 >= -5
a^2 =< 1.25
So the max value of a is sqrt(1.25).
This could probably be done faster geometrically too.
=^._.^=