(* ::Package:: *)
(* Rechnernutzung in der Physik, WS23/24
Beispiele zu Harmonischen Polylogarithmen: *)
$HPLPath = "~/HPL/";$Path = Flatten[{$Path,$HPLPath}];
<1.3}
tab = Table[ {xx,ex3}/.x->xx , {xx,-3,3,0.21} ]
ListPlot[ {tab/.{x_,y_}:>{x,Re[y]}, tab/.{x_,y_}:>{x,Im[y]}} , Joined->True]
N[ex3/.x->1/5,100]
ex4 = HPL[{1,1,1,0}, x ]
Integrate[ 1/x * ex4 , {x,0,xx}]
Integrate[ 1/(1-x) * ex4 , {x,0,xx}]
Integrate[ 1/(1+x) * ex4 , {x,0,xx}]
Integrate[ 1/x/(1-x) * ex4 , {x,0,xx}]
(* -> funktioniert nicht
-> Partialbruchzerlegung notwendig *)
Apart[ 1/x/(1-x) ]
exhelp = Expand[ Apart[ 1/x/(1-x) ] * ex4 ] /. {1/(-1+x) -> -1/(1-x)}
Integrate[ exhelp[[1]] , {x,0,xx}] + Integrate[ exhelp[[2]] , {x,0,xx}]
HPLInt[ 1/(1-x) * ex4 , x ]
HPLInt[ 1/x/(1-x) * ex4 , x ]
(* ------------------------------------------------------------ *)
$HPLPath = "~/HPL/";$Path = Flatten[{$Path,$HPLPath}];
<0) von int[1], int[2] und int[3]: *)
int130 = Normal[ Series[{int[1],int[2],int[3]},{x,0,0}, Assumptions->{x>0,x<1}] ]
(* finales Resultat: *)
intfin = Collect[
(int[1]/.x->xx) - int130[[1]] + (int[2]/.x->xx) - int130[[2]] + (int[3]/.x->xx) - int130[[3]]
,{Log[xx__],PolyLog[n_,x_]},Expand]
(* integriere urspruengliche HPL-funktion direkt: *)
intORG = Integrate[ HPL[{1, 0, 0}, x] / (1-x), {x,0,xx} ]
(* Vergleiche: *)
Expand[ intfin - intORG // HPLConvertToKnownFunctions ]
intfin - intORG /. xx->RandomReal[]