I'm new to this community and my first question probably reflect my lack of confidence with Mathematica.
My problem is the following: I find the roots of a transcendental equation dependent on a parameter, let's say $x = \cos(\alpha x)$, And compare these roots with a set of assigned values via an error function (e.g. sum of the absolute value of the difference between each root and the corresponding fixed value). I want to minimize the outcome of the error function varying the parameter $\alpha$, in order to get a value for $\alpha$ such that the transcendental roots lie the closest possible to the assigned values.
I'm basically trying to fit data (the assigned values) with the roots of an equation depending on a parameter. I think that it should work in this way:
- Find roots of transcendental equation
- Error function outputs an error given by confronting the calculated roots with data
- Some minimization, varying the parameter until you get to a value for it that minimize the error function.
The minimization function should than be able to repeat the process from point number 1 at every change of the parameter, but I couldn't find any simple function doing that. I'm not sure if you can do that with the fitting function I've already seen, like
FindFit, and I'm not sure I'm looking at the problem the right way.
Is there an easy way to do that with Mathematica's function?