5
$\begingroup$

I have a rather large rational expression exp involving real variables $x_1, x_2, \dots, x_{10}$. The expression is of the following form

  exp = (64*x1^4*x7^4 + 64*x2^4*x7^4 + 
    16*x2^2*x7^2*(4*x3*x7 + x5 - 2*I*x9)*(x6 - 2*I*x9) + 
    64*x1^2*x7^2*(2*x2^2*x7^2 + (x8 - 2*x4*x7)*x10) + 
    32*x1*x2*
     x7^2*((x8 - 2*x4*x7)*(x6 - 2*I*x9) + (4*x3*x7 + x5 - 2*I*x9)*
        x10) + (2*x8 - 4*I*x3*x7 - 4*x4*x7 - I*x5 - 2*x9)*(2*x8 + 
       4*I*x3*x7 - 4*x4*x7 + I*x5 + 2*x9)*((x6 - 2*I*x9)^2 + 
       4*x10^2))/(4*(4*x1^2*x7^2 + 8*I*x1*x2*x7^2 - 
      4*x2^2*x7^2 + (2*x8 + 4*I*x3*x7 - 4*x4*x7 + I*x5 + 
         2*x9)*(I*x6 + 2*(x9 + x10))))

I want to find all real solutions for $x_1, x_2, \dots, x_{10}$ such that $$ \text{exp} = 0, $$ under the following constraints:

  • All variables $x_1, \dots, x_{10}$ are real.
  • $x_5, x_6, x_7, x_8, x_9, x_{10} > 0$ (strictly positive).
  • $x_1, x_2, x_3, x_4$ can be negative.
  • $x_1$ and $x_2$ cannot be simultaneously zero.
  • $x_3$ and $x_4$ cannot be simultaneously zero.

I tried working with the FindInstance but it doesn't seem to lead to what I'm looking for:

FindInstance[Simplify[exp] == 0, Variables[exp], 1] 

({{x1 -> 1, x7 -> Root[{1 + #1^2 & , -1 + 4#1 + 24*#2 - 16*#1*#2 - 32*#2^2 + 16*#2^4 & }, {2, 1}], x2 -> 0, x10 -> 0, x4 -> 1, x8 -> 1, x6 -> 0, x9 -> -1, x5 -> -1, x3 -> 1}}*)

Any suggestion would be greatly appreciated.

$\endgroup$
2
  • 1
    $\begingroup$ All solutions or one? $\endgroup$ Commented Dec 10 at 16:00
  • 1
    $\begingroup$ Thanks @azerbajdzan, a few solutions would be enough, but if it turns out hard then I would be happy with even one. $\endgroup$ Commented Dec 10 at 16:55

1 Answer 1

5
$\begingroup$

Here are 42 positive rational solutions all with {x2 -> 0, x3 -> 0} (as this is allowed by OP constraints).

Smallest (regarding numerators and denominators) among them is:

{x1 -> 1, x10 -> 1, x2 -> 0, x3 -> 0, x4 -> 1, x5 -> 48/41, x6 -> 2, 
 x7 -> 1, x8 -> 71/41, x9 -> 1}

Additional three positive integers solutions:

{{x1 -> 3, x10 -> 1, x2 -> 1, x3 -> 2, x4 -> 1, x5 -> 4, x6 -> 2, 
  x7 -> 1, x8 -> 1, x9 -> 3}, {x1 -> 3, x10 -> 1, x2 -> 1, x3 -> 2, 
  x4 -> 2, x5 -> 4, x6 -> 2, x7 -> 1, x8 -> 3, x9 -> 3}, {x1 -> 3, 
  x10 -> 1, x2 -> 1, x3 -> 2, x4 -> 3, x5 -> 4, x6 -> 2, x7 -> 1, 
  x8 -> 5, x9 -> 3}}

Other solutions can be obtained by changing {1, 2, 3} to, say, {1, 2, 5} inside Tuples[{1, 2, 3}, {6}].

exp = (64*x1^4*x7^4 + 64*x2^4*x7^4 + 
     16*x2^2*x7^2*(4*x3*x7 + x5 - 2*I*x9)*(x6 - 2*I*x9) + 
     64*x1^2*x7^2*(2*x2^2*x7^2 + (x8 - 2*x4*x7)*x10) + 
     32*x1*x2*
      x7^2*((x8 - 2*x4*x7)*(x6 - 2*I*x9) + (4*x3*x7 + x5 - 2*I*x9)*
         x10) + (2*x8 - 4*I*x3*x7 - 4*x4*x7 - I*x5 - 2*x9)*(2*x8 + 
        4*I*x3*x7 - 4*x4*x7 + I*x5 + 2*x9)*((x6 - 2*I*x9)^2 + 
        4*x10^2))/(4*(4*x1^2*x7^2 + 8*I*x1*x2*x7^2 - 
       4*x2^2*x7^2 + (2*x8 + 4*I*x3*x7 - 4*x4*x7 + I*x5 + 
          2*x9)*(I*x6 + 2*(x9 + x10))));

eq = exp // Factor // Numerator // ReIm // ComplexExpand;


Cases[{Thread[
      DeleteCases[{x1, x4, x5, x6, x7, x8, x9, x10}, 
        Alternatives @@ {x5, x8}] -> #], 
     Solve[eq == 0 /. 
       Join[{x2 -> 0, x3 -> 0}, 
        Thread[DeleteCases[{x1, x4, x5, x6, x7, x8, x9, x10}, 
           Alternatives @@ {x5, x8}] -> #]], PositiveRationals]} & /@ 
   Tuples[{1, 2, 3}, {6}], Except[{___, {}}]];

Sort /@ Join @@@ 
  Flatten[Tuples[{{#[[1]]}, #[[2]], {{x2 -> 0, x3 -> 0}}}] & /@ %, 1]

exp /. %

enter image description here

{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}
$\endgroup$
3
  • $\begingroup$ Thanks @azerbajdzan...you are a genius! Could you suggest some tips here--how can one become a pro in Mathematica? $\endgroup$ Commented Dec 10 at 21:39
  • 1
    $\begingroup$ @Rob I am not sure how, you should ask some pro ;-) $\endgroup$ Commented Dec 10 at 23:42
  • $\begingroup$ Haha :)). Anyways, thanks a lot for this nice answer. I have a similar question that I posted here:mathematica.stackexchange.com/questions/317245/…. Please take a look. $\endgroup$ Commented Dec 11 at 11:33

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.