SlogFitFixedPoint04.jpg/code

From Citizendium
Jump to navigation Jump to search
// SlogFitFixedPoint04.jpg is generated using LaTex, C++ and the table of coefficients.
// The table of coefficients can be generated with Maple (software) or Mathematica (software).
// 
/* begin of the Mathematica code that generates the coefficients
Lof[z]=Log[(Exp[z]-1)/z]
M=7;
r[z_]=Sum[v[n]z^n,{n,1,M+2}]
F=Series[r[z]-r[(Exp[z]-1)L]-Lof[z],{z,0,M+2}]
CL=CoefficientList[F,z]
For[n=1,n<M,r[n]=ReplaceAll[v[n], Extract[Solve[Extract[CL,n+1]\[Equal]0,v[n]],1]];n++]
For[n=1,n<M,Print["v[",n,"]=",r[n]];n++]
                                                                                                                        
Solve[z == Log[z], z]
nL = -Conjugate[N[ProductLog[-1], 20]]
Log[nL]-nL
For[n=1, n<M, v[n]=r[n];  Print["r[",n,"]=",N[ReplaceAll[r[n],L->nL],20]]; n++]
(* end of Mathematica code *)
*/ 
// If you have no Mathematica installed, but you want ro reproduce the coefficients, use Maple instead:
/* Begin of the Maspe codes that generates the same coefficients

fog := z -> log((exp(z)-1)/z)
M := 6
Digits := 41
slo := z-> sum(v[n]*z^n, n = 1 .. M)
F := series(slo(z)-slo((exp(z)-1)*L)-fog(z), z, M)
Le := solve(log(x) = x, x)
L := conjugate(evalf(Le, 40))
for m to M-1 do v[m] := solve(coeff(F, z^m) = 0, v[m]) end do

End of the Maple code */
/* Begin of the C++ code */


/* End of the C++ code */
// Copyleft 2008 by Dmitrii Kouznetsov