5
$\begingroup$

I'm trying to solve the following equation:

eqn = (-(Sqrt[3 - P] - I*Sqrt[P]) + (Sqrt[3 - P] + I*Sqrt[P])* Exp[-2*Pi*Sqrt[3 - P]])/((Sqrt[3 - P] - I*Sqrt[P]) + (Sqrt[3 - P] + I*Sqrt[P])* Exp[-2*Pi*Sqrt[3 - P]]) == I*Sqrt[P/(3 - P)]*(1 + Exp[-2*I*Pi*Sqrt[P]])/(1 - Exp[-2*I*Pi*Sqrt[P]]); eqn //TeXForm 

$\frac{e^{-2 \pi \sqrt{3-P}} \left(\sqrt{3-P}+i \sqrt{P}\right)-\sqrt{3-P}+i \sqrt{P}}{e^{-2 \pi \sqrt{3-P}} \left(\sqrt{3-P}+i \sqrt{P}\right)+\sqrt{3-P}-i \sqrt{P}}=\frac{i \left(1+e^{-2 i \pi \sqrt{P}}\right) \sqrt{\frac{P}{3-P}}}{1-e^{-2 i \pi \sqrt{P}}}$

The command Solve hasn't been successful so far:

Solve[eqn, P] 

Any ideas?

$\endgroup$
4
  • 1
    $\begingroup$ This is a transcendental equation.I doubt whether it will find exliptic solution. $\endgroup$ Commented Oct 6, 2015 at 15:13
  • 2
    $\begingroup$ You can try plotting the equation and find an approximate solution with FindRoot. $\endgroup$ Commented Oct 6, 2015 at 15:13
  • $\begingroup$ Welcome to Mathematica.SE! I suggest the following: 1) Browse common pitfalls. 2) As you receive help, try to give it too, by answering questions in your area of expertise. 3) Take the tour and check the help center! 4) When you see good questions and answers, vote them up using the triangles. Also, please remember to accept an answer if it solves your problem, by clicking the checkmark! $\endgroup$ Commented Oct 6, 2015 at 15:47
  • $\begingroup$ It helps to start by visualising your function (difference between the left and right sides of your equation) by creating contour plots in the complex P plane, so you can see where the function's zeros are likely to be. For instance, you could start with ContourPlot[Abs[func[x + I y]], {x, 0, 10}, {y, -2, 2}] (Arg is done analogously). $\endgroup$ Commented Oct 6, 2015 at 20:08

2 Answers 2

5
$\begingroup$

Solve, Reduce, NSolve can not solve this problem; this is a transcendental equation. It can only be solved numerically.

$$\left\{\frac{e^{-2 \pi \sqrt{3-P}} \left(\sqrt{3-P}+i \sqrt{P}\right)-\sqrt{3-P}+i \sqrt{P}}{e^{-2 \pi \sqrt{3-P}} \left(\sqrt{3-P}+i \sqrt{P}\right)+\sqrt{3-P}-i \sqrt{P}}-\frac{i \left(1+e^{-2 i \pi \sqrt{P}}\right) \sqrt{\frac{P}{3-P}}}{1-e^{-2 i \pi \sqrt{P}}}=0\right\}$$

 eq = {(-(Sqrt[3 - P] - I*Sqrt[P]) + (Sqrt[3 - P] + I*Sqrt[P])* Exp[-2*Pi*Sqrt[3 - P]])/((Sqrt[3 - P] - I*Sqrt[P]) + (Sqrt[3 - P] + I*Sqrt[P])* Exp[-2*Pi*Sqrt[3 - P]]) - I Sqrt[P/(3 - P)] (1 + Exp[-2*I Pi Sqrt[P]])/(1 - Exp[-2*I Pi Sqrt[P]]) == 0} 

In the real domain:

 Plot[Evaluate[Re@eq[[1, 1]]], {P, 0, 4}] 

enter image description here

{FindRoot[Re@eq[[1, 1]], {P, 0.5}], FindRoot[Re@eq[[1, 1]], {P, 2.5}]} 
{{P -> 0.703961}, {P -> 2.62104}} 

In the complex domain:

 Plot[Evaluate[Im@eq[[1, 1]]], {P, 5, 30}] 

enter image description here

{{P -> 6.54838}, {P -> 12.1886}, {P -> 20.0831}} 

As you can see from this plot, the equation has a infinitely many solutions in the complex domain.

enter image description here

$\endgroup$
2
  • $\begingroup$ @belisarius.Expand your question? $\endgroup$ Commented Oct 6, 2015 at 16:12
  • $\begingroup$ If you evaluate Plot[Evaluate[Abs[Subtract @@@ eq]], {P, 0, 100}] The zeroes should be there ... $\endgroup$ Commented Oct 6, 2015 at 16:18
4
$\begingroup$

You need to include a domain restriction for Solve to find any solutions:

zeros = P /. Solve[eq && -5 < Re[P] < 5 && -5 < Im[P] < 5, P]; 

Solve::fexp: Warning: Solve used FunctionExpand to transform the system. Since FunctionExpand transformation rules are only generically correct, the solution set might have been altered.

Solve::incs: Warning: Solve was unable to prove that the solution set found is complete.

The result zeros is a complicated looking set of Root objects which can be numericized to any desired precision. At machine precision we have:

N[zeros] 

{0.703961 - 0.0000232491 I, 2.62093 - 0.00664407 I, 3.95346 - 0.275317 I}

Let's check numerically if zeros satisfies the equation:

eq /. P -> N[zeros, 100] 

True

$\endgroup$

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.