At the moment I am programming software which uses the math function below to do its job. The key about this is that I cannot assume values for the coefficients found in the function since they are not known until the software is running (or rather the part of it that is executed before the function should be solved).
My kind of math function: $f(x) = -A * sin(x) * sin(Z) + B * cos(x) * cos(Z) - C + D$
My current understanding is that for this type of mathematical function I will have to use a numerical root-finding algorithm (e.g. Regula Falsi) to get the value x for the set of constants in the function.
I am using third-party software to use root-finding software and most of the methods available require a given interval in which the solution is searched, with the exception of the Newton-Raphson method. I know that the correct values for my x must be between [0, 2*PI]. However, the key problem is that I cannot use this interval every time, because for one set of coefficients the mathematical condition (for the root-finding methods) of different signs for f(lower boundary) and f(upper boundary) is satisfied and for other coefficients it might not be. And when the signs are not different for f(l. boundary) and f(u. boundary) the root-finding method results in a programmatic error and my software fails.
Whenever I used numerical root-finding algorithms in school I manually chose fitting interval boundaries after looking at the function (with known coefficients) visually. Obviously and unfortunately I cannot do that in this use case.
What I need now is advice on solving this kind of function with the level of unknown constants (until software runtime) found in this function.
I would be very thankful for any kind of advice!