Find $x$ so that $h(x)=\text{max}(f(x),g(x))$ assumes its min value

58 Views Asked by At

Problem:

Given: $f(x) = x^2 + 12x – 6, \qquad g(x) = 3x – 6 – x^2$
If $h(x)=\text{max}(f(x),g(x))$, find $x$ so that $h(x)$ assumes it's min value.

My Approach:

I was told that, in all such questions, simply do $f(x)=g(x)$ to find $x$.
So, that I did, to get $x=0,-4.5$.
Thus, I answered that at $x=-4.5$ we'll get the min value of $h(x)$.

Surprise:

Here's how the graph looks(!):
enter image description here
As we can notice that the actual minima of $h(x)$ occurs at $x=-6$ which is same as the minima of $f(x)$.

Question:

What is the correct approach to tackle such problem(s) or rather to check that such a thing is happening (as it feels rare phenomenon to me)?
Also, could there be some other variant(s) too where simple $f(x)=g(x)$ fails?

1

There are 1 best solutions below

4
On BEST ANSWER

In general, there is no reason that $f(x) = g(x)$ should give you min value for $h(x)$. When you draw graphs for $f$ and $g$, $f(x) = g(x)$ gives you points where the graphs intersect - such points separate segments where $f(x) < g(x)$ from segments where $f(x) > g(x)$, but both function can still be arbitrary big or small in any of this segments.

The correct approach (for continuous $f$ and $g$, pretty much any you will encounter most of the time) is to solve $f(x) = g(x)$, get solutions $x_0, x_1, \ldots, x_n$, then on every segment, as well as on $(-\infty, x_0)$ and $(x_n, \infty)$ you have either $f \geq g$ or $f \leq g$ - so you find minimum of corresponding function on this segment, and then aggregate them between segments.