Using numerical methods to solve $x^2 \sin (2 \pi x)=33 \sin \left(\frac{66 \pi }{x}\right)$

calculustrigonometry

On a recent question I asked, Claude Leibovici had a nice answer. However, I do not understand one part when he says "[solving the equation] would require numerical methods". What are these "numerical methods" and how would I use it to solve my problem? For reference, I put my equation below: $$x^2 \sin (2 \pi x)=33 \sin \left(\frac{66 \pi }{x}\right)$$ I am primarily focused on intergral solutions.

Best Answer

$\def\e{\varepsilon} \def\d{\delta}$Here is another approach for finding approximate solutions. Define $$f(x) = x^2\sin 2\pi x - 33\sin \frac{66\pi}{x}.$$ We wish to find the zeros of $f(x)$.

For small $x$, $f(x)\approx -33\sin 66\pi/x$, the zeros for which are \begin{align*} x_n = \frac{66}{n} \tag{1} \end{align*} for $n$ an integer. This integer must be large for the technique to be self-consistent, $n\gg 66$. It can be shown that for large $n$ the error on this approximation is of order $1/n^5$. In fact, if $X_n$ is the true zero nearest $x_n=66/n$, one can show that $X_n-x_n\approx (-1)^{n+1}1149984/n^5$.

For large $x$ we must search for zeros near the zeros of $\sin 2\pi x$, since in the limit $\sin 66\pi/x\approx 66\pi/x\rightarrow 0$. For integral $n$, we expand $f(n/2+\e)$ for small $\e$ to linear order, set the result equal to zero, and solve for $\e$. We find \begin{align*} \e \approx \e_n \equiv \frac{66}{\pi} \frac{ n^2 \sin \frac{132\pi}{n}}{(-1)^n n^4+17424\cos\frac{132\pi}{n}}.\tag{2} \end{align*} For $n$ very large we find \begin{align*} \e \approx \e_n' \equiv (-1)^n\frac{8712}{n^3}.\tag{3} \end{align*} Thus, the zeros of $f(x)$ for large $x$ are given by $$x_n \approx \frac{n}{2}+\e_n \approx \frac{n}{2}+\e_n'.$$ We expect the approximation $x_n = n/2+\e_n'$ to work well if $n\gg 132\pi$. If $X_n$ is the true zero nearest $x_n=n/2+\e_n'$, one can show that $X_n-x_n\approx (-1)^{n+1}25299648/n^5$.

Below we plot $f(x)$ and some of the predicted zeros using the approximations above.

enter image description here

enter image description here

enter image description here

Addendum

It has become clear to me from the comments that this question is about finding exact integer solutions, not all real solutions. If $x$ is an integer we immediately have $\sin 2\pi x=0$ and so the problem reduces to solving $\sin 66\pi/x=0$ where $x$ is an integer. Thus, $66\pi/x=n\pi$ for some integer $n$ and so $x=66/n$. The solutions will be the divisors of $66$, so $x=\pm1,\pm2,\pm3,\pm6,\pm11,\pm22,\pm33,\pm66$. Note that there are in fact an infinite number of real solutions but only a finite number of integer solutions to this equation.

More generally if we wish to solve $$x^2\sin 2\pi x=a\sin\frac{N\pi}{x},$$ where $N$ is an integer, for integer $x$ we again must only satisfy $\sin N\pi/x = 0$ and so $x= N/n$ where $n$ is an integer, i.e., $x$ is a divisor of $N$. The problem is fundamentally about factoring $N$. This can be done by hand or by using software. Here is a starting point to learn about integer factorization.

Related Question