I'm trying to do some prediction of maximum and minimum simplex noise values in a region so I can build better bounding volumes. I took the 2D simplex noise combination function and took the first derivative to get the slope. I plotted it with the original function. So far it looks correct. The slope is zero in four places. Now all I need is to solve for the f'(X) = 0 so I can get some local maximum and minimum values for f(X). The original functions goes way exponential beyond .7 or so but there a hill between 0.2 and 0.3 and a corresponding valley on the opposite side of zero between -0.2 and -0.3. These are the values I'm looking for.

Here is the first derivate function. Anyone know how to solve it? Do I have to solve it iteratively?

0.0625 - 1.5*x\\^2 + 7.5*x\\^4 - 14*x\\^6 + 9x\\^8 = 0

Reedbeta
—
2009-10-26T22:47:27Z —
#2

There's no general way to solve for the roots (zeroes) of polynomials higher than degree 4...in fact, it's not practical to do for higher than degree 2 (quadratic formula) as the cubic and quartic formulas are just horrendous. So, numerical methods are the only way here.

Just using my graphing calculator I found that the roots are at .2357 and .7071 (and corresponding negative ones). The inner root (at .2357) should be easy to refine further using Newton's method if you need more precision. The outer one looks like it's a saddle point, or possibly multiple roots close together, so it will be very hard to do with Newton's method because of the very low slope. You may just have to fall back to bisection there.

Only up to quartic functions there exist generic analytic formulas for the roots. For higher degree polynomials it has been proven no such generic formulas exist and you have to use an algorithmic approach.

However, your specific polynomial can be rewritten as a quartic one:

0.0625 - 1.5*z + 7.5*z\\^2 - 14*z\\^3 + 9z\\^4 = 0 z = x\\^2

Solving for z gives me 0.5 (three times) and 0.055555. Taking their square roots to get x results in 0.70710678 and 0.23570226.

SyntaxError
—
2009-10-26T23:08:49Z —
#4

I don't need the .707 roots just the .235 . Actually I do have some code for Newton's method I downloaded for solving Kepler's equation. I guess I'll try plugging in this function and see how it goes. Thanks for the tip!!

Reedbeta
—
2009-10-26T23:10:34Z —
#5

Looks like the inner root is exactly sqrt(1/18). No need for Newton's method after all!