Can anyone with math skills that don't suck like mine, solve this?

5225bc0c3bf66f4c275c332de6388d1f
0
SyntaxError 101 Oct 26, 2009 at 22:18

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

5 Replies

Please log in or register to post a reply.

A8433b04cb41dd57113740b779f61acb
0
Reedbeta 167 Oct 26, 2009 at 22:47

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.

99f6aeec9715bb034bba93ba2a7eb360
0
Nick 102 Oct 26, 2009 at 23:05

@SyntaxError

Do I have to solve it iteratively?

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.

5225bc0c3bf66f4c275c332de6388d1f
0
SyntaxError 101 Oct 26, 2009 at 23:08

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!!

A8433b04cb41dd57113740b779f61acb
0
Reedbeta 167 Oct 26, 2009 at 23:10

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

5225bc0c3bf66f4c275c332de6388d1f
0
SyntaxError 101 Oct 26, 2009 at 23:17

@Reedbeta

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

Ahh OK cool! Thanks again guys. That should get me going.