I am trying to use NDSolve to solve r[u] equation below. The problem seems like the slow convergence. I have searched some questions regarding this kind of problem. I think many people answered in some form of increasing working precision. If I increase the workingprecision, i get that the argument is not upto the machine precision. I will attach the warning it gave when I do NDSolve and my code.
NIntegrate::slwcon: Numerical integration converging too slowly; suspect one
of the following: singularity, value of the integration is 0, highly
oscillatory integrand, or WorkingPrecision too small.
NIntegrate::ncvb: NIntegrate failed to converge to prescribed accuracy after
18 recursive bisections in s near {t,s} = {4.85075,0.0000644015}. NIntegrate
obtained 5.58828*10^-21-7.99344*10^-27 I and 2.9124298522935253`*^-24 for
the integral and error estimates.
Code:
L[u_] := 1/(64 \[Pi]^2 t^5 Sqrt[u]) (-4 I t (s + I t^2 + s Log[4]) + (s^2 +
4 I s t - 4 t^2 + t^4) Log[-2 + (I s)/t + t] - (s^2 - 4 I s t - 4 t^2 + t^4)
Log[2 + (I s)/t + t])
H[u_?NumericQ] := NIntegrate[t^2*u^(5/2)/2*(Log[1 - L[u]] + L[u]/(1 -
L[u])), {t, 0, 10^3}, {s, -10^3, 10^3}, AccuracyGoal -> 8, PrecisionGoal ->
8,WorkingPrecision -> 12]
Plot[H[u], {u, 0, 100}, PlotRange -> All]
sol = NDSolve[{H[u] == u*r'[u] - 2 r[u], r[10^6] == -1}, r, {u,
10^-9, 10}, AccuracyGoal -> 8, PrecisionGoal -> 8, WorkingPrecision -> 12]
Plot[Evaluate[r[u] /. sol], {u, 10^-9, 10}, PlotRange -> All, PlotStyle ->
Green]
Where on the NDSolve line, I wanted a boundary condition that $r\rightarrow -1$ as $u\rightarrow\infty$, but just set u=10^6 to avoid infinity expression; I hope that's okay.
Any help will be greatly appreciated! Thank you so much for reading my question!
NIntegrate
, notNDSolve
. Also, I suggest you deleteWorkingPrecision -> 12
. $\endgroup$