Appearance of strange lines appearing when plotting an integral

68 Views Asked by At

While playing around on Desmos, I came across the function $f\left(x\right)=\frac{\sin\left(\frac{x+n}{x-n}\right)}{x}$ where $n>0$. I wanted to find the integral between the first and last zeros where $x$ is positive and came up with the bounds $\frac{\pi x-x}{\pi+1}$ and $\frac{\pi x+x}{\pi-1}$. I then decided to plot the integral against $n$ using the equation: $$g\left(x\right)=\int_{\frac{\pi x-x}{\pi+1}}^{\frac{\pi x+x}{\pi-1}}\frac{\sin\left(\frac{t+x}{t-x}\right)}{t}dt$$ Desmos was unable to plot this so I plotted $\left(\left[0.1,0.2...10\right],g\left(\left[0.1,0.2...10\right]\right)\right)$. In Desmos, $[...]$ indicates a set of numbers. I noticed the occurrence of what almost appeared to be lines around $y=0.027$, $y=0.023$, $y=0.02$, and a scattering of points between $y=0.007$ and $y=-0.003$. I then plotted $\left(\left[0.1,0.2...100\right],g\left(\left[0.1,0.2...100\right]\right)\right)$ which seemed to confirm my results. Here is what it looked like: enter image description here Can anybody explain this? Here is the link to the Desmos: https://www.desmos.com/calculator/thjmpjqvcx

1

There are 1 best solutions below

1
On

The antiderivative is quite simple $$\frac {t+x}{t-x}=y \implies t=x \frac {y+1}{y-1}\implies dt=-\frac{2 x}{(y-1)^2}\,dy$$ $$I=\int \frac{\sin\left(\frac{t+x}{t-x}\right)}{t}\,dt=-2\int \frac{\sin(y)}{y^2-1}\,dy $$ Partial fraction decomposition and two simple changes of variable lead to $$I=-\sin (1) (\text{Ci}(1-y)- \text{Ci}(1+y))+\cos (1) (\text{Si}(1-y)+\text{Si}(1+y))$$

Back to $x$ and using the bounds $$g(x)=(\text{Ci}(-1-\pi )+\text{Ci}(1-\pi )-\text{Ci}(-1+\pi )-\text{Ci}(1+\pi)) \sin (1)$$ $$g(x)=2 i \pi \sin (1)$$

which is a constant and moreover a complex number.

I suppose that this explains that (hoping for no mistake on my side).

Edit

Using the fundamental theorem of calculus, we can easily show that $g'(x)=0$ so $g(x)=\text{Cte}$. The details are left to the reader.