Finding $a$ such that $\tanh(x)-a\sin^2(x)=0$ has a double root

124 Views Asked by At

Given $f(x) = \tanh(x)-a\sin^2(x)$, what is the value of $a$ for which $f(x) = 0$ has a double root, and what is the value of that double root?

My Work :
Using MAPLE , I plotted a few graphs and estimated $a \approx 0.91$ , which gives $x \approx 1.46$ , however I need to be accurate to at least $8$ significant figures (hence MAPLE).

I am stuck... help?

4

There are 4 best solutions below

0
On

For a multiple root you want $f(x) = 0$ and $f'(x) = 0$. So in Maple you can try e.g.

f:= tanh(x) - a*sin(x)^2;
fsolve({f, diff(f,x)}, {x=1..2, a=0..1});

$$ \{a = 0.9087520662, x = 1.463860639\}$$

BTW there are infinitely many values of $a$ that produce double roots in different places. You can try looking at different intervals to find other solutions.

0
On

Over-View :

I have given the Visualization , then I derived the necessary Equations in 2 ways , then I have got the Numerical Solutions to those Equations , targeting those 2 ways.

Visualization :

Consider the graphs for $\tanh(x)$ & $a \sin^2(x)$ where $a = 1.2,1.1,1.0,0.9,0.8$ :

SIN^2 + tanh

We can see that the Blue Curve ($a = 1.2$) & Green Curve ($a = 1.1$) will have 2 Intersection Points in close Proximity within a Peak.
When we "shrink" (make $a$ smaller) the $\sin^2(x)$ Curve , the 2 Intersection Points will come closer , Eg the Orange Curve ($a = 1.0$) at the Second Peak & the Red Curve ($a = 0.9$) at the first Peak.
When we "shrink" more (make $a$ more smaller) , there will be no Intersection Points , Eg the Purple Curve ($a = 0.8$) will never have Intersection Points with Positive $x$ range.

That Visualization then gives us the Intuition that when the two roots are close & Coinciding , we must have the tangents of the 2 Curves Coinciding.

Equations :

The tangents will have Slopes $sech^2(x)$ & $a 2 \sin(x) \cos(x) = a \sin(2x)$

Thus , we have this Set of two Equations :

$$\tanh(x) = \frac{\sinh(x)}{\cosh(x)} = a \sin^2(x) \tag{1}$$
$$sech^2(x) = \frac{1}{\cosh^2(x)} = a \sin(2x) \tag{2}$$

Eliminating $a$ ( Dividing the Equations ) we get :
$$\frac{\sinh(x)\cosh^2(x)}{\cosh(x)} = \frac{\sin^2(x)}{2\sin(x)\cos(x)} \tag{3}$$
$$2\sinh(x)\cosh(x) = \tan(x) \tag{4}$$
$$\sinh(2x) = \tan(x) \tag{5}$$

SOLUTION 1 :

Solving that Set of two Equations (1) & (2) , we get :

SOLUTION + CONSTANT

I used wolfram online tool , where I had to use $A \equiv x$ & $B \equiv a$ to get those Numerical Solutions.

The Solution matches what OP got : $(x \approx 1.46386 , a \approx 0.908752)$ : though there are other Solutions too.

Plugging the Set of Equations into MAPLE should get you the Same , with the Desired Accuracy.

SOLUTION 2 :

Solving the Single Equation (5) , we get the $x$ values which we can use to get the corresponding $a$ values :

$x \approx \pm 1.46386063852807\cdots$

ALTERNATE SOLUTIONS

We get the Equivalent Solutions this way too.

Plugging that Single Equation into MAPLE should get you the Same , with the Desired Accuracy.

IMPORTANT : Images & Solutions were generated by wolfram online tool.

0
On

You can consider that you are looking for the minimum value of $$a=\frac{\tanh(x)}{\sin^2(x)}$$ As one could intuitively expect, the minimum is close to $x=\frac \pi 2$.

Expand the rhs as a series $$\frac{\tanh(x)}{\sin^2(x)}=t+(1-t^2)\left(x-\frac{\pi }{2}\right)+t^3 \left(x-\frac{\pi }{2}\right)^2+$$ $$\frac 13\left(2+t^2-3t^4 \right)\left(x-\frac{\pi }{2}\right)^3+O\left(\left(x-\frac{\pi }{2}\right)^4\right)$$ where $t=\tanh \left(\frac{\pi }{2}\right)$.

Differentiate and use power series reversion. This would give, as an estimate

$$x=\frac{\pi }{2}-\frac{1-t^2}{2 t^3}+\frac{\left(1-t^2\right)^2 \left(3 t^4-t^2-2\right)}{8 t^9}$$ which, numerically, is $x=1.46292$ while the exact solution is $x=1.46386$.

Plug this value to obtain $a=0.908753$ while the exact solution is $a=0.908752$.

Edit

Making the initial series to $O\left(\left(x-\frac{\pi }{2}\right)^{11}\right)$, the same procedure leads to $$x=\color{red}{1.46386063852}903$$ $$a=\color{red}{0.90875206615524003441871}352$$

0
On

Make your equation linear in the hyperbolics. The roots and their multiplicity remain the same if you multiply with the positive factor $\cosh x$. Then for a double root you want $$ 0=\sinh(x)-a\sin^2(x)\cosh(x)\\ 0=\cosh(x)-2a\sin(x)\cos(x)\cosh(x)-a\sin^2(x)\sinh(x) $$ or as linear system $$ 0=\pmatrix{1&-a\sin^2x\\-a\sin^2x&1-2a\sin x\cos x}\pmatrix{\sinh x\\\cosh x} $$ If that system has a solution, then the determinant of the system matrix has to be zero (but not in the other direction). $$ 0=(1-a\sin x\cos x)^2-a^2\sin x^2\\=(1-a\sin x(1+\cos x))(1-a\sin x(-1+\cos x)) $$ Now you can use each of these branches to eliminate $a$ from the system and reduce it to a scalar equation for $x$, $$ \tanh(x)=\frac{\sin x}{\pm 1+\cos x}=\frac{\pm 1-\cos x}{\sin x} =\frac{1-\cos(k\pi+x)}{\sin(k\pi+x)}=\tan\left(k\frac\pi2+\frac x2\right) $$ where $k$ even and odd corresponds to the sign selection.

The left side is bounded, the right side has simple poles at regular distances, so the intermediate value theorem gives an infinity of solutions.

Now take the points where $x/2=\frac\pi4+m\frac\pi2$, $x=\frac\pi2+m\pi$, where the right side takes values $\pm 1$, to get intervals to start a bracketing method like bisection or Dekker,...

plot of the curves on both sides