We can solve this problem using colocation method with Euler wavelets ang Gauss quadrature rule. First we define interval $0\le R\le Rmax$ and map interval $(0,R)$, on R/2 (1+z)
with $-1\le z \le 1$ in integrand, then the Volterra integral equation becomes Fredholm integral equation. Before code please call
Get["NumericalDifferentialEquationAnalysis`"];
Code
e = 0.995;
v[R_] := 0.342331 Sqrt[R^2/(0.728117 + R^2)^0.87955];
Rmin = 0; Rmax = 5;
UE[m_, t_] := EulerE[m, t];
psi[k_, n_, m_, t_] :=
Piecewise[{{2^(k/2) UE[m, 2^k t - 2 n + 1], (n - 1)/2^(k - 1) <=
t < n/2^(k - 1)}, {0, True}}];
PsiE[k_, M_, t_] :=
Flatten[Table[psi[k, n, m, t], {n, 1, 2^(k - 1)}, {m, 0, M - 1}]]
k0 = 4; M0 = 7; With[{k = k0, M = M0},
nn = Length[Flatten[Table[1, {n, 1, 2^(k - 1)}, {m, 0, M - 1}]]]];
dx = 1/(nn); xl = Table[l*dx, {l, 0, nn}]; M = nn; np = nn; g =
GaussianQuadratureWeights[np, -1, 1];
ugrid = g[[All, 1]]; weights = g[[All, 2]]; xcol =
Table[(xl[[l - 1]] + xl[[l]])/2, {l, 2, nn + 1}]; Psijk =
With[{k = k0, M = M0}, PsiE[k, M, t1]];
Psi[y_] := Psijk /. t1 -> y;
A = Array[a, nn]; Rho[y_] := A . Psi[y];
eqs = Table[
v[Rmax x]^2 ==
0.31376632053307746 (Rmax x)^2/
2 Sum[( (1 + z)^2 Rho[ 1/2 x (1 + z)] weights[[i]])/Sqrt[
1 - 0.24750625 (1 + z)^2] /. z -> ugrid[[i]], {i, np}], {x,
xcol}];
{vec, mat} = CoefficientArrays[eqs, A]
sol = LinearSolve[mat // N, -vec];
rul = Table[A[[i]] -> sol[[i]], {i, nn}]; p=Plot[
Rho[x/Rmax] /. rul, {x, 0, Rmax}, PlotRange -> {0, .2}, AxesLabel -> {"R", "\[Rho]"}]
Update 1. We can compare this solution (solid line) with Ulrich solution at Rmax=5
(red dashed line) as follows
e = 0.995;
v[R_] := 0.342331 Sqrt[R^2/(0.728117 + R^2)^0.87955];
Rmin = 0; Rmax = 5;
ni = 50;
ri = Subdivide[Rmin, Rmax, ni];
f[G_] :=
Block[{R, m, zw = Simplify[v[R] v'[R]/(2 \[Pi] R)]},
Interpolation[
Table[{R, (
Sqrt[1 - e^2]/e^3 NIntegrate[( s^2 G[s R/e])/(-s^2 + 1)^(
3/2), {s, 0, e}, Method -> "LocalAdaptive"] + zw )}, {R,
ri}]]];
solf = NestList[f, .18/(1 + #^2) &, 20]; p1 =
Plot[solf[[-1]][R], {R, Rmin, Rmax}, PlotStyle -> {Dashed, Red}]
Show[p,p1]
We see a small discrepancy that disappears as the number of iterations increases.
Update 2. We can use also power series as Stephen proposed. Using NMinimize
we can simplifier this method as follows
(m->R/e s)
int =
Table[Integrate[( s^2 s^i)/Sqrt[- s^2 + 1], s], {i, 0, 10}];
int0 = N[int /. s -> 10^-16, 30];
int1 = int /. s -> e;
A = Table[(R/e)^i, {i, 0, 10}]; B = Array[b, Length[A]];
dint = int1 - int0; r = Range[0, 1, 1/10];
eq = Table[-v[R]^2 +
4 Pi Sqrt[1 - e^2] R^2/e^3 Sum[
A[[i]] B[[i]] dint[[i]], {i, Length[A]}], {R, r}];
sol1 = NMinimize[eq . eq, B];
p2 = Plot[A . B /. sol1[[2]], {R, 0, 1}, PlotStyle -> {Red, Dashed}];
Visualization together with wavelets solution
Show[p,p2]
We see nice agreement for power series solution and wavelets solution. Note that we can extend power series up to R=5
using this code
e = 0.995;
v[R_] := 0.342331 Sqrt[R^2/(0.728117 + R^2)^0.87955];
Rmin = 0; Rmax = 5;
int = Table[Integrate[(s^2 s^i)/Sqrt[-s^2 + 1], s], {i, 0, 10}];
int0 = N[int /. s -> 10^-16, 30];
int1 = int /. s -> e;
A = Table[(R/e)^i, {i, 0, 10}]; B = Array[b, Length[A]];
dint = int1 - int0;
Do[rr[i] = Subdivide[i, i + 1, Length[A]];
eqs[i] =
Table[-v[R]^2 +
4 Pi Sqrt[1 - e^2] R^2/e^3 Sum[
A[[i]] B[[i]] dint[[i]], {i, Length[A]}], {R, rr[i]}];
sol[i] = NMinimize[eqs[i] . eqs[i], B];
pp[i] = Plot[A . B /. sol[i][[2]], {R, i, i + 1},
PlotStyle -> {Red, Dashed}, PlotRange -> All];, {i, 0, 4}];
Finally we compare power series solution and wavelets solutions in one plot
Show[p,Table[pp[i], {i, 0, 4}]]
Update 3. To compute solution up to R=10
we need to improve wavelets numerical algorithm using NIntegrate
instead of the Gauss quadrature rule. So we have
e = 0.995; lambda = 4 Sqrt[1 - e^2] \[Pi] /e^3;
v[R_] := 0.342331 Sqrt[R^2/(0.728117 + R^2)^0.87955];
UE[m_, t_] := EulerE[m, t];
psi[k_, n_, m_, t_] :=
Piecewise[{{2^(k/2) UE[m, 2^k t - 2 n + 1], (n - 1)/2^(k - 1) <= t <=
n/2^(k - 1)}, {0, True}}];
PsiE[k_, M_, t_] :=
Flatten[Table[psi[k, n, m, t], {n, 1, 2^(k - 1)}, {m, 0, M - 1}]]
k0 = 4; M0 = 7; With[{k = k0, M = M0},
nn = Length[Flatten[Table[1, {n, 1, 2^(k - 1)}, {m, 0, M - 1}]]]];
dx = 1/(nn); xl = Table[l*dx, {l, 0, nn}]; xcol =
Table[(xl[[l - 1]] + xl[[l]])/2, {l, 2, nn + 1}]; Psijk =
With[{k = k0, M = M0}, PsiE[k, M, t1]];
Psi[y_] := Psijk /. t1 -> y;
A = Array[a, nn]; Rho[y_] := A . Psi[y];
int[x_] :=
NIntegrate[ z^2 Psi[( x z)/e]/Sqrt[1 - z^2], {z, 0, e},
Method -> "LocalAdaptive", AccuracyGoal -> 5];
eq[Rmin_, Rmax_] :=
Table[(v[Rmin + (Rmax - Rmin) x]/(Rmin + (Rmax - Rmin) x))^2 ==
lambda A . int[x], {x, xcol}];
Numerical solution
sol10 = NSolve[eq[0, 10], A];
Visualization together with p
and separately
{p10 = Plot[Rho[x/10] /. sol10[[1]], {x, 0, 10}, PlotRange -> {0, .2},
AxesLabel -> {"R", "\[Rho]"}, PlotStyle -> {Red, Dashed}], Show[p,p10]}
Rho[m]
? $\endgroup$eqn[R_, e_] = vc[R]^2 == Integrate[...]
. Then (ife = 0.1
, for instance) evaluateSeries[eqn[R, 0.1], {R, 0, n}] // Normal // PowerExpand
for variousn = 2, 3, 4, ...
. Comparing coefficients of powers ofR
allows you to solve for the derivatives ofRho[m]
atm == 0
. $\endgroup$