Quit[]
M=1/2;x=1-r0/r;ϵ=(2M-r0)/r0;a0=b0=0;A[r_]=1-ϵ(1-x)+(a0-ϵ)(1-x)^2+Al[r](1-x)^3;B[r_]=1+b0(1-x)+Bl[r](1-x)^2;Nm[r_]=Sqrt[xA[r]];Al[r_]=1/xContinuedFractionK[a[n]x,1,{n,3}];Bl[r_]=1/xContinuedFractionK[b[n]x,1,{n,3}];f[r_]=Nm[r]^2/B[r];V[r_]=Nm[r]^2l(l+1)/r^2+(1-s)/2/rD[f[r]^2,r];eq=f[r]D[f[r]D[R[r],r],r]+(ω^2-V[r])R[r];R[r_]=Exp[σr]x^ρ(x-1)^λy[r];a[1]=1/2;a[2]=100;a[3]=0;b[1]=0;ϵ=0;r0=1;fctor=Coefficient[R[r],y[r]];eqr=eq/fctor//Simplify;eqrr=Collect[eqr,{y[r],[r],[r]}];epeq=Series[eqrr,{r,Infinity,3}];epf=Solve[Coefficient[Coefficient[epeq,y[r]],r,0]0&&Coefficient[Coefficient[epeq,y[r]],r,-1]0,{σ,λ}];(*solvetheparameter{σ,λ}usingtheboundaryconditionatinfinity*)eqnr=Collect[eqr,(-1+r)]//Together//Simplify;eqrho=eqnr/.r1;rho=Solve[Coefficient[eqrho,y[1]]0,ρ];(*solvetheparameterρusingtheboundaryconditionattheeventhorizon*)Equation=Simplify[eqr/.rho[[1]]/.epf[[2]]];(*theradialfunctionwithrho[[1]]andepf[[2]]willsatisfythequasinormalboundaryconditions*)r[z_]=First[r/.Solve[z1-1/r,r]];CompactCoordinateEquation=Equation/.[r]D[D[y[z],z]/D[r[z],z],z]/D[r[z],z]/.[r]->D[y[z],z]/D[r[z],z]/.y[r]y[z]/.rr[z]//Expand;y2Coeff=Coefficient[CompactCoordinateEquation,y''[z]]//Together;y1Coeff=Coefficient[CompactCoordinateEquation,y'[z]]//Together;yCoeff=Coefficient[CompactCoordinateEquation,y[z]]//Together;fr=PolynomialGCD[y2Coeff,y1Coeff,yCoeff];y2RCoeff=Simplify[y2Coeff/fr];y1RCoeff=Simplify[y1Coeff/fr];yRCoeff=Simplify[yCoeff/fr];PolynomialQ[y2RCoeff,z]&&PolynomialQ[y1RCoeff,z]&&PolynomialQ[yRCoeff,z];CoefficientListMatrix=CoefficientList[{y2RCoeff/z,y1RCoeff,zyRCoeff},z];
′
y
′′
y
′′
y
′
y
z1=15/1000;z2=30/1000;z3=60/1000;z4=120/1000;z5=240/1000;z6=480/1000;z7=960/1000;(*midpointsforcontinuation*)y2RCoeffst=y2RCoeff/.zt+z1;y1RCoeffst=y1RCoeff/.zt+z1;yRCoeffst=yRCoeff/.zt+z1;CoefficientListMatrix1=CoefficientList[{y2RCoeffst,ty1RCoeffst,yRCoeffst},t];y2RCoeffnd=y2RCoeff/.zt+z2;y1RCoeffnd=y1RCoeff/.zt+z2;yRCoeffnd=yRCoeff/.zt+z2;CoefficientListMatrix2=CoefficientList[{y2RCoeffnd,ty1RCoeffnd,yRCoeffnd},t];y2RCoeffrd=y2RCoeff/.zt+z3;y1RCoeffrd=y1RCoeff/.zt+z3;yRCoeffrd=yRCoeff/.zt+z3;CoefficientListMatrix3=CoefficientList[{y2RCoeffrd,ty1RCoeffrd,yRCoeffrd},t];y2RCoefffr=y2RCoeff/.zt+z4;y1RCoefffr=y1RCoeff/.zt+z4;yRCoefffr=yRCoeff/.zt+z4;CoefficientListMatrix4=CoefficientList[{y2RCoefffr,ty1RCoefffr,yRCoefffr},t];y2RCoefffv=y2RCoeff/.zt+z5;y1RCoefffv=y1RCoeff/.zt+z5;yRCoefffv=yRCoeff/.zt+z5;CoefficientListMatrix5=CoefficientList[{y2RCoefffv,ty1RCoefffv,yRCoefffv},t];y2RCoeffsx=y2RCoeff/.zt+z6;y1RCoeffsx=y1RCoeff/.zt+z6;yRCoeffsx=yRCoeff/.zt+z6;CoefficientListMatrix6=CoefficientList[{y2RCoeffsx,ty1RCoeffsx,yRCoeffsx},t];y2RCoeffsh=y2RCoeff/.zt+z7;y1RCoeffsh=y1RCoeff/.zt+z7;yRCoeffsh=yRCoeff/.zt+z7;CoefficientListMatrix7=CoefficientList[{y2RCoeffsh,ty1RCoeffsh,yRCoeffsh},t];terms=CoefficientListMatrix//Dimensions//Last;rcf=Function[{i,n},(n+2-i)(n+1-i)CoefficientListMatrix[[1,i]]+(n+2-i)CoefficientListMatrix[[2,i]]+CoefficientListMatrix[[3,i]]];terms1=CoefficientListMatrix1//Dimensions//Last;rcf1=Function[{i,n},(n+3-i)(n+2-i)CoefficientListMatrix1[[1,i]]+(n+3-i)CoefficientListMatrix1[[2,i]]+CoefficientListMatrix1[[3,i]]];terms2=CoefficientListMatrix2//Dimensions//Last;rcf2=Function[{i,n},(n+3-i)(n+2-i)CoefficientListMatrix2[[1,i]]+(n+3-i)CoefficientListMatrix2[[2,i]]+CoefficientListMatrix2[[3,i]]];terms3=CoefficientListMatrix3//Dimensions//Last;rcf3=Function[{i,n},(n+3-i)(n+2-i)CoefficientListMatrix3[[1,i]]+(n+3-i)CoefficientListMatrix3[[2,i]]+CoefficientListMatrix3[[3,i]]];terms4=CoefficientListMatrix4//Dimensions//Last;rcf4=Function[{i,n},(n+3-i)(n+2-i)CoefficientListMatrix4[[1,i]]+(n+3-i)CoefficientListMatrix4[[2,i]]+CoefficientListMatrix4[[3,i]]];terms5=CoefficientListMatrix5//Dimensions//Last;rcf5=Function[{i,n},(n+3-i)(n+2-i)CoefficientListMatrix5[[1,i]]+(n+3-i)CoefficientListMatrix5[[2,i]]+CoefficientListMatrix5[[3,i]]];terms6=CoefficientListMatrix6//Dimensions//Last;rcf6=Function[{i,n},(n+3-i)(n+2-i)CoefficientListMatrix6[[1,i]]+(n+3-i)CoefficientListMatrix6[[2,i]]+CoefficientListMatrix6[[3,i]]];terms7=CoefficientListMatrix7//Dimensions//Last;rcf7=Function[{i,n},(n+3-i)(n+2-i)CoefficientListMatrix7[[1,i]]+(n+3-i)CoefficientListMatrix7[[2,i]]+CoefficientListMatrix7[[3,i]]];
2
t
2
t
2
t
2
t
2
t
2
t
2
t
NITMAX=100;α=rcf[#1,#2]&;fs=Table[If[i>j+2,0,α[i,j]],{j,0,NITMAX},{i,1,10}];
Do[fs=FoldList[If[PossibleZeroQ[#2//Last],#2//Most,(Most[#2]-(#2//Last)/(#1//Last)*Prepend[#1//Most,0])//Together]&,fs//First//Most,fs//Rest],{7}](*Gausselimination*)
How can I correct the following code to produce the expected result?I am reading the article "First few overtones probe the event horizon geometry". I want to replicate the results of Table 1 in the above article using the analytical continuation method as mentioned in the article. However, my code doesn't run out of any results. I don't know what's wrong with it, because there is no warning message. https://arxiv.org/pdf/2209.00679
To help you identify and correct any issues with your code, let's break down the process and potential areas where things might be going wrong. Here are some steps and suggestions that might help:1. Initialization and Definitions: Make sure all the variables and functions are properly initialized and defined. Double-check the expressions for , , , , , and .2. Symbolic Computations: Ensure that symbolic computations involving , , , and functions are correctly used. These functions can sometimes return unexpected results if the expressions are not simplified properly.3. Boundary Conditions: The parameters σ, λ, and ρ seem to be derived from boundary conditions. Verify that these are being solved correctly and applied to the equations as intended. 4. Compact Coordinate Transformation: The transformation from r to z using should be checked for correctness. Ensure that the transformation is valid and consistent with the article's methodology.5. Polynomial Coefficients: When extracting polynomial coefficients using , make sure the resulting matrices (, , etc.) are correctly dimensioned. Check the implementation of rcf, , ..., .6. Gauss Elimination: The Gauss elimination step at the end of the code should be carefully inspected to ensure it is reducing the system of equations as expected. The use of should align with the intended algorithm.7. Numerical Parameters: The constants like , , ..., are used for midpoints in continuation. Make sure these values are correct and relevant to the problem.8. Debugging: Add print statements or use for intermediate results to check if they are as expected. This can help in identifying at which step the computation starts diverging.9. Check the Article: Ensure that your implementation aligns with the methodology described in the article. Sometimes small discrepancies can lead to significant differences in results.If you could specify which part of the code seems problematic, or if there's a section where you're unsure what's happening, I can provide more targeted advice. Alternatively, you might want to simplify the problem by testing smaller sections of the code individually to isolate the issue. If necessary, you can also try using numerical evaluations (with specific parameter values) to see if the functions behave as expected, which might give you some insight into potential symbolic problems.