Fractals/Mathematics/Derivative

From Wikibooks, open books for an open world
Jump to navigation Jump to search


notation[edit | edit source]

  • variable z
  • constant parameter c
  • function f
  • derivative d
  • iteration number p
  • wrt = with respect to

Notation types[5]

  • Leibniz's notation
  • Euler's notation
  • Newton's notation ( dot notation)
  • Lagrange's notation ( prime mark notation)


Derivative of the iterated function[edit | edit source]

  "the derivative basically as it's calculated for anlytical DE using the implementation of the chain rule for the derivative of f(g(x)) where f(x) is say g(x)^p+c and the value of g(x) is current z. So f'(g(x)) is p*z^(p-1)  and g'(x) is the derivative from the previous iteration,  so on each iteration the new derivative is:  dz = dz*p*z^(p-1)  and new z = z^p+c as normal" FractalDave[6]
// initial values:
z = z
d = 1


// Recurrence steps: 
d = f'(z)*d   // calculating d and multiply the previous d
z = f(z)       // forward iteration


It can be computed with Maxima CAS :

display2d:false;
f:1/(z^3+d*z);
dz : diff(f,z,1); // first derivative of f wrt variable z 
dc :  diff(f,c,1); // first derivative of f wrt parameter c



Rational function[edit | edit source]

 
 

degree 3[edit | edit source]

wrt z


// function 
f(z)= 1/(z^3 + c*z )

// first derivativwe wrt z
d = f'(z) = -(3z^2 +c)/(z^3 + cz)^2

// iteration:
z_(n+1) = f(z_n)


// initial values:
z = z
d = 1

// Recurrence steps:
d = - d*(3z^2 +c)/(z^3 + cz)^2
z = 1/(z^3 + c*z) 


degree 5[edit | edit source]

Julia set f(z)=1 over az5+z3+bz
display2d:false;
f: 1/(a*z^5+ z^3 + b*z);
dz: diff(f,z,1);



in plain text:

  dz = -(5*a*z^4+3*z^2+b)/(a*z^5+z^3+b*z)^2


Example:

  • 1/((0.15*I+0.15)*z^5+(3*I-3)*z + z^3)


degree 5 by Buschmann[edit | edit source]

Julia set drawn by distance estimation, the iteration is of the form in black and white
f(z):=z^5/(4*z+2)-z^2+c+1

(%i4) diff(f(z), z,1);

(%o4) (5*z^4)/(4*z+2)-(4*z^5)/(4*z+2)^2-2*z

Polynomials[edit | edit source]

Complex quadratic polynomial[edit | edit source]

z^2+c[edit | edit source]
First derivative wrt c[edit | edit source]

On parameter plane :

  • is a variable
  • is constant

This derivative can be found by iteration starting with

and then ( compute derivative before next z because it uses previous values of z):


This can be verified by using the chain rule for the derivative.


  • Maxima CAS function :


dcfn(p, z, c) :=
  if p=0 then 1
  else 2*fn(p-1,z,c)*dcfn(p-1, z, c)+1;

Example values :


It can be used for:

  • the distance estimation method for drawing a Mandelbrot set ( DEM/M )
First derivative wrt z[edit | edit source]

is first derivative with respect to z.

This derivative can be found by iteration starting with

and then :



description arbitrary name formula Initial conditions Recurrence step common names
iterated complex quadratic polynomial z or f
first derivative with respect to z dz, d (from derivative) or p ( from prime) of f'


Derivation of recurrence relation:






It can be used for :

unsigned char ComputeColorOfDEMJ(complex double z){
// https://en.wikibooks.org/wiki/Fractals/Iterations_in_the_complex_plane/Julia_set#DEM.2FJ


  int nMax = iterMax;
  complex double dz = 1.0; //  is first derivative with respect to z.
  double distance;
  double cabsz;
	
  int n;

  for (n=0; n < nMax; n++){ //forward iteration

    if (cabs(z)> 1e60 || cabs(dz)> 1e60) break; // big values
    
  			
    dz = 2.0*z * dz; 
    z = z*z +c ; /* forward iteration : complex quadratic polynomial */ 
  }
  
  cabsz = cabs(z);
  distance = 2.0 * cabsz* log(cabsz)/ cabs(dz);
  if (distance <distanceMax) {//printf(" distance = %f \n", distance); 
  		return iColorOfBoundary;}
  
  
  return iColorOfExterior;
}
logistic map[edit | edit source]

Logistic map[8]

complex cubic polynomial[edit | edit source]

wrt z[edit | edit source]
Julia set for f(z) = z^3 +z*(0.1008317508132964*i + 1.004954206930806)
// function 
f(z)= z^3 + c*z 

// first derivativwe wrt z
d = f'(z) = 3*z^2 + c

// iteration:
z_(n+1) = f(z_n)


// initial values:
z = z
d = 1

// Recurrence steps:
d = (3*z^2 + c)*d
z = z^3 + c*z 


FAQ[edit | edit source]

  • why new d must be computed before new z ? [9]


Aplications[edit | edit source]

See also[edit | edit source]

  • automatic differentiation[10]

References[edit | edit source]

  1. mathoverflow question : whats-a-natural-candidate-for-an-analytic-function-that-interpolates-the-tower/43003
  2. Faa di Bruno and derivatives of an iterated function ON MAY 20, 2017 BY DCHOYLE
  3. A Cheritat wiki : Mandelbrot_set - Following_the_derivative
  4. fractalforums.org: period-detection
  5. Notation_for_differentiation in wikipedia
  6. fractalforums.org : all-periodic-bulbs-as-point-attractors
  7. A Cheritat wiki  : Mandelbrot_set - Interior_detection_methods
  8. Fractalforums.org : exterior-distance-estimation-for-logistic-map
  9. Following_the_derivative by Arnaud Cheritat
  10. Automatic_differentiation in wikipedia