Given an equation:
f(z) = a (x + I y)^3 + b (x + I y)^2 + c (x + i y) + d
Which can be re-written as:
real f(z) ax^3 - 3axy^2 + bx^2 - by^2 + cx + d imag f(z) 3ax^2y - ay^3 + 2bxy + cy
Am I correct in deriving them this way?
Mathematica: D[a x^3 + 3 a x y^2 + b x^2 + c x + d, x] // TraditionalForm real f'(z) 3ax^2 + 3ay^2 + 2bx + c Mathematica: D[3 a x^2 y - a y^3 + 2 b x y + c y, y] // TraditionalForm imag f'(z) 3 a x^2-3 a y^2+2 b x+c
Some background. While I have dabbled in what I consider the interesting bits of mathematics all my life I am at best an amateur (hopefully in the British sense) at best. It has been a very long time since I took Calculus and that was single variable Calc at that. My current investigation is into just where I made errors in what should have been a simple implementation of Newton's method involving Cubic functions. This in aid of creating the resultant fractal plot. This was in the early 80's when my software and FracInt were pretty much the only ball games in town. Here is the code as written for Ultra-Fractal:
zold = #z iz = imag(#z) rz = real(#z) zr2 = sqr(rz) zi2 = sqr(iz) t0 = (rz - iz) * (rz + iz) t1 = (3.0 * A * t0) + (2.0 * B * rz) + @C t2 = 2.0 * iz * (3.0 * A * rz + B) t3 = A * rz * (zr2 - 3.0 * zi2) + (B * t0 + @C * rz) + @D t4 = rz * (3.0 * A * rz - 2.0 * B) - (A * zi2) + @C t5 = sqr(t1) + sqr(t2) zr = (((rz * t5) - (t1 * t3) - (iz * t2 * t4)) / t5) zi = (((iz * t5) + (t2 * t3) - (iz * t1 * t4)) / t5) #z = zr + flip(zi)
I am attempting to compare what I should have done with what I did so as to better understand what I'm doing! The formula produces Newton images unlike any others so I do not seek to correct the errors, just comprehend them. BTW, the lack of expression in terms of complex types is based on the lack of a complex type when this was written in the early 80's---complex.h was typically a roll your own affair but even at that, it was the norm to break things up in terms of real and imag and process accordingly.