[VA] SRC#005- April, 1st Mean Minichallenge
|
04-01-2019, 10:30 PM
Post: #2
|
|||
|
|||
RE: [VA] SRC#005- April, 1st Mean Minichallenge
(04-01-2019 08:09 PM)Valentin Albillo Wrote: sample dataset 4, 1, 20.19 your code should return: Let x=k-2, we have (4x + 1x + 20.19x) / 3 = Pix Let f(x) = 4x + 1 + 20.19x - 3 Pix ⇒ f'(x) = 4x ln(4) + 20.19x ln(20.19) - 3 Pix ln(Pi) Use Newton's method to solve for x, x = x - f(x) / f'(x) guess(x) = guess(k) - 2 = 1.5 - 2 = -0.5 → -0.4479070869 → -0.4457521188 → -0.4457475673 ⇒ k = x + 2 = 1.5542524327 |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 2 Guest(s)