SetDirectory["~/doc/research/first_order_singularities/paper"];

<<IsingScalingFunction`

data2={θ0->1.14841,θYL->0.989667,CYL->-0.172824,G[1]->-0.310183,G[2]->0.247454,g[0]->0.373691,g[1]->-0.0216363}

prep2={θ0,θYL,ruleB[θ0,{g[0],g[1]}],ruleAL[θ0,{g[0],g[1]}],CYL,{G[1],G[2]},{g[0],g[1]}}/.data2

Plot[Evaluate@Last[(DScriptF0DηList@@prep2)[6,θ]],{θ,0,1.1483}]

Plot[Evaluate[g[θ0,{g[0],g[1]}][θ]/.data2],{θ,0,1.148}]

ComplexPlot[(ScriptF@@Most@prep2)[θ],{θ,3}]

(uf@@Most[prep2])[1,θ]

Plot[(uf@@Most[prep2])[1,θ],{θ,-1.148,1.148}]

test=DufDut[θ0,θYL,B,C0,CYL,{},{g[0]}][2][R,θ];

Series[test,{θ,0,0},Assumptions->{R>0,θ0>0,g[0]>1}]

8/60

16/120

D[96 (B^2) ((θ0)^3) ((θYL)^(7/6)) Log[(θ^2) ((g[0])^2)] (θ^2),{θ,2}]

Series[test,{θ,θ0,0},Assumptions->{R>0,θ0>0,g[0]>1}]

Series[(1-(1/((g[θ0,{g[0]}][θ])^(2/Δ)))),{θ,0,1},Assumptions->{θ>0}]

dat=Flatten[Table[{ut[R,θ],uh[θ0,{g[0],g[1]}][R,θ],-(DufDuh@@prep2)[1][R,θ]}/.data2,{R,0.05,2,0.05},{θ,-1.14841,1.14841,0.05}],1];

ListPlot3D[dat]

ParametricPlot[{θ,Evaluate[(DufDut@@prep2)[1][1,θ]]},{θ,-1.148,1.148},AspectRatio->1]

dGdξ

(dΦdηList@@prep2)[0,1]

ListLogPlot[Abs[(DScriptFPlusMinusDξθ0List@@prep2)[10]]]

ListLogPlot[Abs[(DScriptF0DηList@@prep2)[10,0.5]]]

dza

Function[θ,Evaluate@h[θ0,{g1,g2}][θ]]

DerivativeList[f_,x_,n_]:=Through[NestList[Derivative[1],f,n][x]]
EfficientDerivativeList[f_,x_,n_]:=Module[{xp},NestList[Function[g,D[g,xp]],f[xp],n]/.xp->x]

f[x_]:=Log[(x^(1/2))](x^(3/7))Sin[(x^(1/3))]

Timing[DerivativeList[f,x,10];]

data=Map[n|->First[Timing[DerivativeList[f,6,n]]],Range[8]]
efficientData=Map[n|->First[Timing[EfficientDerivativeList[f,6,n]]],Range[13]]

Timing[Derivative[#][f][6]&/@Range[13];]

Show[
ListLogPlot[{data,efficientData}],
LogPlot[(4/5 x)!/4000,{x,0,12}]
]