<s>[INST] How to find out intersections of two absolute value functions? If we are asked to find out common points where two equations intersect each other, for example let us assume that two equations are $Y=12-x^2$ and $Y=4x$, we can solve it in the following way:
\begin{align*}4x&= 12-x^2\\
x^2+4x-12&=0\\
x^2+6x-2x-12&=0\\
x(x+6)-2(x+12)&=0\\
(x-2)(x+6)&=0
\end{align*}
So we have now two roots of $x$, $2$ and $-6$.
Plugging these values in one of the above equations we get two values for $y$, $8$ and $-24$.
So in $(2,8)$ and $(-6,-24)$ the above two lines intersect each other.
But what will we do if we are asked to find out the points where another two equations, $y=|x|$ and $y=|x^2-4|$ meet?
Is there any methodical approach which help find out the common points?
 [/INST] Here's one way to approach it:
We can rewrite the absolute value functions in piecewise notation:
$$y = |x| = \begin{cases} -x, & x\le 0\\
x, &x>0
\end{cases}$$
and
$$y = |x^2 - 4| = |(x-2)(x+2)| = \begin{cases} x^2 - 4, &x\in (-\infty,-2)\cup(2,\infty)\\4 - x^2, &x\in [-2,2]
\end{cases}.$$
So, looking at overlapping domains, you need to find:

*

*Intersection points of $y = -x$ and $y = x^2 - 4$ for $x \le -2$.

*Intersection points of $y = -x$ and $y = 4-x^2$ for $x \in (-2,0)$.

*Intersection points for $y = x$ and $y = 4-x^2$ for $x\in [0,2)$.

*Intersection points for $y = x$ and $y = x^2 - 4$ for $x \ge 2$.

</s>