# Finding The Equations of Lines

1. Dec 29, 2009

### daniel350

So I'm doing some programming, and to simplify a very large amount of if statements, I've decided to put it down to a few lines with a simple equation, I've done this before with other things, but it was very much trial and error.

Therefore I'd like to see how it can be done in a more 'regulated' method. Determining the equation of a line. I'm willing to learn and spend hours reading and doing, just need to know what it is I'm looking for (calculus?).

My data
I simply want to make an equation that relates these equations, I'm focusing firstly on the first one, which has a decrement of 5 for each iteration, the others may be easier to find.

I'm not looking for an exact solution, just some hints or tips or directions on where to learn how to do this; as they are not (at least not always) linear.

regards,

Daniel

PS: If this helps, also, is there a way to check the equation of the 'smoothed' line in EXCEL?
http://img697.imageshack.us/img697/1875/54459250.gif [Broken]

Last edited by a moderator: May 4, 2017
2. Dec 29, 2009

### Integral

Staff Emeritus
In Excel look at the option tap of the trend line menu, check the box to show the equation.

Do a wiki search on "least squares" for the computations necessary to compute the equation of the best fit line.

3. Dec 29, 2009

Thanks!