- #1
Alex
- 42
- 0
How would I go about finding the equation of a curve given an arbitrary number of points? Please don't give me a full explanation if you don't want to, just the name of a process by which I could do this would be fine.
Tom Mattson said:You first have to choose a functional form to which to fit your points. In order to choose wisely, you should produce a scatterplot and try to find a functional form that looks close. For instance if in your data table the value of the dependent variable plunges downward for very small positive values of the dependent variable, and the function increases monotonically, then you might try to fit a log function to the data.
So howsabout you post your data set?
HallsofIvy said:Given any finite set of points, there exist an infinite number of curves that will pass through those points so you have to decide what conditions you want to put on the curve you are looking for. Google on "curve fitting" and you will see some options.
If you are looking for a function of the form y= f(x), then putting the x and y values of n points into that equation will give you n equations which you could solve for n unknowns. In particular, a polynomial of degree n-1 will have n coefficients so given n points, there always exists a unique polynomial of degree n-1 passing through those points. Those tend to be very "wavy" so many applications use a "spline" function instead- a function that is "piece-wise" polynomial. Google on "spline functions-" in particular you might look at
http://www.cse.unsw.edu.au/~lambert/splines/
On the other hand, the best choice may not be a curve that actualy passes through the points but one that is "close" in some sense. For that, you might use a "least squares" method. Google on "least squares". Mathworld has this:
http://mathworld.wolfram.com/LeastSquaresFitting.html
Alex said:Well that's the thing - I don't have a data set. I'm trying to write a program that will return an equation to a set of data that I input.
Tom Mattson said:You should probably look at an already existing program that can do this. By far the most ubiquitous one is MS Excel. It will fit your data to a curve, but the user has to choose what kind of regression he wants before anything can happen. As HallsofIvy said, there are an infinite number of curves that will fit the data, so the user must make a decision.
The equation of a curve is a mathematical expression that represents the relationship between the x and y coordinates of points on a curve. It can be written in various forms, such as y = f(x), where f(x) is a function of x, or in parametric form as x = f(t) and y = g(t).
To find the equation of a curve, you need to have at least three points on the curve. You can then use these points to solve for the coefficients in a polynomial equation, or use techniques such as calculus to find the equation in terms of derivatives and integrals.
Finding the equation of a curve is important in many areas of science and mathematics. It allows you to describe and analyze the behavior of a curve, make predictions about its future values, and compare it to other curves. It also provides a way to model real-world phenomena and make scientific discoveries.
Some common methods for finding the equation of a curve include using regression analysis, which involves fitting a curve to a set of data points, and using calculus techniques such as differentiation and integration. Other methods may depend on the specific characteristics of the curve, such as using parametric equations for curves that cannot be expressed in terms of x and y.
Yes, the equation of a curve can change depending on the properties of the curve and the conditions under which it is being observed. For example, the equation of a parabola may change if the curve is translated or rotated. In addition, as more data points are collected, the equation of a curve may need to be adjusted to better fit the data.