Can $\ln x - \sin 2x= 0$ be solved without using computer assisted software?

290 Views Asked by At

The problem is as follows:

$\textrm{Solve and round $x$ to two decimals}$

$$\ln x - \sin 2x= 0$$

There is no indication whether if is allowed to use a calculator or software assistance like Maple. Therefore my first choice was to use any algebraic manipulation if this can be solved that way.

However, the only thing I could come up was to use this:

$$\ln x - \sin 2x= 0$$

$$\ln x - \ln e^{sin 2x}=0$$

$$\ln\left (\frac{x}{e^{\sin 2x}} \right )=0$$

$$\textrm{antiln}\left (\ln\left (\frac{x}{e^{\sin 2x}} \right ) \right)= \textrm{antiln} (0)$$

$$\frac{x}{e^{\sin 2x}}= 1$$

$$x-e^{\sin 2x}=0$$

But it got stuck here, moreover, If I try to use the inverse function of the sine equation does not help much.

I'm also confused about this step with logarithm manipulation:

If I use the $\textrm{antiln}$ just straight at the beginning of the equation;

$$\ln x - \sin 2x= 0$$

$$\textrm{antiln}\left( \ln x- \sin 2x \right ) = \textrm{antiln} (0)$$

Would become into:

$$x - e^{\sin 2x}= e^{0}=1$$

But this latter equation does not seem the same of what I obtained before. Did I misunderstood something?. I need assistance with these doubts.

Edit:

Now moving onto Maple (which is the part which has not yet been answered):

I tried using this command:

solve(ln(x)-sin(2*x)=0,x)

and I got:

$$1/2*\textrm{RootOf}\left(_Z-2\exp(sin(_Z))\right )$$

I don't know what does it mean?, and why it does not produce a numeric result?. Can somebody help me with this matter?.

I'd like also some help how to make Maple to plot a graph of the function showing the answer. How do I achieve this?.

3

There are 3 best solutions below

6
On BEST ANSWER

I strongly doubt you will be able to solve this equation analytically for $x$; it is a transcendental equation where the variable appears in both arguments of transcendental functions. This will require some numerical methods to solve such as iterative root-finding methods.

You can employ Newton's which is given by

$$ x_{n+1} = x_n - \frac{f(x_n)}{f'(x_n)}, $$

where $$ f(x) = \ln(x) -\sin (2x), \quad f'(x) = \frac{1}{x_n} - 2\cos(2x_n). $$

Using an initial value $x_0 = 1/2$, WA gives the following $x = 1.399942...$ reaching machine precision after $7$ iterations. The associated diagram is given by

enter image description here

In response to OP's comments:

Determining a suitable initial guess $x_0$ can present some issues. I would advise you consult the wiki article for more details. One way in determining a good initial guess is to plot the functions. This gives a rough value for $x_0$ value by inspection.

The RoofOf output is what Maple produces for solve-for equations. It is a placeholder for all the roots of some variable. You can then apply various functions to this such as evalf etc. to get some numerical result.

The video lecture by MapleSoft shows how to utilise the Student[Calculus1] package in Maple. It discusses

  • Root finding methods.
  • Display the corresponding graph with tangent lines similar to the WA output.
3
On

I assume the problem is to solve $\, \ln x - \sin 2x= 0 \,$ using hand calculation to two decimal place accuracy. A brief sketch shows that $x < \pi/2$ but not by much. More precisely, let $\, x = (1 - t) \pi/2 \,$ where $\, t \,$ is is the fraction by which $\, x \,$ is less than $\, \pi/2, \,$ and we guess that $\, t \,$ is much less than $\,1.\,$

Using this we get the first term becomes $\, \ln x = \ln( (1 - t) \pi/2) = \ln (1-t) +\ln (\pi / 2) .\,$ The second term becomes $\, \sin 2x = \sin((1 - t) \pi) = \sin(\pi - \pi t) = \sin(\pi t). \,$ Using these the equation becomes $\, \ln (1-t) +\ln (\pi / 2) - \sin(\pi t) = 0. \,$ Since $\, t \,$ is small, simple linear approximation gives us $\, \ln(1 - t) \approx -t \,$ and $\, \sin(\pi t) \approx \pi t. \,$ Using these approximations we get $\, - t + \ln(\pi/2) - \pi t = 0. \,$ By algebraic simplification we get $\, \ln (\pi /2) \approx (\pi + 1) t. \,$ Solving for $\, t \,$ gives $\, t \approx (\ln (\pi /2))/(\pi + 1). \,$ Calculation now gives $\, t \approx 0.11 \,$ and $\, x \approx 1.40. \,$

2
On

The solution is clearly around $\frac \pi 2$.

So, for an approximation of the root, use the Taylor expansion built around this point and get $$\log (x)-\sin (2 x)=\log \left(\frac{\pi }{2}\right)+\left(2+\frac{2}{\pi }\right) \left(x-\frac{\pi}{2}\right)-\frac{2 \left(x-\frac{\pi }{2}\right)^2}{\pi ^2}+O\left(\left(x-\frac{\pi }{2}\right)^3\right)$$ Ignoring the higher order terms, solve the quadratic in $\left(x-\frac{\pi}{2}\right)$ . This would give $$x=\frac{1}{2} \left(2 \pi +\pi ^2-\sqrt{\pi ^2+2 \pi ^3+\pi ^4+2 \pi ^2 \log \left(\frac{\pi }{2}\right)}\right)\approx 1.40172 $$ while the exact solution is $\approx 1.39943$ and this is not too bad.

Sooner or later, you will learn that, better than Taylor series, functions can be locally approximated using Padé approximants. The simplest $[1,1]$ would write $$f(x)=\frac{f(a)+\frac{ \left(2 f'(a)^2-f(a) f''(a)\right)}{2 f'(a)}(x-a)}{1-\frac{ f''(a)}{2 f'(a)}(x-a)}$$ Then, just solving, for your case, this would give $$x=\frac \pi 2 \left(1+\frac{(1+\pi ) \log \left(\frac{4}{\pi ^2}\right)}{2 (1+\pi )^2+\log \left(\frac{\pi }{2}\right)} \right)\approx 1.40175$$

If you use Newton methods, the iterates would be $$\left( \begin{array}{cc} n & x_n \\ 0 & 1.570796327 \\ 1 & 1.399522975 \\ 2 & 1.399428868 \\ 3 & 1.399428866 \end{array} \right)$$