2
$\begingroup$

I tried to solve the following equation with Mathematica:

$\left(1-x^2\right) \left(n \left(x^4-2 x^2+5\right)-4 \pi \left(x^2-1\right)\right) \sinh (\pi x) \cosh (n x)+\sinh (n x) \left(\left(1-x^2\right) \left(\pi \left(x^4-2 x^2+5\right)-4 n \left(x^2-1\right)\right) \cosh (\pi x)-2 x \left(x^4-2 x^2-3\right) \sinh (\pi x)\right)=0$

but the answer is: "This system cannot be solved with the methods available to Solve."

I also tried Maple, the result was a long relation in terms of RootOf. How can I obtain an explicit solution for $x$ in terms of $n$?

(1/(4 (-1 + 
    x^2)^2))((1 - x^2) (-4 \[Pi] (-1 + x^2) + 
      n (5 - 2 x^2 + x^4)) Cosh[n x] Sinh[\[Pi] x] + 
   Sinh[n x] ((1 - 
         x^2) (-4 n (-1 + x^2) + \[Pi] (5 - 2 x^2 + 
            x^4)) Cosh[\[Pi] x] - 
      2 x (-3 - 2 x^2 + x^4) Sinh[\[Pi] x])) == 0
$\endgroup$
  • $\begingroup$ can you add more information about the problem i mean the math problem what's more there! $\endgroup$ – Alrubaie Oct 11 at 12:17
  • $\begingroup$ is there conditions on x and n !!?? like been greater than 0 or Real or Integers !!?? $\endgroup$ – Alrubaie Oct 11 at 12:20
  • $\begingroup$ $n$ and $x$ are reals and positive. Unfortunately, there is nothing more. $\endgroup$ – Baran Oct 11 at 12:20
  • $\begingroup$ I modified the general equation. this is the most simplified form with all assumptions. $\endgroup$ – Baran Oct 11 at 12:26
  • 3
    $\begingroup$ Unfortunately, sometimes a solutions just does not exist in simple closed form primitives. You can try Reduce and see if it comes up with something useful. $\endgroup$ – Sjoerd Smit Oct 11 at 13:34
2
$\begingroup$

As I noted in my answer to your other question, this type of problem can be solved numerically using FindAllCrossings from this answer.

With[
 {n = 1},
 FindAllCrossings[(1/(4 (-1 + x^2)^2)) ((1 - x^2) (-4 π (-1 + x^2) + n (5 - 2 x^2 + x^4)) Cosh[n x] Sinh[π x] + Sinh[n x] ((1 - x^2) (-4 n (-1 + x^2) + π (5 - 2 x^2 + x^4)) Cosh[π x] - 2 x (-3 - 2 x^2 + x^4) Sinh[π x])), {x, -5, 5}, WorkingPrecision -> 20]
 ]

{-1.7736824298128102343}

What the function does is that it automates the method based on ContourPlot.

$\endgroup$
10
$\begingroup$
Clear["Global`*"]

f[n_, x_] := (1/(4 (-1 + x^2)^2)) ((1 - x^2) (-4 π (-1 + x^2) + 
        n (5 - 2 x^2 + x^4)) Cosh[n x] Sinh[π x] + 
     Sinh[n x] ((1 - 
           x^2) (-4 n (-1 + x^2) + π (5 - 2 x^2 + x^4)) Cosh[π x] - 
        2 x (-3 - 2 x^2 + x^4) Sinh[π x]));

0 is a root for all n

f[n, 0]

(* 0 *)

For any root x, -x is also a root

f[n, -x] == -f[n, x] // Simplify

(* True *)

Finding the roots for specific values of n

sol = {#, Solve[{f[#, x] == 0, 0 <= x < 3}, x, Reals]} & /@ 
   Range[1/4, 15, 1/4];

ListPlot[Thread[{#[[1]], x /. #[[2]]}] & /@ sol,
 Frame -> True, FrameLabel -> (Style[#, 14, Bold] & /@ {"n", "roots"})]

enter image description here

$\endgroup$
5
$\begingroup$

supplement to @Bob Hanlon 's answer

ContourPlot shows the possible solution directly:

ContourPlot[f[n, x] == 0, {n, 0, 15}, {x, -5, 5}, MaxRecursion -> 4, FrameLabel -> Automatic]

enter image description here

addendum

The solution x[n] is evaluated using NDSolve in a given range of x. The number of solutions changes with n, that's why only pointwice solution is calculated:

sol[n_] :=  NSolve[{f[n, x] == 0, 0.5 < x < 5}, x, Reals  ]
nx = Flatten[Table[Map[{n, x /. # } &, sol[n]], {n, .1, 10,.1}], 1];    
$\endgroup$
  • $\begingroup$ Increasing the PlotPoints, e.g., PlotPoints -> 25 provides a more complete plot. $\endgroup$ – Bob Hanlon Oct 11 at 19:44
  • $\begingroup$ @BobHanlon Thank you so much. these plots can help me to solve the problem. But, the main problem for me is to obtain a general expression for $x$ in terms of $n$, I mean find $x=f(n)$ as a solution of the above equation. $\endgroup$ – Baran Oct 11 at 21:33
  • $\begingroup$ @UrichNeumann Thank you so much. these plots can help me to solve the problem. But, the main problem for me is to obtain a general expression for x in terms of n, I mean find x=f(n) as a solution of the above equation. $\endgroup$ – Baran Oct 11 at 21:34
  • $\begingroup$ @Baran Try sol[n_] := NSolve[{f[n, x] == 0, 0.5 < x < 5}, x, Reals] which gives you all solutions inside the prescribed x-range $\endgroup$ – Ulrich Neumann Oct 12 at 8:24

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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