Hello,
OK, you are right, increasing WorkingPrecision helps, so that I wrote a new version of my test code:
(* Analytical solution, assuming finite interval L, just to avoid
any potential controversy regarding the right choice of L to mimic infinity *)
uanal[x_,s_,b_]=-(AiryAi[s+x]*AiryBi[s+b]-AiryAi[s+b]*AiryBi[s+x])/(AiryAiPrime[s]*AiryBi[s+b]-AiryAi[s+b]*AiryBiPrime[s]);
s=2;
L=10;
ndigits=32;
sol=NDSolve[{u''[x]-(s+x)*u[x]==0,u'[0]+1==0,u[L]==0},u[x],{x,0,L},WorkingPrecision->50,PrecisionGoal->30];
uappr[x_]=First[u[x]/.sol];
u0=N[uappr[0],ndigits]
0.65782402587273264492979577402005
u0acc=N[uanal[0,s,L],ndigits]
0.65782402587268160074874669507081
rerror=u0/u0acc-1
7.75954952106876733e-14
As can be seen, a relative error about 8e-14 is now achieved. However, please note that I requested
AccuracyGoal->30. I don't see a way to obtaining such accuracy, but I need at least 32 accurate digits.
Setting AccuracyGoal->32 yields the following solution failure:
sol=NDSolve[{u''[x]-(s+x)*u[x]==0,u'[0]+1==0,u[L]==0},u[x],{x,0,L},WorkingPrecision->50,PrecisionGoal->32];
NDSolve:mxst: Maximum number of 10000 steps reached at the point x== ...etc.
NDSolve:bvaux: Unable to solve auxiliary system for boundary conditions at x == 0
So, Please tell me how to achieve my goals.
Leslaw