I'm going to try and keep this question broad, so I apologise if it's poorly written.
I have a series of functions;
$$ \Psi_{j} = \sum_{n = 1}^{N} A_{n} \sinh{2 \pi n S_{j}} \cos{2 \pi n X_{j}} + A_{N + 1}S_{j} $$
In which $S_{j}$'s and $X_{j}$'s are known, and initial estimates of the $A_{n}$'s are provided. However, these $A_{n}$ values, when correct, should result in each $\Psi_{j}$ = 1.
My question is, is a non-linear least squares fitting method (in particular the Levenberg-Marquadt method) the correct way to go about correcting these $A_{n}$ values, such that the correct $\Psi$ results can be obtained.
My methodology to date (which seems incorrect) is to calculate the merit function as follows;
$$\chi^{2} = \sum_{j=0}^{N-1} [ \frac{\Psi_{j} - 1}{\sigma_{j}} ]^{2} $$
Where 1 is the target value for $\Psi$.
The problem itself is relating to stream-function theory. Again, I apologise if the question is too broad/specific to be of any use.