Show that $g(x,y)\geq 0$ for all $x,y\in\mathbb R$ Let $f\in C^2(\mathbb R)$
$$
g(x,y)=\frac{1}{2}(y-hf'(x))^2+f(x+hy)-(\frac{1}{2}y^2+f(x))
$$ for any $h>0$.
Show that $g(x,y)\geq 0$ for all $(x,y)\in\mathbb R^2$.
I dont know how to show this. I already know that
$$
\frac{1}{2}(y-hf'(x))^2+f(x+hy)\geq 0.
$$
Now I don't know how to go on and where to use the convexity of $f$. Thanks for help!
 A: Hint: use the fact that a strictly convex function $f(x)$ should satisfy $f(y)>f(x)+f’(x)(y-x)$ for any $y\neq x$.
A: I'll put each step in a spoiler block, so you can figure it out as you go.
Step 1:

 Expand Brackets: $$ g(x,y) = \frac{1}{2}y^2-yhf'(x)+\frac{1}{2}h^2f'(x)+f(x+yh)-\frac{1}{2}y^2-f(x) $$

Step 2:

 Remove common terms: $$ g(x,y) = -yhf'(x)+\frac{1}{2}h^2f'(x)+f(x+yh)-f(x) $$

Step 3:

 Write in strict convexity form: $$ g(x,y) = f(x+yh)-f(x)+f'(x)(-yh+\frac{1}{2}h^2) $$

Step 3:

 Recall strict convexity definition: $$ f(v)-f(x)+f'(x)(v-x) >0 $$

Step 4:

 Fill in $v=x+yh$: $$ f(x+yh)-f(x)+f'(x)(yh) >0 $$

Step 5:

 Insert into $g$: $$ g(x,y) > f'(x)\frac{h^2}{2} $$

Step 6:

 Add convexity definition with $(x,y)$ to that with $(y,x)$ with $y>x$: $$ (f'(x)-f'(y))(x-y)>0 $$

Step 7:

 Fill in $x=0$: $$f'(y)y>0 $$

Step 8:

 Repeat with $y<x$ and $x=0$: $$f'(y)y<0 $$

Step 9:

 Conclude from step 7 and 8 that $f'(y)>0$.

Step 10:

 Insert into $g$: $$g(x,y)>f'(x)\frac{h^2}{2}>f'(x)>0$$.

Finally, if you want all in one line:

 $$g(x,y) = \frac{1}{2}y^2-yhf'(x)+\frac{1}{2}h^2f'(x)+f(x+yh)-\frac{1}{2}y^2-f(x) = f(x+yh)-f(x)+f'(x)(-yh+\frac{1}{2}h^2) > f'(x)\frac{h^2}{2}>f'(x)>0$$

