I have a function $f$ defined on $[-1,1]$. For a minimal example, it suffices to define
f[z_]:=z^2 - 1
I need to find a list of points such that $f(z_0)= f(z_1)$, points whose image "lies at the same height". I proceeded by finding the minimum via
min = First@Minimize[f[z], {z}]
which occurs for $z$ equal to
argmin = Values@Last@Minimize[f[z], {z}]
I further created a list with
rang = Subdivide[a, 0,10]
spanning the range from the minimum to the a predefined value.
Now I would like to find, for each element of this list, points such that $f(z_0)=f(z_1) = rang_j$, for each element of the list.
I could not find any better plan than to define a list of functions $fun_j = (f(z)+rang_j)^2$. By shifting the original function and squaring I am certain that the functions $fun_j$, one for each element in the list $rang$ are positive everywhere except the roots.
I wanted then to iterate over the list of functions a constrained minimization via the commands (the argument $f_j$ being just used to clarify my question, I understand the sintax will be different actually that is exactly what the question is about):
Minimize[{f_j, z > argmin}, {z}]
Minimize[{f_j, z > argmin}, {z}]
that is, running two minimisations one to the left and one to the right of the ${arg\,min}$. I know on mathematical grounds two unique solutions exists.
I create my list of functions as
f1[z_,c_]:=f[z]+c
and then using
f1[z,rang]
but I struggle with iterating Minimize, any suggestion would be helpful.
Trying
Minimize[{f1[ z, rang], z > b}, z]
yields an error message, as the function argument of Minimize is expected to be a scalar function. I would also love to hear about better methods altoghether, in general and in reference to Mathematica. Cheers