Does the following integral converge? $ \int\limits_0^\pi\frac{\sin x}{\sqrt{x}}\ dx $ Does the following integral converge?
$$
\int\limits_0^\pi\frac{\sin x}{\sqrt{x}}\ dx
$$
I haven't solved such problems for a while. So, I would really appreciate it if someone gave me a hint.
Or maybe my solution is correct?
$$
\sin x\sim x\Rightarrow\frac{\sin x}{\sqrt{x}}\sim\sqrt{x}
$$
$$
\int\limits_0^\pi\sqrt{x}\ dx\ \ \text{is convergent}
$$
Therefore, the initial integral is convergent as well.
 A: Just for the fun of it !
The problem of the convergence being solved, there are analytical solution for this kind of integrals (and antiderivatives; have a look here.
Since @Von Neumann wrote an answer where complex numbers do appear, I wondered what would give the $1,400$ years old approximation
$$\sin(x) \simeq \frac{16 (\pi -x) x}{5 \pi ^2-4 (\pi -x) x}\qquad (0\leq x\leq\pi)$$ proposed by Mahabhaskariya of Bhaskara I, a seventh-century Indian mathematician.
$$\int\frac{\sin (x)}{\sqrt{x}}\, dx \sim \int \frac{16 (\pi -x) \sqrt{x}}{5 \pi ^2-4 (\pi -x) x} \,dx=$$ and then the integral is$$-8 \sqrt{\pi }+2 i \sqrt{(-2-4 i) \pi } \cot
   ^{-1}\left(\sqrt{-\frac{1}{2}-i}\right)-(4+3 i) \sqrt{\left(-\frac{2}{5}+\frac{4
   i}{5}\right) \pi } \cot ^{-1}\left(\sqrt{-\frac{1}{2}-i}\right)-2 i \sqrt{(-2+4 i)
   \pi } \cot ^{-1}\left(\sqrt{-\frac{1}{2}+i}\right)-(4-3 i)
   \sqrt{\left(-\frac{2}{5}-\frac{4 i}{5}\right) \pi } \cot
   ^{-1}\left(\sqrt{-\frac{1}{2}+i}\right)$$ which is $\approx 1.78995$ while the "exact" value is $1.78966$.
Edit
Another amazing approximation is
$$\sin(x)=\pi \sum_{n=1}^\infty a_n \Big[\left(1-\frac x \pi\right)\frac x \pi\Big]^n$$ where coefficients $a_n$ make the sequence
$$\left\{1,1,2-\frac{\pi ^2}{6},5-\frac{\pi ^2}{2},14-\frac{3 \pi ^2}{2}+\frac{\pi
   ^4}{120},42-\frac{14 \pi ^2}{3}+\frac{\pi ^4}{24},132-15 \pi ^2+\frac{\pi
   ^4}{6}-\frac{\pi ^6}{5040}\right\} $$
This makes the integration very easy
$$\int\limits_0^\pi\frac{\sin (x)}{\sqrt{x}}\, dx=\pi ^2\sum_{n=1}^\infty \frac{\Gamma (2 n+1)}{4^n \,\Gamma \left(2 n+\frac{3}{2}\right)}\,a_n$$
Using the $a_n$'s given in the table, the definite integral is then
$$\frac{4 \pi ^{3/2} \left(46190338425-595324620 \pi ^2+1781520 \pi ^4-704 \pi
   ^6\right)}{503889568875}$$ which is $1.789662938921$ while the exact value is                               $1.789662938968$
A: Of course it is a convergent integral, the integrand function behaves like $\sqrt{x}$ for $x\to 0^+$ and it is continuous on $[0,\pi]$.
In order to produce a simple numerical approximation I am going to exploit the fact that the Laplace transform is a self-adjoint operator with respect to the standard inner product on $\mathbb{R}^+$:
$$ \int_{0}^{\pi}\frac{\sin(x)}{\sqrt{x}}\,dx = \int_{0}^{+\infty}\sin(x)\mathbb{1}_{(0,\pi)}(x)\frac{dx}{\sqrt{x}}=\int_{0}^{+\infty}\frac{1+e^{-\pi s}}{\sqrt{\pi s}(1+s^2)}\,ds $$
equals
$$ \sqrt{\frac{\pi}{2}}+\int_{0}^{+\infty}\frac{e^{-\pi s}\,ds}{\sqrt{\pi s}(1+s^2)}=\sqrt{\frac{\pi}{2}}+\frac{2}{\sqrt{\pi}}\int_{0}^{+\infty}\frac{du}{e^{\pi u^2}(1+u^4)}. $$
Using a Padé approximant for $\exp\left(-\frac{\pi}{2}u^2\right)$ we have
$$ \int_{0}^{\pi}\frac{\sin(x)}{\sqrt{x}}\,dx \approx \sqrt{\frac{\pi}{2}}+\frac{2}{\sqrt{\pi}}\int_{0}^{+\infty}\left(\frac{1-\pi u^2/4}{1+\pi u^2/4}\right)^2\frac{du}{1+u^4} $$
where the RHS is a rational expression in $\sqrt{\pi}$ and $\sqrt{2}$ whose value is extremely close to $1.813$.
The relative error here is $\approx \frac{13}{1000}$ and it can be further reduced by considering Padé approximants with higher order. For instance the approximated identity
$$\int_{0}^{\pi}\frac{\sin(x)}{\sqrt{x}}\,dx \approx \sqrt{\frac{\pi}{2}}+\int_{0}^{+\infty}\left(\frac{1-\pi s/4+\pi^2 s^2/48}{1+\pi s/4+\pi^2 s^2/48}\right)^2\frac{ds}{\sqrt{\pi s}(1+s^2)}$$
has a relative error which is only $\approx \frac{5}{1000}$.
It is worth mentioning that the very simple parabolic approximation $\sin(x)\approx \frac{4}{\pi^2}x(\pi-x)$ already yields
$$ \int_{0}^{\pi}\frac{\sin(x)}{x}\approx \frac{16}{15}\sqrt{\pi}$$
with a relative error $\approx \frac{11}{195}$. If we pick a fourth-degree polynomial which agrees with $\sin(x)$ about $f(0),f'(0),f(\pi/2),f(\pi),f'(\pi)$ we get the very beautiful
$$\int_{0}^{\pi}\frac{\sin x}{\sqrt{x}}\,dx \approx {\frac{4\sqrt{\pi}}{315}(5\pi+64)}$$
whose relative error is just $\approx \frac{1}{411}$. Switching to sixth-degree polynomials in order to cover $f''(0)=f''(\pi)=0$ too we get
$$\boxed{\int_{0}^{\pi}\frac{\sin x}{\sqrt{x}}\,dx \approx \color{red}{\frac{4\sqrt{\pi}}{9009}(235\pi+1536)}}$$
which beats Bhaskara's approximation, since its relative error is only $\approx \frac{1}{14507}$. Truth to be told, Bhaskara's approximation is not optimal here, since it is focused on reducing the uniform error on $[0,\pi]$, while in our case it is best to have a very tight control in a right neighbourhood of the origin (where $1/\sqrt{x}$ is unbounded) and just a loose one for $x\to \pi^-$. For instance the termwise integration of the Maclaurin series of $\sin(x)$, divided by $\sqrt{x}$, yields
$$ \int_{0}^{\pi}\frac{\sin x}{x}\,dx = \sum_{n\geq 0}\frac{(-1)^n \pi^{2n+\frac{3}{2}}}{(2n+3/2)(2n+1)!}\approx \sum_{n=0}^{7}\frac{(-1)^n \pi^{2n+\frac{3}{2}}}{(2n+3/2)(2n+1)!} $$
which is very accurate due to the fact that $\sin(x)$ is an entire function, so the last series is very fast-convergent.
A: Here is a more pedestrian solution to the question of convergence only. $\Big|\frac{\sin t}{\sqrt{t}}\Big|\leq t^{-1/2}$. The upper bound is known to converge. Recall that $\int^1_0x^{-p}\,dx$ converges for $p<1$ as you can convince yourself by looking at $\lim_{\varepsilon\rightarrow0}\int^1_\varepsilon x^{-p}\,dx=\lim_{\varepsilon\rightarrow0}\frac{1}{1-p}x^{1-p}|^1_\varepsilon=\frac{1}{1-p}$ when $p<1$.
Estimating the value, as it's been shown by others requires some clever tricks.
A: It's good to me.
You just studied the extrema of the integral: As $x\to 0$ your function goes like $\sqrt{x}$.
As $x\to \pi$ the function tends to zero.
Hence the region described by the function with those bounds is closed and bounded, the integral does converge.
For more details, we can develop a graphic asymptotic analysis:
As $x\to 0$ the function $f(x) = \frac{\sin(x)}{\sqrt{x}}$ goes like:

Where as the whole function is continuous in $[0, π]$:

For the sake of curiosity we have:
$$\int_0^{\pi} \frac{\sin(x)}{\sqrt{x}}\ \text{d}x = \frac{1}{2} \sqrt[4]{-1} \sqrt{\pi } \left(\text{erf}\left(\sqrt[4]{-1} \sqrt{\pi }\right)-\text{erfi}\left((1+i) \sqrt{\frac{\pi }{2}}\right)\right)$$
The real part of the solution is $\approx 1.78966(...)$.
Notice that if we approximate (in a very bad way) your function to $\sqrt{x}$ for example from $0$ to $\pi /2$ we would get:
$$\int_0^{\pi/2} \sqrt{x}\ \text{d}x \approx 1.31247(...)$$
Which is, as I said, bad but it gives you an idea.
I mean, have fun with methods!!
A: No problem, the integrand is bounded (justified by $\dfrac{\sin x}{\sqrt x}=\dfrac{\sin x}x{\sqrt x}$).
