`ContourPlotContourPlot
gives you an idea of the answer I think
f[x_] = x*Cos[x]
g[x_] = CubeRoot[-5 + (x)^2]
h[x_] = Abs[x + 2]
ContourPlot[f[g[x]]pic=ContourPlot[f[g[x]] - h[f[x]] == (a)^2, {x, 0, 5}, {a, -1, 1}, FrameLabel -> {x, a}]
The peak-values follow from
mini = NMinimize[{a, f[g[x]] - h[f[x]] == (a)^2, Element[a, Reals]}, {x, a}]
(*{-0.715053, {x -> 2.49876, a -> -0.715053}}*)
maxi = NMaximize[{a, f[g[x]] - h[f[x]] == (a)^2,Element[a, Reals]}, {x, a}]
(*{0.714933, {x -> 2.49863, a -> 0.714933}}*)
amin=a/.mini[[2]]; (*-0.715053*)
amax=a/.maxi[[2]]; (*0.714933*)
As you can see from ContourPlot
:
There exist two solutions if amin<a<amax
There exists one solutions if a==amin or a==amax
In all other cases there is no real solution
There exists no solution if `a>a/.maxi