Show that $$\frac{x^2}{x+1} + \frac{(1-x)^2}{2-x} \geq \frac 1 3$$ if $0 \leq x \leq 1$.
Source: Brilliant.
I have tried the following: $$\frac{x^2}{x+1}=(x+1)+\frac{1}{x+1} -2$$ $$\frac{(1-x)^2}{2-x}= (2-x) + \frac{1}{2-x}-2$$ Applying AM-GM on the expressions in the above two equations, we have $$(x+1)+\frac{1}{x+1}+(2-x) + \frac{1}{2-x} \ge 4.$$ Thus $$\frac{x^2}{x+1}+\frac{(1-x)^2}{2-x}\ge 0.$$ However, I want the RHS to be $\frac{1}{3}$. Also, I don't want to use differentiation to solve this because I'm learning AM-GM. It would be very helpful if someone could point me in the right direction.
There are obvious problems with executing AM-GM as is. However, we recognize that equality is attained at the case $x=\frac 12$. This is important. Let us force ourselves to use AM-GM.
ROUGH(BUT CORRECT) WORK
To simplify things, let's multiply top and bottom by $(x+1)(2-x)$, which is positive. This leads to the equivalent inequality $$ x^2(2-x) + (1-x)^2(x+1) = x^2-x+1 \geq \frac{(x+1)(2-x)}{3} $$ which is equivalent to $$ 3x^2-3x+3 \geq (x+1)(2-x) $$ which is equivalent to $$ 6x^2-6x+6 \geq 2(x+1)(2-x) $$
Now, let's prove this inequality by AM-GM. The right hand side has two terms $(x+1),(2-x)$ that are both equal to $1.5$ when $x = \frac 12$. In particular, if I think of this as (twice) the GM of the numbers $(x+1)^2$ and $(2-x)^2$, then the equality case $x = 0.5$ matches correctly. Therefore, we may correctly write $$ 2(x+1)(2-x) \leq 2 \frac{(x+1)^2 + (2-x)^2}{2} = (x+1)^2 + (2-x)^2 = 2x^2-2x+5 $$
Now the question is : is $2x^2-2x+5 \leq 6x^2-6x+6$? The answer is a resounding yes : $$ 6x^2-6x+6 - (2x^2-2x+5) = 4x^2-4x+1 = (2x-1)^2 $$ Notice that this RHS is also $0$ exactly at $x= \frac 12$. Therefore, we can now "reverse engineer" to get an accurate solution.
Actual solution
Begin with the AM-GM inequality to show where it's being used : $$ 2x^2-2x+5 = (x+1)^2+ (2-x)^2 \geq 2(x+1)(2-x). $$ Now, notice that $6x^2-6x+6 - (2x^2-2x+5) = (2x-1)^2 \geq 0$. Therefore, $$ 6x^2-6x+6 \geq 2(x+1)(2-x). $$ Rearranging, $$ x^2-x+1 \geq \frac{(x+1)(2-x)}{3} \\ \implies \frac{x^2-x+1}{(x+1)(2-x)} \geq \frac 13 \\ \implies \frac{x^2(2-x)-(1-x)^2(1+x)}{(x+1)(2-x)} \geq \frac 13 \\ \implies \frac{x^2}{x+1} + \frac{(1-x)^2}{2-x} \geq \frac 13 $$ Completing the proof. Note that the rough work also qualifies as an answer, but it's kind of working backwards which may not be acceptable in an olympiad exam. The solution given is clean, explains the use of all the inequalities used and only leaves out algebraic manipulations, which are easily figured out in any case.