# Fit with implicit functions?

#### P3X-018

Is it possible to make a least squares fit with a function given implicitly, because the equation isn't solveable analyticly? Because I had the coupled ODE,

$$\ddot{x} = \omega^2x + 2\omega\dot{y} - C\,\frac{\dot{x}}{\dot{r}}$$

$$\ddot{y} = \omega^2y - 2\omega\dot{x} - C\,\frac{\dot{y}}{\dot{r}}$$

where $\dot{r} = \sqrt{\dot{x}^2+\dot{y}^2}$, and $\omega$ and C are constants in time.
I can numerically solve this system and make a plot in x-y, but I also have some measurement data, so is there a way to make best fit of the "solution" to the data points? That is vary the 2 constants to make a best fit?
There are also the 4 initial conditions when solving this system of ODE, how will they be involved in this?

Last edited:

#### fresh_42

Mentor
2018 Award
Of course you can measure the distance between your measurement data and the solution you calculated. I would use regression methods, depending on the degree of the solution. The origin of the data (the ODE solution) shouldn't bother you. If you want to calculate the constants by a best fit you will get an optimization problem, which probably needs again a numerical solution.

"Fit with implicit functions?"

### Physics Forums Values

We Value Quality
• Topics based on mainstream science
• Proper English grammar and spelling
We Value Civility
• Positive and compassionate attitudes
• Patience while debating
We Value Productivity
• Disciplined to remain on-topic
• Recognition of own weaknesses
• Solo and co-op problem solving