Trying to figure out a fitting function for a curve where the fitting function always passes through the origin (0,0)

119 Views Asked by At

I have a curve that looks like this.

Acceleration v Velocity
Acceleration v Velocity

I am trying to figure out a function I can use to fit to this curve. I have tried using a curve of the form $Ax^2 + Bx + C$ and while that does a good job of fitting the points it does not go through the origin. I am trying to construct a function of some sort that fits the points in the image and also goes through or is as close to the origin as possible.

I'd really appreciate some guidance!

3

There are 3 best solutions below

1
On BEST ANSWER

We observe that the function is on the power kind for small $x$ :

enter image description here

This draw us to look for a function of this kind : $$y(x)=x^p f(x)$$ With $p\simeq 0.4$ :

enter image description here

The curve $f(x)$ appears like a piecewise linear function :

$$f(x)\simeq c+(ax+b)\text{H}(x-r)$$ H is the Heaviside step function.

In order to have a smooth transition between the two linear functions one can replace the Heaviside function by an approximate function of the logistic kind. $$H(X)\simeq \frac{1}{1+e^{-q\,X}}$$ So, the function considered is : $$y(x)=x^p\left(\frac{ax+b}{1+e^{-q\,(x-r)}}+c \right)$$

Then the parameters are computed thanks to non-linear regression :

enter image description here

0
On

If you want the graph of a polynomial to go through the origin, omit the constant term. For your quadratic polynomial, omit $C$.

1
On

Second degree best fit $$f(x)=3.65823 x-0.235842 x^2$$ Third degree $$g(x)=0.0197976 x^3-0.673543 x^2+5.83586 x$$

enter image description here