3
$\begingroup$

I am trying to determine whether the following equation has any real solutions for the variable $w$ in Mathematica:

exp = (gc^2*(-(gm - 2 I w)^2 - 4 wm^2) + 
   4 I gc*(gm^2 w + 4 I gm (k - w) (k + w) + 4 w (2 k^2 - w^2 + wm^2)) - 
   4 (16 k^4 - 8 I k^2 (gm - 2 I w) w + (u - w) (u + w) ((gm - 2 I w)^2 + 4 wm^2))))/
  (4 (4 k^2 + (gc - 2 I (u + w)) (gm - 2 I (w + wm))));

I want to solve

exp == 0

for real values of w. I have tried the following

Solve[exp == 0, w]
NSolve[exp == 0, w]

But both these options keep running endlessly with no output on my laptop.

How can I check if there exist any real solutions for w efficiently?

EDIT: The only constraint on all variables in my exp is that they are real.

$\endgroup$
6
  • 2
    $\begingroup$ btw, you have typo in your exp. Extra ) i.sstatic.net/jtRzBHwF.png $\endgroup$ Commented 23 hours ago
  • 1
    $\begingroup$ @seeker "EDIT: The only constraint on all variables in my exp is that they are real." No, the only constraint was that the variable w is real. Are you going to change the question each time you receive an answer to the existing one? $\endgroup$ Commented 22 hours ago
  • 4
    $\begingroup$ @azerbajdzan, my edit does not fundamentally change the question. There is absolutely no reason to “get hyper” about it — people can forget to include important details. This platform does not operate on an “ask once and then shut up” rule, and the edit function exists exactly for situations like this. $\endgroup$ Commented 13 hours ago
  • 1
    $\begingroup$ @seeker Of course it is fundamentally a different question. Requiring only variable w to be real versus requiring all variables to be real makes a big difference. $\endgroup$ Commented 2 hours ago
  • 1
    $\begingroup$ @seeker " the edit function exists exactly for situations like this." This is then strange that you didn't even bother to edit your typo/error that Nasser pointed out to you in his comment. $\endgroup$ Commented 2 hours ago

3 Answers 3

3
$\begingroup$

EDIT: The only constraint on all variables in my exp is that they are real.

In this case, it does not look like there is a solution $w$ which is real.

Doing something like Solve[exp == 0, w, Assumptions -> Element[w, Reals]] hangs also Solve[exp == 0, Assumptions -> Element[{gc, gm, wm, k, u}, Reals]] hangs.

You can try different real values of all the parameters and check. This below is small Manipulate that does this.

This is of course is not a proof, but it can convince you a little that there is no real solution as all values I tried produce complex solution for w. There are 4 solutions for w from calling SolveValues[exp == 0, w]; which returns immediately using V 14.3. And you have 5 parameters to change.

enter image description here

You see that $w$ is complex always. You can try different ranges and increments.

Code

exp = (gc^2*(-(gm - 2 I w)^2 - 4 wm^2) + 
     4 I gc*(gm^2 w + 4 I gm (k - w) (k + w) + 
        4 w (2 k^2 - w^2 + wm^2)) - 
     4 (16 k^4 - 
        8 I k^2 (gm - 2 I w) w + (u - w) (u + w) ((gm - 2 I w)^2 + 
           4 wm^2)))/(4 (4 k^2 + (gc - 2 I (u + w)) (gm - 2 I (w + wm))));

sol = SolveValues[exp == 0, w];
Manipulate[Evaluate[sol]; Column[%],
 {{gc, 1., "gc"}, -10, 10, .1, Appearance -> "Labeled"},
 {{gm, 0, "gm"}, -10, 10, .1, Appearance -> "Labeled"},
 {{wm, 0, "wm"}, -10, 10, .1, Appearance -> "Labeled"},
 {{k, 0, "k"}, -10, 10, .1, Appearance -> "Labeled"},
 {{u, 0, "u"}, -10, 10, .1, Appearance -> "Labeled"},
 TrackedSymbols :> {gc, gm, wm, u, k}]
$\endgroup$
1
$\begingroup$

Provided that real roots of Denominator[exp] do not cancel all real roots of Numerator[exp], it is sufficient to consider only Numerator[exp] == 0.

expn = Collect[Numerator[exp], w, Simplify]
(* -16 gc gm k^2 - 64 k^4 - 16 I (gc + gm) w^3 - 16 w^4 - 
   gc^2 (gm^2 + 4 wm^2) - 4 u^2 (gm^2 + 4 wm^2) + 
   4 w^2 (gc^2 + 4 gc gm + gm^2 + 4 (4 k^2 + u^2 + wm^2)) + 
   4 I w (gc^2 gm + 4 gm (2 k^2 + u^2) + gc (gm^2 + 8 k^2 + 4 wm^2)) *)

Visibly, only the coefficients of w and w^3 are complex for real parameters. Then the substitution w -> I x transforms exp to a quartic polynomial with real coefficients. Now, if w is to be real, then x must be pure imaginary and, therefore, -x also must be a solution. Consequently, the coefficients of w and w^3 must vanish. The coefficient of w3 vanishes if and only if gm == -gc:

exps= Collect[expn /. gm -> -gc, w, Simplify]
(* -gc^4 - 16 w^4 + 4 gc^2 (4 k^2 - u^2 - wm^2) - 
   16 I gc w (u^2 - wm^2) - 16 (4 k^4 + u^2 wm^2) + 
   w^2 (-8 gc^2 + 16 (4 k^2 + u^2 + wm^2)) *)

Next, the coefficient of w vanishes if an only if wm^2 == u^2 or gc == 0. Consider these alternatives in turn.

Simplify[exps /. wm^2 -> u^2];
Reduce[% == 0, w, Reals]
(* False *)

Simplify[exps /. gc -> 0];
Reduce[% == 0, w, Reals]
(* False *)

We can conclude, thereby, that eqn == 0 has no real solutions for real parameters.

$\endgroup$
0
$\begingroup$

Choose random real w and use FindInstance, there are plenty of such sulutions.

w = 1;
FindInstance[exp == 0, Variables[exp]]

{{k -> 2, gc -> 0, u -> -Sqrt[-(303/17) - (736 I)/17], gm -> 1, 
  wm -> -1}}
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.