I want to find the number of real roots that satisfy this equation:
f[g[x]] - h[f[x]] == (a)^2
Where:
f[x_] = x*Cos[x]
g[x_] = CubeRoot[-5 + (x)^2]
h[x_] = Abs[x + 2]
Where x is given as between the values of 0 and 5 i.e. [0,5]. And a is a parameter that i can change the value of.
What I have tried so far is to animate the function to just get a visual on the functions. I wrote this code:
Animate[Plot[{f[g[x]] - h[f[x]], (a)^2}, {x, 0, 5}], {a, 0, 1}]
I then wondered what might be the maximum value in this interval and I found it to be 0.511 when x = 2.4987. I used this code:
FindMaximum[{f[g[x]] - h[f[x]]}, {x, 2, 5}]
That value is given when a = 0.71499.
By a purely graphical analysis there are always two solutions to this equation at any one value of a when a is between the values of [0,0.71499). At a=0.71499 there is only one solution and beyond it there are no solutions. Now how do I calculate the total number of roots to this equations? I have tried the command CountRoots but it doesn't yield a result. Any other suggestions?
CountRoots
expects a univariate function ! $\endgroup$