7

I doubt a closed form exists, so I am trying to approximate the integral: $$I(a)=\int_0^1 a^x\ \frac{x(1-x)}{\sin(\pi x)} dx$$ I am therefore looking for a function $F(a)$ that provides $$F(a)\simeq I(a)$$ But I want this to be true for every value of $a>0$, and so something like a truncated Taylor series of $I$ would be useless, since for large $a$ it would require adding more and more terms.

Up to this day I found only two promising approximations of $I(a)$:

$\Large{1)}$

Using the inequality (which is a quite good approximation for small values of $x,y$) $$\frac{x-y}{\log x-\log y}<\left(\frac{x^{\frac13}+y^{\frac23}}{2} \right)^3 $$ I got

$$F_1(a)=\frac{1+a}{8\pi}+\frac{a^{\frac13}+a^{\frac23}}{6\sqrt3}$$

with a percentage error of roughly $1\%$ for small $a$, growing larger as $a$ grows.

$\Large{2)}$

Using the famous ancient approximation for $\sin x$: $$\sin x \simeq \frac{16(\pi-x)x}{5\pi^2-4(\pi-x)x}$$ I got

$$F_2(a)=\frac{a-1}{2\log^3a}-\frac{a+1}{4\log^2a}+\frac{5(a-1)}{16\log a}$$

and this one is tremendously precise, even for very large values of $a$.

However, I am still on the lookout for other, even better, approximations for $I$. These two are the only ones I was able to get. Regarding the first one, I tried even sharper bounds known for the logarithmic mean, but then I wasn't able to integrate. The generalized mean of exponent $\frac13$ was the best I could get. I like the result because it features only polynomials, no exponentials or logarithms and trig functions. But, since the two means start to differ very fast past around $10$, the result is good only for small values of $a$.

If someone has an idea to get another approximation I'd be happy to hear it.

Zima
  • 2,925
  • 6
    I bet @ClaudeLeibovici will come and help. – bob Aug 20 '23 at 11:18
  • 1
    Rewrite the integral as $a^{1/2}\int_{-1/2}^{1/2}, e^{u\log a}\frac{1/4 - u^2}{\cos\pi u}, du$. Expand the ratio term as a power series about $u = 0$ and integrate. – A rural reader Aug 20 '23 at 15:10
  • 1
    @bob. You won ! – Claude Leibovici Aug 21 '23 at 13:59
  • @Zima Your second one is a quadratic function approximation $\frac{x(1 - x)}{\sin (\pi x)} \approx \frac14x^2 - \frac14x + \frac{5}{16}$. I think you can find a better quadratic function approximation with smaller relative error for the integral. – River Li Aug 21 '23 at 15:32
  • Notice that the major improvement from $n=3$ to $n=5$ results from a reduction of the norm by a factor of only $20$. – Claude Leibovici Aug 22 '23 at 06:51

3 Answers3

4

The OP asked a quick question about this question where @user170231 answered expanding a special case of @Mariusz Iwaniuk’s hypergeometric function. If we expand the general case, then the polygamma function appears:

$$\,_4\text F_3\left(2,b,b,b;b+1,b+1,b+1,b+1;1\right)=\sum_{n=0}^\infty\frac{(2)_n(b)_n^3}{(b+1)_n^3n!}=b^3\sum_{n=0}^\infty\frac{n+1}{(n+b)^3}=\frac{b^3}2\left(2\psi^{(1)}(b)+(b-1)\psi^{(2)}(b)\right)$$

Therefore:

$$\boxed{\int_0^1 a^xx(1-x)\csc(\pi x)dx=\frac{i(a-1)}{2\pi^2}\psi^{(1)}\left(\frac{i\ln(a)}{2\pi}+\frac12\right)-\frac{(a+1)}{4\pi^3}\psi^{(2)}\left(\frac{i\ln(a)}{2\pi}+\frac12\right)}$$

shown here:

enter image description here

Тyma Gaidash
  • 12,081
2

$$I=\int_0^1 a^x\ \frac{x(1-x)}{\sin(\pi x)} \,dx=\frac 1 {\pi^3}\int_0^\pi a^{\frac{t}{\pi }}\frac {(\pi -t) t }{\sin(t)}\,dt$$

Using the approximation

$$\sin(t) \sim \sum_{i=1}^n \alpha_i \big(\pi-t)\,t\big)^i$$ Using partial fraction decomposition, $$I=\frac 1 {\alpha_n\pi^3}\sum_{i=1}^{n-1}A_i\int_0^\pi \frac {a^{\frac{t}{\pi }}}{(\pi-t)\,t + r_i}$$ where $r_i$ are the roots of the polynomial in $\left((\pi-t)\,t\right)$.

Not typed here, but $$J_i=\int \frac {a^{\frac{t}{\pi }}}{(\pi-t)\,t + r_i}$$ is rather simple (just exponential integral functions). So, we have the analytical solution.

Now computing for $\color{red}{n=3}$

$$\left( \begin{array}{cccc} a & \text{approximation} & \text{solution} & \log_{10} (\Delta) \\ 2 & 0.3920162 & 0.3920226 & -5.192 \\ 3 & 0.4956114 & 0.4956200 & -5.069 \\ 4 & 0.5902104 & 0.5902210 & -4.974 \\ 5 & 0.6789496 & 0.6789623 & -4.897 \\ 6 & 0.7634522 & 0.7634670 & -4.831 \\ 7 & 0.8446922 & 0.8447090 & -4.774 \\ 8 & 0.9233101 & 0.9233290 & -4.724 \\ 9 & 0.9997554 & 0.9997763 & -4.679 \\ 10 & 1.0743580 & 1.0743810 & -4.639 \\ 11 & 1.1473694 & 1.1473944 & -4.601 \\ 12 & 1.2189865 & 1.2190135 & -4.567 \\ 13 & 1.2893671 & 1.2893962 & -4.536 \\ 14 & 1.3586403 & 1.3586715 & -4.506 \\ 15 & 1.4269132 & 1.4269464 & -4.479 \\ 16 & 1.4942760 & 1.4943112 & -4.453 \\ 17 & 1.5608054 & 1.5608426 & -4.429 \\ 18 & 1.6265674 & 1.6266067 & -4.406 \\ 19 & 1.6916195 & 1.6916608 & -4.384 \\ 20 & 1.7560119 & 1.7560553 & -4.363 \\ \end{array} \right)$$

Now computing for $\color{red}{n=5}$

$$\left( \begin{array}{cccc} a & \text{approximation} & \text{solution} & \log_{10} (\Delta) \\ 2 & 0.39202261460 & 0.39202261484 & -9.619 \\ 3 & 0.49561996139 & 0.49561996171 & -9.495 \\ 4 & 0.59022101656 & 0.59022101696 & -9.399 \\ 5 & 0.67896224538 & 0.67896224585 & -9.321 \\ 6 & 0.76346696591 & 0.76346696647 & -9.254 \\ 7 & 0.84470898943 & 0.84470899006 & -9.197 \\ 8 & 0.92332901858 & 0.92332901930 & -9.146 \\ 9 & 0.99977631759 & 0.99977631838 & -9.101 \\ 10 & 1.07438098536 & 1.07438098623 & -9.060 \\ 11 & 1.14739440629 & 1.14739440724 & -9.022 \\ 12 & 1.21901352319 & 1.21901352422 & -8.988 \\ 13 & 1.28939621688 & 1.28939621798 & -8.956 \\ 14 & 1.35867148680 & 1.35867148799 & -8.926 \\ 15 & 1.42694643731 & 1.42694643857 & -8.898 \\ 16 & 1.49431121861 & 1.49431121995 & -8.872 \\ 17 & 1.56084261213 & 1.56084261355 & -8.848 \\ 18 & 1.62660669023 & 1.62660669173 & -8.824 \\ 19 & 1.69166082762 & 1.69166082920 & -8.802 \\ 20 & 1.75605524845 & 1.75605525010 & -8.781 \\ \end{array} \right)$$

  • That's very precise! I wonder if you wrote down the resulting formula for $n=3$, since I'm very curious to know how it looks like. As always, thank you for your work. – Zima Aug 22 '23 at 08:22
  • @Zima. In the edit of the linked question of mine, you will find the results. I did not think interesting to reproduce them here. I made the same for $n=5$. What is pure beauty is the so simple result given by Tyma Gaidash – Claude Leibovici Aug 22 '23 at 09:18
1

Only closed-form with Matematica:

$$\int_0^1 \frac{a^x (x (1-x))}{\sin (\pi x)} \, dx=\color{blue}{-\frac{4 a \pi \, _4F_3\left(2,\frac{3}{2}+\frac{i \log (a)}{2 \pi },\frac{3}{2}+\frac{i \log (a)}{2 \pi },\frac{3}{2}+\frac{i \log (a)}{2 \pi };\frac{5}{2}+\frac{i \log (a)}{2 \pi },\frac{5}{2}+\frac{i \log (a)}{2 \pi },\frac{5}{2}+\frac{i \log (a)}{2 \pi };1\right)}{(-3 i \pi +\log (a))^3}+\frac{-4 i \pi \psi ^{(1)}\left(\frac{\pi +i \log (a)}{2 \pi }\right)+(-2-2 a-i a \pi +a \log (a)) \psi ^{(2)}\left(\frac{\pi +i \log (a)}{2 \pi }\right)}{8 \pi ^3}}$$

MMA code:

HoldForm[ Integrate[ a^x*(x*(1 - x))/Sin[Pi x], {x, 0, 1}] == -(( 4 a \[Pi] HypergeometricPFQ[{2, 3/2 + (I Log[a])/(2 \[Pi]), 3/2 + (I Log[a])/(2 \[Pi]), 3/2 + (I Log[a])/(2 \[Pi])}, {5/2 + (I Log[a])/(2 \[Pi]), 5/2 + (I Log[a])/(2 \[Pi]), 5/2 + (I Log[a])/(2 \[Pi])}, 1])/(-3 I \[Pi] + Log[a])^3) + (-4 I \[Pi] PolyGamma[ 1, (\[Pi] + I Log[a])/( 2 \[Pi])] + (-2 - 2 a - I a \[Pi] + a Log[a]) PolyGamma[ 2, (\[Pi] + I Log[a])/(2 \[Pi])])/(8 \[Pi]^3)]

Using: $$\frac{1}{\sin (\pi x)}=\sum _{k=0}^{\infty } 2 i \exp (-(2 k+1) i \pi x)$$ Then we have:

$$\int_0^1 \frac{a^x (x (1-x))}{\sin (\pi x)} \, dx=\sum _{k=0}^{\infty } \int_0^1 a^x (x (1-x)) 2 i e^{i (-1-2 k) \pi x} \, dx=\sum _{k=0}^{\infty } -\frac{i e^{-2 i k \pi } \left(-2 a (-2 i+\pi +2 k \pi +i \log (a))+2 e^{2 i k \pi } (2 i+\pi +2 k \pi +i \log (a))\right)}{(\pi +2 k \pi +i \log (a))^3}=-\frac{4 a \pi \, _4F_3\left(2,\frac{3}{2}+\frac{i \log (a)}{2 \pi },\frac{3}{2}+\frac{i \log (a)}{2 \pi },\frac{3}{2}+\frac{i \log (a)}{2 \pi };\frac{5}{2}+\frac{i \log (a)}{2 \pi },\frac{5}{2}+\frac{i \log (a)}{2 \pi },\frac{5}{2}+\frac{i \log (a)}{2 \pi };1\right)}{(-3 i \pi +\log (a))^3}+\frac{-4 i \pi \psi ^{(1)}\left(\frac{\pi +i \log (a)}{2 \pi }\right)+(-2-2 a-i a \pi +a \log (a)) \psi ^{(2)}\left(\frac{\pi +i \log (a)}{2 \pi }\right)}{8 \pi ^3}$$

  • @Zima. My expression is correct.If I put a=1 give me: $$\frac{i \left(\pi ^2-7 \zeta (3)\right)}{4 \pi ^2}+\frac{(-4-i \pi ) \psi ^{(2)}\left(\frac{1}{2}\right)-2 i \pi ^3}{8 \pi ^3}=\frac{7 \zeta (3)}{\pi ^3}$$ – Mariusz Iwaniuk Aug 21 '23 at 12:54
  • My mistake, didn't see the last part – Zima Aug 21 '23 at 14:35