Code:
For #2, it seems constant 2.021 can be changed, and still gives same integral result.
Why ?
Let k = 2.021, c = 2^(-1/k)
I = ∫ [(ln(|sin(x)|^k/2 + |cos(x)+c*sin(x)|^k) / (k*sin(x)*cos(x))] dx , x = 0 .. pi
Let y=pi/2-x, dy=-dx: sin → cos, cos → sin:
I = ∫ [(ln(|cos(y)|^k/2 + |sin(y)+c*cos(y)|^k) / (k*sin(y)*cos(y))] dy , y = -pi/2 .. pi/2
= ∫ f(y) dy , y = -pi/2 .. pi/2
= ∫ [f(y) + f(-y)] dy , y = 0 .. pi/2
|cos(y)|^k/2 + |sin(y)+c*cos(y)|^k sec(y)^2
I = ∫ ln(------------------------------------) × (------------) dy , y = 0 .. pi/2
|cos(y)|^k/2 + |sin(y)-c*cos(y)|^k k * tan(y)
1/2 + |t+c|^k 1 + t^2
= ∫ ln(---------------) × (---------) dy , where t = tan(y) , y = 0 .. pi/2
1/2 + |t-c|^k k * t
For HP-71B INTEGRAL command, it preferred smooth curve.
So, we split the integral into 2 parts, when |t-c| = 0, or x = atan(c)
10 INPUT "K? ";K @ C=2^(-1/K) @ P=.0000000001
20 DEF FNT(T)=LN((.5+ABS(T+C)^K)/(.5+ABS(T-C)^K))*(1/T+T)
30 T=TIME @ S=ATAN(C)
40 S1=INTEGRAL(0,S,P,FNT(TAN(IVAR)))/K
50 S2=INTEGRAL(S,PI/2,P,FNT(TAN(IVAR)))/K
60 DISP S1;"+";S2;"=";S1+S2,TIME-T
>RUN
k? 2.021
.936151026289 + 1.53125007399 = 2.46740110028 .44
>RUN
k? 1
1.0306547334 + 1.43674636688 = 2.46740110028 .55
>RUN
k? 2
.937458075515 + 1.52994302478 = 2.4674011003 .44
>RUN
k? 3
.891862933413 + 1.57553816686 = 2.46740110027 .66
>PI*PI/4
2.46740110027