Checked for several orders :
In[]:=
amp=x^(1/x);​​​​Table[​​Module[{ampSeries,antiApprox},​​ampSeries=Normal@Asymptotic[amp,{x,Infinity,n}];​​antiApprox=Integrate[ampSeries,x];​​FullSimplify@AsymptoticLess[​​D[antiApprox,x]-amp,​​amp,​​x->Infinity​​]​​],​​{n,1,5}​​]
Out[]=
{True,True,True,True,True}
Checked for several orders :
In[]:=
amp=x^(1/x);​​​​s[n_]:=Exp[PiIx]Sum[​​(-1)^k/(PiI)^(k+1)D[amp,{x,k}],​​{k,0,n}​​];Table[​​FullSimplify@AsymptoticLess[​​D[s[n],x]-Exp[PiIx]amp,​​Exp[PiIx]amp,​​x->Infinity​​],​​{n,0,5}​​]
Out[]=
{True,True,True,True,True,True}
ThenotebookAssistantsaid:
The analogous simplification is that
x
(-1)
iπx
e

iπx
e
iπx
e

2πix
e
,
if you interpret
x
(-1)

iπx
e
.
So your integrand becomes
x
(-1)
iπx
e
1/x
x

2πix
e
1/x
x
.
Hence the
analogue of the previous asymptotic antiderivative is just the same formula with
\pi i
replaced by
2\pi i
:
So for
the relevant asymptotic boundary term
is
Since
is periodic with period 1, at the upper endpoint
:
so the upper-end behavior is governed just by the slowly varying amplitude terms. In particular, the leading term is
and since
the boundary term does
not
go to 0. So the improper integral generally does
not
converge in the ordinary sense.
In Wolfram Language, the direct analogue is:
In[]:=
amp=x^(1/x);​​​​s[n_]:=Exp[2PiIx]Sum[​​(-1)^k/(2PiI)^(k+1)D[amp,{x,k}],​​{k,0,n}​​];
and the corresponding asymptotic check is:
In[]:=
Table[​​FullSimplify@AsymptoticLess[​​D[s[n],x]-Exp[2PiIx]amp,​​Exp[2PiIx]amp,​​x->Infinity​​],​​{n,0,5}​​]
Out[]=
{True,True,True,True,True,True}
which is the exact analogue of your previous computation.
So the short answer is:
◼
  • replace
    Exp[PiIx]
    by
    Exp[2PiIx]
  • ◼
  • replace
    (Pi I)^(k+1)
    by
    (2 Pi I)^(k+1)
  • ◼
  • the resulting endpoint term does not vanish, so the limit integral is not expected to converge ordinarily
  • Normalized asymptotic function with order 3 (in blue and orange) appears to be following the integral (in red and green)
    In[]:=
    ClearAll[amp,envelope,asymptotic,normalizedAsymptotic,exact,u,x,t];​​ ​​ amp[t_]:=t^(1/t);​​ ​​ envelope[n_,x_]:=Sum[​​ (-1)^k(2PiI)^(k+1)(D[u^(1/u),{u,k}]/.u->x),​​ {k,0,n}​​ ];​​ ​​ asymptotic[n_,x_]:=Exp[2PiIx]envelope[n,x];​​ ​​ normalizedAsymptotic[n_,x_]:=asymptotic[n,x]-asymptotic[n,1];​​ ​​ exact[x_?NumericQ]:=NIntegrate[​​ Exp[2PiIt]amp[t],​​ {t,1,x},​​ Method->"Oscillatory",​​ WorkingPrecision->30​​ ];​​ ​​ exactData=Table[{s,exact[s]},{s,1,30,0.25}];​​ ​​ Show[​​ ListLinePlot[​​ ​​ exactData/.{s_,y_}:>{s,Re[y]},​​ exactData/.{s_,y_}:>{s,Im[y]}​​ ,​​ PlotStyle->{{Red,Opacity[0.5]},{Green,Opacity[0.5]}},​​ PlotLegends->{"Re exact","Im exact"}​​ ],​​ Plot[​​ Evaluate@​​ Re[normalizedAsymptotic[3,x]],​​ Im[normalizedAsymptotic[3,x]]​​ ,​​ {x,1,30},​​ PlotStyle->{Thick,Thick},​​ PlotLegends->{"Re asymptotic n=3","Im asymptotic n=3"}​​ ],​​ ImageSize->Large,​​ PlotRange->All​​ ]
    About the same value, even for small starting points