• Post Reply Bookmark Topic Watch Topic
  • New Topic

Math Translation  RSS feed

 
Rich Nelson
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Jesper de Jong
Java Cowboy
Sheriff
Posts: 16060
88
Android IntelliJ IDE Java Scala Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Rich Nelson
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Makes perfect sense. Thanks for your help.
 
Consider Paul's rocket mass heater.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!