[Math] Transforming a nonlinear system to a linear system

nonlinear systemsystems of equationstransformation

Suppose I have two points in $\mathbb{R}^2$ and I wish to find values of parameters $a$ and $b$ such that I obtain the power law $y=ax^b$ which goes through the two given points. I can solve the nonlinear system
$$\begin{eqnarray}
y_1 &=& ax_1^b\\
y_2 &=& ax_2^b \end{eqnarray}$$

or I can take the log of both sides and obtain
$$\begin{eqnarray}
\ln(y_1) &=& \ln(a)+b\cdot\ln(x_1)\\
\ln(y_2) &=& \ln(a)+b\cdot\ln(x_2) \end{eqnarray}$$

a linear system which can be easily solved by using a direct solver for example and then I can obtain $a$ and $b$ easily. I can do the same for an exponential ($y = ae^{bx}$) and even a Gaussian $\left(y = ae^{-\frac{1}{2}\left(\frac{x-b}{c}\right)^2}\right)$.

My first question is, is this approach possible for the Lorentzian function ($y=\frac{a}{b+(x-c)^2}$)? What kind of a transformation would I do?

Does this technique have a name? Is there a general approach to this? Given an arbitrary function, is there a way to determine if such a method is possible or not? If yes, how do we determine the appropriate transformation?

Best Answer

So, I suppose that you have three data points ($i=1,2,3)$ $$y_i=\frac{a}{b+(x_i-c)^2}$$ from which you want to extract parameters $a,b,c$.

If you compute the ratio $A_{12}=\frac{y_2}{y_1}$, $a$ is gone and you can extract $b$. you can do the same with $A_{13}=\frac{y_3}{y_1}$ and extract $b$ again. Write that these two values of $b$ are equal and you obtain a linear equation in $c$ which is easy to solve. Now, go backwards to get successively $b$ and $a$. After simplifications, you should then get

$$c=\frac{1}{2}\frac{{x_1}^2 {y_1} ({y_2}-{y_3})+{x_2}^2 {y_2} ({y_3}-{y_1})+{x_3}^2 {y_3} ({y_1}-{y_2})}{ {x_1} {y_1} ({y_2}-{y_3})+{x_2} {y_2} ({y_3}-{y_1})+{x_3} {y_3} ({y_1}-{y_2})}$$ $$b=\frac{{y_2} (c-{x_2})^2-{y_1} (c-{x_1})^2}{{y_1}-{y_2}}$$ $$a={y_1} \left(b+(c-{x_1})^2\right)$$

Added later

Since this is to be used for regression and since this model is nonlinear with respect to its parameters, linearization would provide reasonable starting guesses for the nonlinear regression.

So, let us start with $$y=\frac{a}{b+(x-c)^2}$$ and rewrite it as $$\frac{1}{y}=\frac{x^2-2cx+(b+c^2)}{a}=\alpha x^2+\beta x+\gamma$$ The quadratic regression based on points$(x_i,\frac{1}{y_i})$ will give $\alpha,\beta,\gamma$. So, now $$a=\frac{1}{\alpha},b=\frac{4 \alpha \gamma -\beta ^2}{4 \alpha ^2},c=-\frac{\beta }{2 \alpha }$$

But again, the values are just starting guesses since in the linearized model you minimize $$SSQ_1=\sum_{i=1}^N \Big(\frac{1}{y_i^{exp}}-\frac{1}{y_i^{calc}}\Big)^2$$ while, since the $y_i$ are the measured values, you must minimize $$SSQ_2=\sum_{i=1}^N \Big({y_i^{exp}}-{y_i^{calc}}\Big)^2$$

Illustrating example

To illustrate this aspect, I generated data using $a=123.4,b=5.6,c=7.8$ for $x$ varying between $0$ and $20$ ($21$ data points) and the exact values of $y$ were randomly perturbed (relative change between $-10$% and $+10$%).

The linearization step leads to $\alpha=8.323492415\times 10^{-3}$,$\beta=-1.299834856\times 10^{-1}$,$\gamma=5.468572881\times 10^{-1}$ to which correspond $a=120.142$, $b=4.732$, $c=7.808$. These do not seem bad when compared to the values used for the generation of the data. However, for these values, the sum of squares is $45.118$ and the nonlinear regression ends with a sum of squares equal to $3.932$ that is to say almost $12$ times smaller and the final parameters are $a=125.559$, $b=5.998$, $c=7.799$. Big differences !