altering Newton’s method

The usual scheme for Newton’s method is $z_{n+1} = z_{n} - \frac{f(z_{n})}{f'(z_{n})}$. But what if we just choose some random $g(z)$ for $\frac{f(z_{n})}{f'(z_{n})}$?

Set $g(z) = \frac{\cos(e^{z})}{e^{\sin(z)}}$
Now, as far as differential equations go, solving
$\frac{f(z)}{f'(z)} = \frac{\cos(e^{z})}{e^{\sin(z)}}$
is pretty tricky.

But I can still generate a fractal from it:

sometimes mistakes are interesting

suppose you’re doing a Newton’s method fractal of $\log(z)$, and you forget the derivative and use $z\log(z)-z$ instead

y=xc^x+x+1

I saw solving $y=xc^{x}+x+1$ on m.se today, and decided that it was ripe for a Newton’s method fractal, so, here you go:

It uses the following python code:

#!/usr/bin/python

from mpmath import *
import pylab

def g(z,x):
return x*(z**x) + x + 1

def newt(z):
x = z
for i in range(1,30):
x = x - g(z,x)/((z**x)*(1.0+x*fp.log(z))+1.0)
return x

fp.cplot(lambda z: newt(z), [-5.0,5.0], [-5.0,5.0], verbose=True, points=800000)