I have the following functional, it depends of n, m and U, so I want to automatize the calculations for all the regimes and be able to export it in a way I can copy and the past the values easily.
de.du directly from FVC - u > 0 and n < 1
In the data files we still need to consider u<0 and n>1 transformations to get w2.
Clear[n, m, u, w, bint, beta, g, dg, bb, dbb, gama, dgama, fvc, defvc]
{beta[0] = 2, beta[Infinity] = 1}
{2, 1}
beta
bint[u_] := If[u != 0,
NIntegrate[BesselJ[0, x] BesselJ[1, x]/(x + x Exp[u
x/2]), {x, 0, Infinity}]]
beta[u_] := x /. FindRoot[(x/Pi) Sin[Pi/x] == 2 bint[u], {x, 1, 0, 2}]
efvc
bb[n_, m_, u_] := beta[u]^alpha[n, m, u]
alpha[n_, m_, u_] := ((n^2 - m^2)/n^(15/8))^CubeRoot[u]
gamma[n_, m_, u_] := 2 Exp[(Sqrt[u])/(1 - (m/n)^(3/2))]
ClearAll[efvc]
efvc[n_, m_, u_] /; n == 0 := 0
efvc[n_, m_, u_] /; n == m := -(2/Pi)*Sin[Pi*n]
efvc[n_, m_,
u_] := -(((2 bb[n, m, u])/Pi)) (Sin[(Pi*n)/(bb[n, m, u])]) (Cos[(Pi*m)/
gamma[n, m, u]])
EDIT: Here are some of the values I need:
n m U
0 0 6
0.104716449 8.84874E-05 6
0.206578089 0.000825568 6
0.30157079 0.000365564 6
0.410605405 0 6
0.506677627 0 6
0.61058781 0.000617136 6
0.707025022 0 6
0.802439886 8.29668E-05 6
0.90571184 0.00125702 6
0.994287239 0.004617097 6
It doesn't follow an exact interval between each point.
:=for your function definitions. The code you wrote above throws an error (from FindRoot evacuating prematurely) because you're using=rather than:=. See this answer regarding pitfalls awaiting new users, especially the second bullet point. – jjc385 Nov 15 '17 at 16:17