1
$\begingroup$

This question already has an answer here:

I need to find all positive roots of the following transcendental equation

2*cot(x) = 6.4*x-0.1563/x

I know that the roots can be visualised as the intersecting point of the y=LHS and y=RHS curvesenter image description here

Is there any way, I can obtain say the first 20 roots of this equation and obtain their values ?

$\endgroup$

marked as duplicate by J. M. is away plotting Mar 16 at 6:35

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • $\begingroup$ Please try the solutions in the linked thread, after simplifying your equation to $2x\cos x=(6.4x^2-0.1563)\sin x$. $\endgroup$ – J. M. is away Mar 16 at 6:37
  • $\begingroup$ Not quite a duplicate as in this case the roots are distributed very regularly, $x_n\approx (n - 1)\pi + 5/(16 \pi n)$, and a simple FindRoot can be used with this approximation as a starting point. In this way we're not missing any roots, even for very large $n$. $\endgroup$ – Roman Mar 16 at 7:16
  • $\begingroup$ @Roman Your comment where you write an approximate relation for occurence of the roots ,makes me wonder if some sort of approximate $x_n$ can be written if the actual equation is of the form $2\cot(x) = \frac{Kx}{hL} - \frac{hL}{Kx}$ . I wrote the equation in the original question for the parameter values $K=16,L=0.25,h=10.$ $\endgroup$ – Indrasis Mitra Mar 16 at 8:56
  • $\begingroup$ Yes, you can do the following with any $K$, $L$, $h$. Define a series expansion c[x_] = Normal[Series[2 Cot[x], {x, 0, 3}]] (or any desired polynomial order), then a good approximation to the $n$th root (counting from $n=0$) is X[n_] = x /. Solve[c[x - n π] == 32 x/5 - 1563/(10000 x), x, Reals][[3]] (it's a Root object). To get an explicit formula, use Y[n_] = Normal[Series[X[n], {n, ∞, 3}]]. $\endgroup$ – Roman Mar 16 at 9:09
  • $\begingroup$ For general $K$, $L$, $h$ this recipe is c[x_] = Normal[Series[2 Cot[x], {x, 0, 1}]] (or higher-order if desired) followed by the approximate root definition X[{k_, L_, h_}, n_] = Assuming[k > 0 && L > 0 && h > 0, x /. Solve[c[x - n π] == (k x)/(h L) - (h L)/(k x), x, Reals][[3]] // Refine]. This gives Y[{k_, L_, h_}, n_] = Normal[Series[X[n], {n,∞, 1}]] the result n π + (2 h L)/(k n π). If you're patient you can get higher-order approximations with this prescription. $\endgroup$ – Roman Mar 16 at 9:34
2
$\begingroup$
roots = Sort[x /. 
  NSolve[{2*Cot[x] == Rationalize[6.4] x - Rationalize[0.1563]/x, 60 > x > 0}, x, Reals]]; 

{0.551848, 3.23803, 6.33252, 9.45782, 12.5912, 15.7278, 18.8661, 22.0053, 25.1452, 28.2854, 31.4259, 34.5666, 37.7074, 40.8484, 43.9894, 47.1305, 50.2717, 53.4129, 56.5542, 59.6955}

Plot[{2*Cot[x], 6.4 x - 0.1563/x}, {x, 0, Last[roots] + 1}, 
 PlotPoints -> 100, MaxRecursion -> 7, 
 Epilog -> {PointSize[Large], Red, Point[{#, 6.4 # - 0.1563/#} & /@ roots]}]

enter image description here

$\endgroup$
  • $\begingroup$ Thanks for the detailed answer $\endgroup$ – Indrasis Mitra Mar 16 at 9:44
  • $\begingroup$ @IndrasisMitra, my pleasure. Thank you for the accept. $\endgroup$ – kglr Mar 16 at 9:47

Not the answer you're looking for? Browse other questions tagged or ask your own question.