Fractal Software > Programming

Series Approximation for other powers

(1/2) > >>

superheal:
Has anyone managed to create the SA formulas for other mandelbrot powers like 3 or 4?
Are there any formulas for the burning-ship variants?

claude:
KF has 3 terms for arbitrary power Mandelbrot: https://code.mathr.co.uk/kalles-fraktaler-2/blob/7adcf8dafd007f8da0c164fb020910f4fc37053c:/fraktal_sft/floatexp_approximation.cpp#l363
This is from before I took over.

KF has some series for Burning Ship (two bivariate real series) but it only skips one period (at most), because of the folding...

superheal:
Is there any general formula to get more terms, for power N?

superheal:
Also another question, how do you initialize A0, B0, C0?
A0 =1, B0 = 0, C0 = 0?

Do we still need to calculate the same powers of Delta for all powers P?
An*D + Bn*D^2 + Cn*D^3

claude:
Maybe you can work out some patterns using a computer algebra system, for example Sage (based on Python) or Maxima (based on Common Lisp).  You can use Sage online without installing anything:
https://sagecell.sagemath.org/?z=eJxtkEEKwjAQRfeCd_h0NaOxWBeCgitv4UIpMWlDtYZURT29U1tpi2YTZvh58yb2EuDhSoS0zAwtFJa8Ho8gx5JWeDE2eO09ptBN2wdXXslyU2W0VdgpfKNkaVtnpSmXtGbCqSPMsXn4tDwSx5U7-5OzT-I-MmurfE66RlW3M-GeBorSQySw6hqoYMYEel_AinjRiScKK8aAl8-_wKQB9lw_M_pGJjhT1Quv2kf_-O3HdCN-7VS03kTqMzHWF2Ot085IUpR5YMdvqDBgIA==&lang=sage&interacts=eJyLjgUAARUAuQ==

--- Code: ---for p in range(2, 6):
f(c, z) = z^p + c
print(f)
g(C, Z, c, z) = (f(C + c, Z + z) - f(C, Z)).expand().simplify()
print(g)
h0(c) = sum( var("a_" + str(k)) * c^k for k in range(1, 9) )
print(h0)
h1(c) = g(C, Z, c, h0(c)).expand().series(c, 9)
for k in range(1, 9):
print(var("a_" + str(k)),":=",h1(c).coefficient(c^k))
print()
--- End code ---

--- Code: ---(c, z) |--> z^2 + c
(C, Z, c, z) |--> 2*Z*z + z^2 + c
c |--> a_8*c^8 + a_7*c^7 + a_6*c^6 + a_5*c^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*a_4 + 10*Z^3*a_4^2 + 20*Z*a_1^3*a_5 + 60*Z^2*a_1*a_2*a_5 + 20*Z^3*a_3*a_5 + 30*Z^2*a_1^2*a_6 + 20*Z^3*a_2*a_6 + 20*Z^3*a_1*a_7 + 5*Z^4*a_8
--- End code ---

Initialisation is as you say, first coefficient (of c^1) is 1, remainder are 0.  Maybe some of the coefficients will always be zero in practice, but looking at the output from the Sage code a_2 always mentions a_1 which is non-zero in general so I think they'll all be non-zero in general?  Hard to be sure without trying it out...  This is different from (parts of) the bivariate series used in nanomb, iirc.