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)

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s