Solving $\int_{0}^{1}\sin\lfloor\frac{1}{x}\rfloor dx$

151 Views Asked by At

This is just for fun

I know that without the floor function, the solution to this integral would be $\sin{1}-\operatorname{Ci}{1}$

My first idea to solve this is by creating an infinite summation. $$\int_{\frac{1}{x+1}}^{1}\sin\lfloor\frac{1}{t}\rfloor dt = \sum_{n=1}^{x}\left(\left(\frac{1}{n}-\frac{1}{n+1}\right)\sin n\right)$$ $$\int_{0}^{1}\sin\lfloor\frac{1}{t}\rfloor dt = \sum_{n=1}^{\infty}\left(\left(\frac{1}{n}-\frac{1}{n+1}\right)\sin n\right)$$ I was not sure how to solve this so I gave it to WolframAlpha and it outputted this: $\sum_{n=1}^{x}\left(\frac{1}{n}-\frac{1}{n+1}\right)\sin\left(n\right)=\frac{ie^{-i\left(x+2\right)}\left(\left(-1+e^{i}\right)\left(x+1\right)\Phi\left(e^{-i},1,x+2\right)+e^{i}\left(\left(-1+e^{i}\right)e^{2i\left(x+1\right)}\left(x+1\right)\Phi\left(e^{i},1,x+2\right)+e^{2i\left(x+1\right)}-e^{ix}\left(x+1\right)\ln\left(1-e^{i}\right)-e^{i\left(x+1\right)}\left(x+1\right)\left(\ln\left(1-e^{-i}\right)-\ln\left(1-e^{i}\right)\right)+e^{i\left(x+2\right)}\left(x+1\right)\ln\left(1-e^{-i}\right)-1\right)\right)}{2\left(x+1\right)}$

$\sum_{n=1}^{∞}\left(\frac{1}{n}-\frac{1}{n+1}\right)\sin\left(n\right)=\frac{1}{2}e^{-i}\left(-e^{i}+e^{i}\pi-i\ln\left(1-e^{i}\right)+ie^{2i}\ln\left(\left(-1+e^{i}\right)e^{-i}\right)\right)\approx0.52760$

How would I go about solving this integral (or the summation) by hand?

3

There are 3 best solutions below

2
On BEST ANSWER

Using Euler's formula $e^{ix} = \cos x + i \sin x$, we have $$ I = \int_0^1 \sin \biggl\lfloor \frac{1}{t} \biggr\rfloor dt = \sum_{n = 1}^{\infty} \sin n \biggl(\frac{1}{n} - \frac{1}{n + 1}\biggr) = \Im \sum_{n = 1}^{\infty} e^{in} \biggl(\frac{1}{n} - \frac{1}{n + 1}\biggr) $$ where $\Im$ denotes the imaginary part. Using the power series $$ \sum_{n = 1}^{\infty} \frac{z^n}{n} = - \log(1 - z) $$ which converges for all complex $\lvert z \rvert \le 1$ (except $z = 1$), we have \begin{align*} I &= \Im \sum_{n = 1}^{\infty} \frac{e^{in}}{n} - \Im \sum_{n = 2}^{\infty} \frac{e^{i(n - 1)}}{n} \\ &= \Im (-\log(1 - e^{i}) + e^{-i} \log(1 - e^{i}) - 1) \\ &= \Im ((e^{-i} - 1) \log (1 - e^i)) \tag{*} \label{eq:*} \\ &\approx 0.52760. \end{align*}


Diger's comment shows that the result may be written purely in terms of real functions as $$ \frac{(1 - \cos(1)) (\pi - 1)}{2} - \sin(1) \log(2 \sin(1/2)), $$ which follows from \eqref{eq:*} by routine calculation.

0
On

I haven't derived the full solution, but the approach I would use would start something like this:

Start with the partial sum $s_n = \sum_{m = 1}^n \left(\frac{1}{m} - \frac{1}{m+1}\right) \sin m$, and apply the identity $\sin z = \frac{e^{iz} - e^{-iz}}{2i}$.

Split the partial sum up as follows:

$$\begin{eqnarray} s_n & = & \sum_{m = 1}^n \left(\frac{1}{m} - \frac{1}{m+1}\right) \sin m \\ & = & \frac{1}{2i} \left[\sum_{m = 1}^n \frac{1}{m} \left(e^{im} - e^{-im}\right) - \sum_{m = 1}^n \frac{1}{m+1} \left(e^{i(m+1) - i} - e^{-i(m + 1) + i}\right) \right] \\ & = & \frac{1}{2i} \left[\sum_{m = 1}^n \frac{1}{m} \left(e^{im} - e^{-im}\right) - \sum_{m = 1}^n \frac{1}{m+1} \left(e^{-i} e^{i(m+1)} - e^i e^{-i(m + 1)}\right) \right] \end{eqnarray}$$

Then, I'd introduce the sequence of functions:

$$s_n(z) = \frac{1}{2i} \left[\sum_{m = 1}^n \frac{1}{m} \left(e^{imz} - e^{-imz}\right) - \sum_{m = 1}^n \frac{1}{m+1} \left(e^{-i} e^{i(m+1)z} - e^i e^{-i(m + 1)z}\right) \right]$$

Notice that $s_n(1) = s_n$ returns our partial sums, and you can also show that $s_n(0) = \sin 1 \sum_{m = 1}^n \frac{1}{m + 1}$.

At this point, I would take the derivative $s_n'(z)$, which will create a bunch of finite geometric series since you'll get a lot of cancellation like $\frac{d}{dz} \frac{1}{m} e^{imz} = \frac{im}{m} e^{imz} = i e^{imz}$. Using the formula for the sum of a finite geometric series, I would then collapse all the sums to get an expression for $s_n'(z)$ that doesn't have any sigma notation in it.

From there, I'd try to solve the resulting differential equation for $s_n(z)$, using the known value of $s_n(0)$ as an initial condition, and from there find $s_n(1)$.

That said, Wolfram Alpha's answer suggests that doing that last step is non-trivial, and taking the limit as $n \rightarrow \infty$ may also be somewhat difficult. Theoretically you could also take the limit for $s_n'(z)$ and work from there, but then the $s(0)$ term diverges so I'm not sure what I'd use for an initial condition.

0
On

A solution based on Gaussian hypergeomatric functions.

$$S_x(a)=\sum_{n=1}^{x}\frac{\sin(n)}{n+a}$$ If you simplify the expression given by Wolfram Alpha $$2 i e^{i (x+1)}\,S_x(a)=\Phi \left(e^{-i},1,a+x+1\right)+$$ $$e^{i x} \left(e^{2 i} \Phi \left(e^i,1,a+1\right)-\Phi \left(e^{-i},1,a+1\right)\right)-$$ $$e^{2i (x+1)} \Phi \left(e^i,1,a+x+1\right)$$ If $x\to \infty$ $$2 i (a+1)S_\infty(a)=$$ $$e^i \, _2F_1\left(1,a+1;a+2;e^i\right)-e^{-i} \, _2F_1\left(1,a+1;a+2;e^{-i}\right)$$ and the result of your summation (as you wrote it) $$S_\infty(0)-S_\infty(1)=\frac{1}{2} i \left(1-e^{-i}\right) \log \left(-\left(1-e^{-i}\right)^{e^i} \left(-1+e^i\right)\right)$$ the front coefficient being $$-\frac 12 \left(\sin(1)-i(1-\cos(1)\right)$$