Rich Nelson

Greenhorn

Posts: 15

posted 10 years ago

Alright, I just received a homework assignment involving convergence loops. The problem is, I haven't taken any overly-advanced math classes yet, so I have absolutely no idea what this means:

*Note that variable a is a user-defined integer.

Could someone please translate that to a Java formula? I can't even really begin to attempt this homework without knowing what that means.

*Note that variable a is a user-defined integer.

Could someone please translate that to a Java formula? I can't even really begin to attempt this homework without knowing what that means.

posted 10 years ago

I'll try to explain in plain English what the math expression means.

You start with i = 0, and with a value x(0), and a constant value a.

Then you calculate the next value of x: x(1) (with i = 1). You do this with the given formula:

x(1) = (2 * x(0) * x(0) * x(0) + a) / (3 * x(0) * x(0))

Do you see how that matches with the math formula?

Then, when you have x(1), you can calculate x(2) using x(1), then x(3) using x(2) etc. as far as needed.

You start with i = 0, and with a value x(0), and a constant value a.

Then you calculate the next value of x: x(1) (with i = 1). You do this with the given formula:

x(1) = (2 * x(0) * x(0) * x(0) + a) / (3 * x(0) * x(0))

Do you see how that matches with the math formula?

Then, when you have x(1), you can calculate x(2) using x(1), then x(3) using x(2) etc. as far as needed.

Consider Paul's rocket mass heater. |