Title: Newton's catapult Post by: Mircode on June 13, 2010, 06:35:20 PM Hi there! I was wondering what happens, if one "fools" Newton's method with a function, that almost reaches y=0 but then takes a turn and goes back. I.e. y=x²+0.1 The answer: Step by step we get closer to x=0, like Newton's method usually does, but when we are almost there, the slope of the tangent gets close to 0, "catapulting" the next x far away. (My very professional sketch illustrates it.) Then it will approach x=0 again until it's close enough to be shot towards +/-infinity again. And so on and so on. Now I was wondering, whether one could make a fractal from this rather chaotic behavior. 2-D would be nice, so it gets a little more complicated. The function would be z=f(x,y). At a point (x,y), we find the tangent ray with the steepest gradient. Our next (x,y)-pair is where this ray hits z=0. That means: gradx = df/dx, x=xold grady = df/dy, y=yold grad = sqrt(gradx^2 + grady^2) dirx = -gradx/grad diry = -grady/grad len = f/grad xnew = xold + len*dirx ynew = yold + len*diry The simplest function I could think of was z=x^2+y^2+1. But that would be rotationally symmetrical, so I chose z=x^2+2*y^2+1. For visualizing it, I chose a bailout radius and colored depending on the iteration that reached this radius. Sadly the results are not as breathtaking as I hoped in my enthusiasm (pic 2). Anyway, I still liked the idea and wanted to post it here, maybe someone finds a better function or a better way for coloring. Greetings, Mircode Title: Re: Newton's catapult Post by: kram1032 on June 13, 2010, 11:18:29 PM here you have the generic quadratic formula of Newton :)
http://www.wolframalpha.com/input/?i=x[n%2B1]%3D%28a+x[n]^2-b%29%2F%282+a+x[n]%29 However, your idea has a problem: A quadratic function like that has two zero points in the complex plane... EDIT: Ok, well, what you do here is a map over the reals², rather than over the complex plane... That works too, I guess :) Title: Re: Newton's catapult Post by: Mircode on June 14, 2010, 10:44:30 AM Quote here you have the generic quadratic formula of Newton smiley http://www.wolframalpha.com/input/?i=x[n%2B1]%3D%28a+x[n]^2-b%29%2F%282+a+x[n]%29 Very interesting! I didn't know that wolframalpha can do that. I will try that now everytime before I implement Newton's algorithm for a problem. However, it is the solution to the 1-D problem. In 2-D the variables x and y influence each other in every step. And yes, no complex calculation. I should have mentioned that. Title: Re: Newton's catapult Post by: kram1032 on June 14, 2010, 10:54:04 AM You mentioned that implicitly. I just didn't read carefully enough^^ I can tell you already: In most cases, Wolfram Alpha wont do it. In case of the quadratic formula, you actually get a linear expression in the Newtonean form. Polynomials of higher order do already fail... It similarly works for some special cases of the Mset. For instance: x[n+1]=x[n]² and x[n+1]=x[n]²-2 I didn't yet find any other value, wolfram alpha finds a continuous solution for. Not really surprising. The two points are especially rather undynamic but if you go for more interesting points, the behaviour becomes so complex that it should be basically impossible to express it in simple continuous and analytic formulae. If someone manages to do so or at least find a continous version that still isn't in closed form (some weird integral might exist, that just does that :)), that person pobably gets a Nobelprize, especially if the way of solving isn't limited to a particular problem but easily extendable on several cases :) |