0
$\begingroup$

I have the following 12-th order polynomial in $\lambda$ with a parameter dependency in $u$:

    poly=3.758812241612053*10^13 u^6 + 66684.040550135 u^8 + 
 20.49586406017019 u^10 + 6.12991545011170*10^14 u^5 λ + 
 6.01167537443016*10^10 u^7 λ + 
 1914.48298091448 u^9 λ - 
 0.00267379855125686 u^11 λ + 
 3.814290619807640*10^15 u^4 λ^2 + 
 9.75191746950487*10^11 u^6 λ^2 - 
 949716.524761391 u^8 λ^2 - 
 0.0954589106310578 u^10 λ^2 + 
 1.128013473957935*10^16 u^3 λ^3 + 
 6.38428561704187*10^12 u^5 λ^3 - 
 1.262277888152881*10^7 u^7 λ^3 - 
 1.160245217815036 u^9 λ^3 + 
 1.631286280022314*10^16 u^2 λ^4 + 
 2.191981230195581*10^13 u^4 λ^4 - 
 5.36371908111549*10^7 u^6 λ^4 - 
 6.51903956301006 u^8 λ^4 + 
 1.121169470558621*10^16 u λ^5 + 
 4.286884095504253*10^13 u^3 λ^5 - 
 4.17354307569272*10^7 u^5 λ^5 - 
 17.97352149064410 u^7 λ^5 + 
 2.939985093295978*10^15 λ^6 + 
 4.77561461786877*10^13 u^2 λ^6 + 
 2.782169805785492*10^8 u^4 λ^6 - 
 20.17952007466918 u^6 λ^6 + 
 2.806695934260627*10^13 u λ^7 + 
 7.88988982463672*10^8 u^3 λ^7 + 
 10.15936451642606 u^5 λ^7 + 
 6.72945116203121*10^12 λ^8 + 
 8.60548557130742*10^8 u^2 λ^8 + 
 54.6841649927119 u^4 λ^8 + 
 4.333744253932484*10^8 u λ^9 + 
 64.3095129804413 u^3 λ^9 + 
 8.38630477586613*10^7 λ^10 + 
 36.39409592503903 u^2 λ^10 + 
 9.95454310398946 u λ^11 + λ^12;

I would like to find the condition for $u$ in order that there exists a root on the imaginary axis. I've tried this code:

Reduce[poly == 0 && Re[λ] == 0, λ]

Note: u is a positive number (not zero). It is taking a lot of time, understandably. Is this the best way to solve this?

$\endgroup$
5
  • $\begingroup$ You say exact condition on $u$ but all your coefficients are inexact. How do you expect that to work? $\endgroup$ Jan 20, 2017 at 15:10
  • 1
    $\begingroup$ u == 0 yields λ == 0, which is on the imaginary axis. $\endgroup$
    – bbgodfrey
    Jan 20, 2017 at 15:13
  • $\begingroup$ You're right. It won't be exact, I'll edit my post. $\endgroup$ Jan 20, 2017 at 15:14
  • $\begingroup$ Can $u$ be complex? $\endgroup$ Jan 20, 2017 at 15:31
  • $\begingroup$ No, u is a real number and positive. $\endgroup$ Jan 20, 2017 at 15:34

2 Answers 2

3
$\begingroup$
poly = 3.758812241612053*10^13 u^6 + 66684.040550135 u^8 + 
   20.49586406017019 u^10 + 6.12991545011170*10^14 u^5 lam + 
   6.01167537443016*10^10 u^7 lam + 1914.48298091448 u^9 lam - 
   0.00267379855125686 u^11 lam + 3.814290619807640*10^15 u^4 lam^2 + 
   9.75191746950487*10^11 u^6 lam^2 - 949716.524761391 u^8 lam^2 - 
   0.0954589106310578 u^10 lam^2 + 
   1.128013473957935*10^16 u^3 lam^3 + 
   6.38428561704187*10^12 u^5 lam^3 - 
   1.262277888152881*10^7 u^7 lam^3 - 1.160245217815036 u^9 lam^3 + 
   1.631286280022314*10^16 u^2 lam^4 + 
   2.191981230195581*10^13 u^4 lam^4 - 
   5.36371908111549*10^7 u^6 lam^4 - 6.51903956301006 u^8 lam^4 + 
   1.121169470558621*10^16 u lam^5 + 
   4.286884095504253*10^13 u^3 lam^5 - 
   4.17354307569272*10^7 u^5 lam^5 - 17.97352149064410 u^7 lam^5 + 
   2.939985093295978*10^15 lam^6 + 4.77561461786877*10^13 u^2 lam^6 + 
   2.782169805785492*10^8 u^4 lam^6 - 20.17952007466918 u^6 lam^6 + 
   2.806695934260627*10^13 u lam^7 + 
   7.88988982463672*10^8 u^3 lam^7 + 10.15936451642606 u^5 lam^7 + 
   6.72945116203121*10^12 lam^8 + 8.60548557130742*10^8 u^2 lam^8 + 
   54.6841649927119 u^4 lam^8 + 4.333744253932484*10^8 u lam^9 + 
   64.3095129804413 u^3 lam^9 + 8.38630477586613*10^7 lam^10 + 
   36.39409592503903 u^2 lam^10 + 9.95454310398946 u lam^11 + lam^12;

Split the variable into explicit real and imaginary parts, and we will insist that the real and imaginary parts of the polynomial that results both vanish.

polyReIm = poly /. {lam -> re + I*im};
cpolys = ComplexExpand[{Re[polyReIm], Im[polyReIm]}];

We also want the real part of the variable to vanish.

realSolns = Solve[Flatten[{cpolys, re}] == 0, {re, im, u}, Reals];
posSolns = Select[realSolns, ((im /. #) > 0) &]

During evaluation of In[187]:= Solve::ratnz: Solve was unable to solve the system with inexact coefficients. The answer was obtained by solving a corresponding exact system and numericizing the result.

(* Out[188]= {{re -> 0, im -> 20.9592029375, u -> 0}, {re -> 0, 
  im -> 154.502486303, u -> -252.449563342}, {re -> 0, 
  im -> 154.502486303, u -> 252.449563342}, {re -> 0, 
  im -> 282.631493317, u -> 0}, {re -> 0, im -> 9153.29055091, 
  u -> 0}} *)

So that gives both roots and the corresponding values for the parameter.

$\endgroup$
2
  • 1
    $\begingroup$ Nicely done(+1). A more compact formulation is Reduce[{Simplify[ ReIm@ComplexExpand[poly /. λ -> I m], (u | m) ∈ Reals] == 0, u > 0}, {u, m}, Reals]. $\endgroup$
    – bbgodfrey
    Jan 20, 2017 at 16:32
  • 2
    $\begingroup$ @bgodfrey Thanks, I keep forgetting about ReIm. Which is ironic since it is a function I had suggested we add a long time ago. $\endgroup$ Jan 20, 2017 at 16:45
0
$\begingroup$

Inserting a purely imaginary root $\lambda = \sqrt{-1} m = i m$ gives

Chop @ ComplexExpand[poly /. λ -> I m]

-2.93999*10^15 m^6 + 6.72945*10^12 m^8 - 8.3863*10^7 m^10 + m^12 + 
 1.63129*10^16 m^4 u^2 - 4.77561*10^13 m^6 u^2 + 
 8.60549*10^8 m^8 u^2 - 36.3941 m^10 u^2 - 3.81429*10^15 m^2 u^4 + 
 2.19198*10^13 m^4 u^4 - 2.78217*10^8 m^6 u^4 + 54.6842 m^8 u^4 + 
 3.75881*10^13 u^6 - 9.75192*10^11 m^2 u^6 - 5.36372*10^7 m^4 u^6 + 
 20.1795 m^6 u^6 + 66684. u^8 + 949717. m^2 u^8 - 6.51904 m^4 u^8 + 
 20.4959 u^10 + 0.0954589 m^2 u^10 + 
 I (1.12117*10^16 m^5 u - 2.8067*10^13 m^7 u + 4.33374*10^8 m^9 u - 
    9.95454 m^11 u - 1.12801*10^16 m^3 u^3 + 4.28688*10^13 m^5 u^3 - 
    7.88989*10^8 m^7 u^3 + 64.3095 m^9 u^3 + 6.12992*10^14 m u^5 - 
    6.38429*10^12 m^3 u^5 - 4.17354*10^7 m^5 u^5 - 10.1594 m^7 u^5 + 
    6.01168*10^10 m u^7 + 1.26228*10^7 m^3 u^7 - 17.9735 m^5 u^7 + 
    1914.48 m u^9 + 1.16025 m^3 u^9 - 0.0026738 m u^11)

which we can do since $u$ is assumed real. We store the real and imaginary parts of this expression separately:

re = -2.93999*10^15 m^6 + 6.72945*10^12 m^8 - 8.3863*10^7 m^10 + m^12 + 
 1.63129*10^16 m^4 u^2 - 4.77561*10^13 m^6 u^2 + 
 8.60549*10^8 m^8 u^2 - 36.3941 m^10 u^2 - 3.81429*10^15 m^2 u^4 + 
 2.19198*10^13 m^4 u^4 - 2.78217*10^8 m^6 u^4 + 54.6842 m^8 u^4 + 
 3.75881*10^13 u^6 - 9.75192*10^11 m^2 u^6 - 5.36372*10^7 m^4 u^6 + 
 20.1795 m^6 u^6 + 66684. u^8 + 949717. m^2 u^8 - 6.51904 m^4 u^8 + 
 20.4959 u^10 + 0.0954589 m^2 u^10;

im = 1.12117*10^16 m^5 u - 2.8067*10^13 m^7 u + 4.33374*10^8 m^9 u - 
    9.95454 m^11 u - 1.12801*10^16 m^3 u^3 + 4.28688*10^13 m^5 u^3 - 
    7.88989*10^8 m^7 u^3 + 64.3095 m^9 u^3 + 6.12992*10^14 m u^5 - 
    6.38429*10^12 m^3 u^5 - 4.17354*10^7 m^5 u^5 - 10.1594 m^7 u^5 + 
    6.01168*10^10 m u^7 + 1.26228*10^7 m^3 u^7 - 17.9735 m^5 u^7 + 
    1914.48 m u^9 + 1.16025 m^3 u^9 - 0.0026738 m u^11;

For $im$ to be a root of the polynomial we must demand that the real and imaginary parts are 0 separately. We find

Reduce[re == 0 && im == 0]

(u == 0 && 
   m == 0) || (u == 
    0 && (m == 0 || m == -20.9592 || m == 20.9592 || m == -282.631 || 
     m == 282.631 || m == -9153.29 || m == 9153.29)) || ((u == 0 || 
     u == 822.375 - 823.364 I || u == -822.375 + 823.364 I || 
     u == -822.375 - 823.364 I || u == 822.375 + 823.364 I) && 
   m == 0) || ((u == 0. - 26910.2 I || u == 0. + 26910.2 I || 
     u == 0. - 4113.37 I || u == 0. + 4113.37 I || 
     u == 0. - 3923.92 I || u == 0. + 3923.92 I || 
     u == 0. - 3004.75 I || u == 0. + 3004.75 I || 
     u == 0. - 2561.45 I || u == 0. + 2561.45 I || 
     u == 0. - 2106.71 I || u == 0. + 2106.71 I || 
     u == 0. - 237.693 I || u == 0. + 237.693 I || 
     u == 0. - 50.3109 I || u == 0. + 50.3109 I || 
     u == 0. - 49.0353 I || u == 0. + 49.0353 I || 
     u == 0. - 44.402 I || u == 0. + 44.402 I || u == 0. - 17.0771 I ||
      u == 0. + 17.0771 I || u == 0. - 16.3543 I || 
     u == 0. + 16.3543 I || u == 0. - 14.4941 I || 
     u == 0. + 14.4941 I || u == -252.45 || u == 252.45 || 
     u == -836.92 || u == 836.92 || u == -839.43 || u == 839.43 || 
     u == -925.894 || u == 925.894 || u == -2248.77 || u == 2248.77 ||
      u == -432.629 + 3616.74 I || u == 432.629 - 3616.74 I || 
     u == -432.629 - 3616.74 I || u == 432.629 + 3616.74 I || 
     u == -132.115 + 2412.91 I || u == 132.115 - 2412.91 I || 
     u == -132.115 - 2412.91 I || u == 132.115 + 2412.91 I || 
     u == -18.4148 + 246.491 I || u == 18.4148 - 246.491 I || 
     u == -18.4148 - 246.491 I || 
     u == 18.4148 + 
       246.491 I) && (m == -1.005208931810471*10^-4817 \
√(7.006345301190785*10^9632 u^2 + 
          3.974774954841963*10^9632 u^4 + 
          2.564599329062603*10^9630 u^6 + 
          5.935134409204949*10^9627 u^8 + 
          5.275185373232790*10^9624 u^10 + 
          2.027095913001037*10^9621 u^12 + 
          3.040827073402816*10^9617 u^14 + 
          7.554740567036133*10^9612 u^16 - 
          2.844773495797010*10^9607 u^18 - 
          2.192246534572371*10^9603 u^20 - 
          1.139653113847781*10^9598 u^22 + 
          5.240645403518338*10^9592 u^24 - 
          3.996899261757150*10^9586 u^26 - 
          2.179470396706121*10^9580 u^28 + 
          1.299937619639369*10^9574 u^30 + 
          9.49998330164809*10^9567 u^32 + 
          1.910804986606984*10^9561 u^34 + 
          4.575072505742353*10^9552 u^36 - 
          6.193851941240428*10^9547 u^38 - 
          1.194394185335309*10^9541 u^40 - 
          1.136546280278521*10^9534 u^42 - 
          6.123770596467873*10^9526 u^44 - 
          1.799480590522928*10^9519 u^46 - 
          2.317293259841171*10^9511 u^48 - 
          2.872545702269800*10^9502 u^50) || 
     m == 1.005208931810471*10^-4817 \
√(7.006345301190785*10^9632 u^2 + 
          3.974774954841963*10^9632 u^4 + 
          2.564599329062603*10^9630 u^6 + 
          5.935134409204949*10^9627 u^8 + 
          5.275185373232790*10^9624 u^10 + 
          2.027095913001037*10^9621 u^12 + 
          3.040827073402816*10^9617 u^14 + 
          7.554740567036133*10^9612 u^16 - 
          2.844773495797010*10^9607 u^18 - 
          2.192246534572371*10^9603 u^20 - 
          1.139653113847781*10^9598 u^22 + 
          5.240645403518338*10^9592 u^24 - 
          3.996899261757150*10^9586 u^26 - 
          2.179470396706121*10^9580 u^28 + 
          1.299937619639369*10^9574 u^30 + 
          9.49998330164809*10^9567 u^32 + 
          1.910804986606984*10^9561 u^34 + 
          4.575072505742353*10^9552 u^36 - 
          6.193851941240428*10^9547 u^38 - 
          1.194394185335309*10^9541 u^40 - 
          1.136546280278521*10^9534 u^42 - 
          6.123770596467873*10^9526 u^44 - 
          1.799480590522928*10^9519 u^46 - 
          2.317293259841171*10^9511 u^48 - 
          2.872545702269800*10^9502 u^50)))

Adding the fact that $m$ must be real and $u$ positive, we only find

Reduce[re == 0 && im == 0 && m ∈ Reals && u > 0]
(u == 252.45 && m == -154.502) || (u == 252.45 && m == 154.502)
$\endgroup$
1
  • $\begingroup$ I don't understand what you mean with $im$ and $re$. Would you add how you obtained them? $\endgroup$ Jan 20, 2017 at 15:50

Your Answer

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

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