0

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!

Paul Sinclair
  • 43,643
  • Could you post the data ? – Claude Leibovici Jan 01 '21 at 06:22
  • The curve rises to its peak in a horizontal distance of $\sim 3$, but it takes $\sim 6$ to fall back down. Quadratics rise and fall at the same speed, so this is not quadratic behavior. Have you tried best-fitting a cubic instead? Is there anything about the set up that might suggest a different behavior? For example, the right most points hint that maybe instead of dropping back to $0$, the curve may flatten out and approach $y = 0$ asymptotically as $x \to \infty$. If that is the case, then no polynomial would be a good fit. – Paul Sinclair Jan 01 '21 at 14:59
  • @ClaudeLeibovici yes here it is x = [0,0.25, 0.75, 1.25, 1.75, 2.25, 2.75, 3.25, 3.75, 4.25, 4.75, 5.25, 5.75, 6.25,6.75, 7.25, 7.75, 8.25, 8.75] y= [0,3.5576, 5.3968, 6.4948, 7.8348, 8.5732, 9.024, 8.9168, 8.892,7.882,7.398, 5.5616, 4.0944, 2.7836, 1.65,1.0352 ,0.6656 ,0.7936, 0.436 ] – soccer_analytics_fan Jan 04 '21 at 18:42

3 Answers3

1

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

RobPratt
  • 45,619
1

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

JJacquelin
  • 66,221
  • 3
  • 37
  • 87
0

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

Raffaele
  • 26,371