# Expressing loops etc. in math.

This is a discussion on Expressing loops etc. in math. within the A Brief History of Cprogramming.com forums, part of the Community Boards category; Originally posted by Sean Exterria - it symbolizes sum, but it's usually only used with differentiation. Um. No. Its not ...

1. Originally posted by Sean
Exterria - it symbolizes sum, but it's usually only used with differentiation.
Um. No. Its not only used with Differentiation. You dont know what you are talking about. Its used in sequences and series, as well as recursion.

2. >Shiro, I think you're mixing languages. No "begin" or "end" in
>C++, also need some ;'s at the end of statements.

I know, it was meant to be pseudocode, a mix of Pascal and C. But that was not the point, it was just the algorithm where it was about. And Pascal has some elements which makes algorithms more readable.

>1) Are there just 4 degrees of equations, or is their an infinite
>amount?

What do you mean by degree of equation? You mean higher order differential equations? In that case, this could be infinite, however, I've never seen the symbol infinite appearing as order in differential equations. You mean such like this?

d^n y
------- = ....
d^n x

3. but it's usually only used with differentiation.
No, it's used in pretty much all areas in math for very diverse purposes. And I don't recall ever seeing it in connection with differentiation.

Are there just 4 degrees of equations, or is their an infinite amount?
Well, only up to fourth degree polynomials can be solved analytically. Or rather, the general quintic cannot be solved algebraically, although there are some special cases I think.

And one more question: In multivariable-differential calculus, if your calculating dy/dx as x->0, couldn't you just add one to the exponent of each x in the equation of change in y/change in x? It seems to work and is a lot simpler than waht my book says.
Do you mean "as the change in x approaches 0"? And I'm not sure what you mean by "add one to the exponent of each x in the equation..." part?

4. Wow... considering I had to fish this out of page 5 in order to post that last post of mine, there's a lot of replies.

Fyodor and MethodMan - true, but I meant as opposed to integration. When they want the sum in integration they use that big S thing (what's that called anyway?) I guess that was badly worded - my fault sorry.

Shiro - I mean like there's linear (y=mx+b, the basic one), and then there's quadratics and cubics, which have more terms and involve exponents. Again - badly worded. I should've said degrees of curves. I've only ever heard of four, but just in case there are more, I need to make sure my equation allows for an infinite number of degrees. In my case, the degree will be a variable in the equation, so it's not a huge problem, I'd just like to know.

Fyodor - your first quote is answered above with MethodMan, but you probably already saw that. Your second - thanks - answers my question perfectly, and the third - if you'll scroll down to near the bottom on Page 1, you'll another post by me - I cancelled that question because I found it in my book, and yes, once again - badly worded on my part.

Sorry about all that! And thanks for the help!

5. It could be degree whatever.

y=4x^7
y=x^31

6. Bummer...

Well I guess I'll just have to look for ways other people have done this and ways that have kind of been accepted as standard. That average compensation equation thing might be a good idea. If I could just figure out some example data and solve that pattern.

7. >I should've said degrees of curves.

In theory, the degree can be any.

1-st order linear equation
y = a[1] x + a[2]

2-nd order linear equation
y = a[1] x^2 + a[2] x + a[3] c

3-th order linear equation
y = a[1] x^3 + a[2] x^2 + a[3] x + a[4]

n-th order linear equation
y = a[1] x^n + a[2] x^(n-1) + ... + a[n] x + a[n+1]

What should the "universal equation thing" do?

BTW, I forgot what the purpose of the "universal equation thing" was. Wasn't it about curve fitting or something like that?

8. Well the original idea was to have a library that used the law of finite differences to find patterns and decode information, and eventually it turned into and equation that did the same thing but with least-squares regression. I got an applet from Bryan Lewis, a mathematician at Kent State and I made a flow-chart out of everything that it did, and if I can figure out this loop/decision thing, I'll be able to express it as an equation, that uses a series of series to hold the data, and a variable that is incremented by one each time, to calculate all the possible elements of the 4th degree equation. If it's lowerthe unused elements work out to be 1 or 0, and thus hav no effect on the equation. For example the equation of a straight line would calculated (eventually. There are other equations which work out the accuracy of it) to be Y=(equation for the slope)x+(equation for the y-intercept). Ideally it can take any numerical values and eventually find a pattern that explains it - very useful.

Page 2 of 2 First 12