# What is maximum value of function?

If $f(x)=x^2$ and $g(x)=2\sin x$ then what is the value of $||f-g||_{\infty}=$max$|f(x)-g(x)|$ how can i get value of x where difference of such function has maximum value?

-
Try taking the derivative and finding where the max/mins occur. You can determine it from this point (but if the interval is unbounded, it should be clear that it is $\infty$. –  Clayton Dec 16 '12 at 4:42
Max over what interval? –  JohnD Dec 16 '12 at 4:51
$g$ is bounded but $f$ is not. What does that tell you? –  copper.hat Dec 16 '12 at 4:52
Taking the derivative is not really appropriate here (apart from minor details like differentiability which can be handled by squaring); you need to establish that a maximum exists first. Setting the derivative to zero will, at best, locate a local maximum in $[0,\frac{1}{2}]$. –  copper.hat Dec 16 '12 at 6:11
As explicitely asked by @JohnD: over which interval? For the most natural choice, there is no maximum. –  Did Dec 16 '12 at 10:08
show 1 more comment

The graph of $p(x):=|f(x)-g(x)|$ on $0\le x\le 1$ tells the story:
Computing the maximum numerically, it is approximately $0.8001$ (and occurs at about $x=0.7391$).
You want to maximize $p(x)=x^2-2\sin x$ on $[0,1]$. From the graph, you are looking for the interior critical number, i.e. the solution of $p'(x)=2x-2\cos x=0$. Get that with this? Then evaluate $p(x)$ at that $x$ value. –  JohnD Dec 23 '12 at 5:29