<s>[INST] Find minimum value of the function If $g(x) = \max|y^2 - xy|$ for $0\leq y\leq 1$. Then the minimum value of $g(x)$ is?
I am not being able to proceed. Tried drawing the graph.
 [/INST] Computing the function $g(x) = \max{|y^2 - xy|}$ is equivalent to solving for the maximum value of the expression $|y^2 - xy| = f(y)$ with a fixed parameter $x$. Let's then imagine that $x$ is a constant. In general, the maximum value of a function (of one variable) can be found in either


*

*Where the derivative is zero;

*Where the derivative is not defined; or

*At the boundaries of the domain. 


Let's go through these cases one by one. Firstly, we want to find $\frac{d f(y)}{dy}=0$. For $y^2 - xy < 0$ the result is $y = \frac{x}{2}$, and for $y^2 -xy > 0$ there is no solution. 
The derivative is not defined when $y^2 - xy = 0 \Rightarrow y= 0$ or $y = x$.
The boundaries of the domain were defined to be $y = 0$ and $y = 1$. 
Inserting these results into $f(y)$ gives us $f(\frac{x}{2}) = \frac{x^2}{4}$; $f(0)=f(x)=0$; $f(1)=|1-x|$. We need the largest of these, which is
$g(x) = \begin{cases}
\left| 1 - x \right| , \text{if} -2(1+\sqrt{2}) \leq x \leq 2(\sqrt{2}-1)\\
x^2/4 , \text{otherwise}
\end{cases}$
This was found out by solving the equation $|1-x|>\frac{x^2}{4}$.
The minimum of $g(x)$ can be found at $x= 2(\sqrt{2}-1)$, which is $g(2(\sqrt{2}-1)) = 1- 2(\sqrt{2}-1) = 3-2\sqrt{2}$.
</s>