Solve $\frac{1}{x}\cdot \cos x + \ln x \sin x = 0$

Although no exact analytical solutions for this mixed log-trigonometric equation are available, really good analytic approximations can still be derived.

Rewrite the equation

$$\frac{\cos x}{x} + \ln x\sin x = 0 $$

equivalently as,

$$ \tan x =-\frac{1}{x\ln x}$$

Observe that the rhs quickly becomes small as $x$ moves out. Since $\tan(x)$ assumes small values around $k\pi$, there would be infinite number of roots, all around $k\pi$.

To proceed, let $x=k\pi +y$ and approximate $\tan(x)$ around $k\pi$ as

$$\tan(x)=\tan(k\pi+y) \approx y \tag{1}$$

and, similarly, approximate $-1/(x\ln x)$ around $k\pi$ as

$$-\frac{1}{x\ln x} \approx -\frac{1}{k\pi\ln (k\pi)} +\frac{\ln(k\pi)+ 1}{[k\pi \ln (k\pi)]^2} y\tag{2} $$

As a result, $y$ can be solved from (1) and (2), $$y_k = -\frac{k\pi\ln (k\pi)} {[k\pi \ln (k\pi)]^2-\ln(k\pi) - 1}$$

And, hence, the solutions to the original equation $ x_k = k\pi + y_k$,

$$ x_k = k\pi \left[1-\frac{\ln (k\pi)} {(k\pi)^2\ln^2 (k\pi)-\ln(k\pi) - 1} \right]\tag{3}$$

with $k=1,2,3, ... \infty$.

For illustration, the first few roots are

$$x_1 \approx \pi - 0.33334 = 2.80825 \space (2.80984)$$

$$x_2 \approx 2\pi - 0.08848= 6.19471 \space (6.19490)$$

$$x_3 \approx 3\pi - 0.04764 =9.37714 \space (9.37717)$$

$$...$$

$$x_n=n\pi$$

where, for comparison, the exact roots are provided in the parentheses.

The algebraic solutions (3) are fairly accurate, even for the very first root. The successive roots quickly approaches $n\pi$.


WolframAlpha doesn't give any closed form. However, the function $$g(x)=\frac{1}{x} \cdot \cos x + \ln x \cdot \sin x$$ approaches $\ln x \cdot \sin x$. This is because $\frac{1}{x} \cdot \cos x$ approaches $0$. Therefore, the roots of $g(x)$ approach the roots of $\sin x$, $ x = n\pi, n \in \mathbb{N}$. Even the first root of $g(x)$ differs from $\pi$ by only $0.33$. The tenth root differs from $10\pi$ by about $0.01$.

After we take our guess of $n\pi$, if you want a more accurate approximation, you can use the Newton-Raphson method. The derivative of $g(x)$ is $$g'(x) = -\frac{\cos x}{x^2}+\cos x \cdot \ln x$$ Given the initial guess $x_0 = n\pi$, we can get a better guess $$x_{m+1} = x_m -\frac{\frac{1}{x_m} \cdot \cos x_m + \ln x_m \cdot \sin x_m}{-\frac{\cos x_m}{x_m^2}+\cos x_m \cdot \ln x_m} = x_m-\frac{\frac{1}{x_m}+\ln x_m \cdot \tan x_m}{-\frac{1}{x_m^2}+\ln x_m}$$

Tags:

Calculus