2

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
  • can you add more information about the problem i mean the math problem what's more there! – nufaie Oct 11 '19 at 12:17
  • is there conditions on x and n !!?? like been greater than 0 or Real or Integers !!?? – nufaie Oct 11 '19 at 12:20
  • $n$ and $x$ are reals and positive. Unfortunately, there is nothing more. –  Oct 11 '19 at 12:20
  • I modified the general equation. this is the most simplified form with all assumptions. –  Oct 11 '19 at 12:26
  • you need only to express x with respect to other variable n right !? but you don't want the root of solution ! – nufaie Oct 11 '19 at 12:47
  • Please edit your post to include your equation as Mathematica code in InputForm. – Bob Hanlon Oct 11 '19 at 12:54
  • I added the Equation in Mathematica input form. Yes, I just need to find $x$ in terms of $n$.. –  Oct 11 '19 at 13:16
  • 3
    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. – Sjoerd Smit Oct 11 '19 at 13:34

3 Answers3

9
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

Bob Hanlon
  • 157,611
  • 7
  • 77
  • 198
4

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];    
Ulrich Neumann
  • 53,729
  • 2
  • 23
  • 55
  • Increasing the PlotPoints, e.g., PlotPoints -> 25 provides a more complete plot. – Bob Hanlon Oct 11 '19 at 19:44
  • @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. –  Oct 11 '19 at 21:33
  • @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. –  Oct 11 '19 at 21:34
  • @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 – Ulrich Neumann Oct 12 '19 at 08:24
1

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.

C. E.
  • 70,533
  • 6
  • 140
  • 264