Take the 2-minute tour ×
Mathematica Stack Exchange is a question and answer site for users of Mathematica. It's 100% free, no registration required.

I'm trying to use Mathematica to solve a complicated system of equations. Here is a screenshot of the equations, and what Mathematica outputs.

The variables $v_i$ and $w_i$ act as constants in this equation. I do understand the solution Mathematica gives is technically correct, however I do not want the trivial solution. How can I make Mathematica ignore that particular solution?

This is the code, as asked for.

ybe[a_, b_, c_, d_, e_, f_, R_, S_, T_] :=
  Sum[Subscript[R, d, e, \[Alpha], \[Beta]] Subscript[S, \[Alpha], f, a, \[Gamma]] Subscript[T, \[Beta], \[Gamma], b, c] - Subscript[T, e, f, \[Beta], \[Gamma]] Subscript[S, d, \[Gamma], \[Alpha], c] Subscript[R, \[Alpha], \[Beta], a, b], {\[Alpha], 0, 1}, {\[Beta], 0,1}, {\[Gamma], 0, 1}]

Subscript[r[u_], k_, l_, i_, j_] := 
  \[Delta][i+j, k+l] (\[Delta][i, j, k, l, 0] Subscript[u, 1] + \[Delta][i, j, k, l, 1] Subscript[u, 2] + \[Delta][i, k, 0] \[Delta][j, l, 1] Subscript[u, 3] + \[Delta][i, k, 1] \[Delta][j, l, 0] Subscript[u, 4] + \[Delta][i, l, 1] \[Delta][j, k, 0] Subscript[u, 5] + \[Delta][i, l ,0] \[Delta][j, k, 1] Subscript[u, 6])

eqns = DeleteCases[
   Flatten[
     Table[ybe[a, b, c, d, e, f, r[u], r[v], r[w]] == 0,
        {a, 0, 1}, {b, 0, 1}, {c, 0, 1}, {d, 0, 1}, {e, 0, 1}, {f, 0, 1}]],
   0 == 0]

Solve[eqns, Table[Subscript[u, i], {i, 6}]]
share|improve this question
    
PLease post your code. Not a picture! –  Lou Feb 8 '13 at 15:11
    
...and the definition for ybe[] while you're at it. –  user5844 Feb 8 '13 at 15:13
    
I'm not sure how to post mathematica code here? –  Mary Feb 8 '13 at 15:14
1  
This system is (formally) overdetermined: 64 eqns in 6 vars. As it is linear and homogeneous in the variables the origin is of necessity a solution. Do you have reason to believe there are other solutions? –  Daniel Lichtblau Feb 8 '13 at 15:47
2  
I did not get any 0==0 type of equations. Actually it would not be possible to get that per se, since it will immediately evaluate to True. Are you sure the method you posted for obtaining them is the same as what you used? –  Daniel Lichtblau Feb 8 '13 at 16:01

1 Answer 1

There are two issues. One is that you did not provide the correct code for generating the equations. Waste of time for anyone who, like myself, tried to work on this (an immediate conclusion being, this wasted MY time).

Here is correct code.

ybe[a_, b_, c_, d_, e_, f_, R_, S_, T_] := 
 Sum[Subscript[R, d, e, \[Alpha], \[Beta]] Subscript[S, \[Alpha], f, 
     a, \[Gamma]] Subscript[T, \[Beta], \[Gamma], b, c] - 
   Subscript[T, e, f, \[Beta], \[Gamma]] Subscript[S, 
     d, \[Gamma], \[Alpha], c] Subscript[R, \[Alpha], \[Beta], a, 
     b], {\[Alpha], 0, 1}, {\[Beta], 0, 1}, {\[Gamma], 0, 1}]

Subscript[r[u_], k_, l_, i_, 
  j_] := \[Delta][i + j, 
    k + l] (\[Delta][i, j, k, l, 0] Subscript[u, 1] + \[Delta][i, j, 
       k, l, 1] Subscript[u, 2] + \[Delta][i, k, 0] \[Delta][j, l, 
       1] Subscript[u, 3] + \[Delta][i, k, 1] \[Delta][j, l, 
       0] Subscript[u, 4] + \[Delta][i, l, 1] \[Delta][j, k, 
       0] Subscript[u, 5] + \[Delta][i, l, 0] \[Delta][j, k, 
       1] Subscript[u, 6]) /. \[Delta] -> KroneckerDelta

exprs = DeleteCases[
   Flatten[Table[
     ybe[a, b, c, d, e, f, r[u], r[v], r[w]], {a, 0, 1}, {b, 0, 
      1}, {c, 0, 1}, {d, 0, 1}, {e, 0, 1}, {f, 0, 1}]], 0];

Exercise: What was the necessary change that corrects this?

The second issue is less obvious. All solutions other than the origin are nongeneric in that they force equations on some "constants". To get an idea of what these are one can enlarge the variable list e.g. by throwing the v variables into it.

vars = Join[Table[Subscript[v, i], {i, 6}], 
   Table[Subscript[u, i], {i, 6}]];

solns = Solve[exprs == 0, vars];

This will give some idea of what happens in the solution set.

Length[solns]

(* Out[199]= 36 *)

solns[[1 ;; 4]]

(* Out[203]= {{Subscript[u, 1] -> 0, Subscript[u, 2] -> 0, 
  Subscript[u, 3] -> 0, Subscript[u, 4] -> 0, Subscript[u, 5] -> 0, 
  Subscript[u, 6] -> 0}, {Subscript[u, 5] -> 0, Subscript[u, 6] -> 0, 
  Subscript[v, 3] -> (Subscript[u, 3] Subscript[v, 1])/Subscript[u, 
   1], Subscript[v, 4] -> (Subscript[u, 4] Subscript[v, 2])/Subscript[
   u, 2], Subscript[v, 5] -> 0, 
  Subscript[v, 6] -> 0}, {Subscript[v, 1] -> 0, Subscript[v, 2] -> 0, 
  Subscript[v, 3] -> 0, Subscript[v, 4] -> 0, Subscript[v, 5] -> 0, 
  Subscript[v, 6] -> 0}, {Subscript[u, 1] -> 0, Subscript[u, 3] -> 0, 
  Subscript[u, 5] -> 0, Subscript[u, 6] -> 0, 
  Subscript[v, 4] -> (Subscript[u, 4] Subscript[v, 2])/Subscript[u, 
   2], Subscript[v, 5] -> 0, Subscript[v, 6] -> 0}} *)

Some are uglier than those. Here is one such.

(* {Subscript[u, 1] -> (1/(
  2 Subscript[v, 5] Subscript[w, 
   1]))(Subscript[u, 4] Subscript[v, 5] Subscript[w, 3] + (
    Subscript[u, 4] Subscript[v, 5] Subscript[w, 1] Subscript[w, 2])/
    Subscript[w, 4] - (
    Subscript[u, 4] Subscript[v, 5] Subscript[w, 5] Subscript[w, 6])/
    Subscript[w, 4] - 1/(Subscript[u, 5] Subscript[w, 4])(\[Sqrt](-4 
\!\(\*SubsuperscriptBox[\(u\), \(4\), \(2\)]\) 
\!\(\*SubsuperscriptBox[\(u\), \(5\), \(2\)]\) 
\!\(\*SubsuperscriptBox[\(v\), \(5\), \(2\)]\) Subscript[w, 3]
          Subscript[w, 4] Subscript[w, 5] Subscript[w, 
         6] + (-Subscript[u, 4] Subscript[u, 5] Subscript[v, 5]
            Subscript[w, 1] Subscript[w, 2] + 
          Subscript[u, 4] Subscript[u, 5] Subscript[v, 5] Subscript[w,
            3] Subscript[w, 4] + 
          Subscript[u, 4] Subscript[u, 5] Subscript[v, 5] Subscript[w,
            5] Subscript[w, 6])^2))), 
 Subscript[u, 2] -> (1/(
  2 Subscript[v, 5] Subscript[w, 
   2]))((Subscript[u, 3] Subscript[v, 5] Subscript[w, 1] Subscript[w, 
     2])/Subscript[w, 3] + 
    Subscript[u, 3] Subscript[v, 5] Subscript[w, 4] - (
    Subscript[u, 3] Subscript[v, 5] Subscript[w, 5] Subscript[w, 6])/
    Subscript[w, 3] - 
    1/(Subscript[u, 4] Subscript[u, 5] Subscript[w, 3])Subscript[u, 
     3] \[Sqrt](-4 
\!\(\*SubsuperscriptBox[\(u\), \(4\), \(2\)]\) 
\!\(\*SubsuperscriptBox[\(u\), \(5\), \(2\)]\) 
\!\(\*SubsuperscriptBox[\(v\), \(5\), \(2\)]\) Subscript[w, 3]
          Subscript[w, 4] Subscript[w, 5] Subscript[w, 
         6] + (-Subscript[u, 4] Subscript[u, 5] Subscript[v, 5]
            Subscript[w, 1] Subscript[w, 2] + 
          Subscript[u, 4] Subscript[u, 5] Subscript[v, 5] Subscript[w,
            3] Subscript[w, 4] + 
          Subscript[u, 4] Subscript[u, 5] Subscript[v, 5] Subscript[w,
            5] Subscript[w, 6])^2)), Subscript[u, 6] -> 0, 
 Subscript[v, 1] -> (1/(2 
\!\(\*SubsuperscriptBox[\(u\), \(5\), \(2\)]\) Subscript[w, 4]
    Subscript[w, 
   5]))(Subscript[u, 4] Subscript[u, 5] Subscript[v, 5] Subscript[w, 
     1] Subscript[w, 2] - 
    Subscript[u, 4] Subscript[u, 5] Subscript[v, 5] Subscript[w, 3]
      Subscript[w, 4] - 
    Subscript[u, 4] Subscript[u, 5] Subscript[v, 5] Subscript[w, 5]
      Subscript[w, 6] - \[Sqrt](-4 
\!\(\*SubsuperscriptBox[\(u\), \(4\), \(2\)]\) 
\!\(\*SubsuperscriptBox[\(u\), \(5\), \(2\)]\) 
\!\(\*SubsuperscriptBox[\(v\), \(5\), \(2\)]\) Subscript[w, 3]
         Subscript[w, 4] Subscript[w, 5] Subscript[w, 
        6] + (-Subscript[u, 4] Subscript[u, 5] Subscript[v, 5]
           Subscript[w, 1] Subscript[w, 2] + 
         Subscript[u, 4] Subscript[u, 5] Subscript[v, 5] Subscript[w, 
          3] Subscript[w, 4] + 
         Subscript[u, 4] Subscript[u, 5] Subscript[v, 5] Subscript[w, 
          5] Subscript[w, 6])^2)), 
 Subscript[v, 2] -> (1/(
  2 Subscript[u, 4] Subscript[w, 
   3]))((Subscript[u, 3] Subscript[u, 4] Subscript[v, 5] Subscript[w, 
     1] Subscript[w, 2])/(Subscript[u, 5] Subscript[w, 5]) - (
    Subscript[u, 3] Subscript[u, 4] Subscript[v, 5] Subscript[w, 3]
      Subscript[w, 4])/(Subscript[u, 5] Subscript[w, 5]) - (
    Subscript[u, 3] Subscript[u, 4] Subscript[v, 5] Subscript[w, 6])/
    Subscript[u, 5] - 1/(\!\(
\*SubsuperscriptBox[\(u\), \(5\), \(2\)]\ 
\*SubscriptBox[\(w\), \(5\)]\))Subscript[u, 3] \[Sqrt](-4 
\!\(\*SubsuperscriptBox[\(u\), \(4\), \(2\)]\) 
\!\(\*SubsuperscriptBox[\(u\), \(5\), \(2\)]\) 
\!\(\*SubsuperscriptBox[\(v\), \(5\), \(2\)]\) Subscript[w, 3]
          Subscript[w, 4] Subscript[w, 5] Subscript[w, 
         6] + (-Subscript[u, 4] Subscript[u, 5] Subscript[v, 5]
            Subscript[w, 1] Subscript[w, 2] + 
          Subscript[u, 4] Subscript[u, 5] Subscript[v, 5] Subscript[w,
            3] Subscript[w, 4] + 
          Subscript[u, 4] Subscript[u, 5] Subscript[v, 5] Subscript[w,
            5] Subscript[w, 6])^2)), 
 Subscript[v, 3] -> (1/(
  2 Subscript[u, 5] Subscript[w, 
   2]))((Subscript[u, 3] Subscript[v, 5] Subscript[w, 1] Subscript[w, 
     2])/Subscript[w, 5] - (
    Subscript[u, 3] Subscript[v, 5] Subscript[w, 3] Subscript[w, 4])/
    Subscript[w, 5] + 
    Subscript[u, 3] Subscript[v, 5] Subscript[w, 6] - 
    1/(Subscript[u, 4] Subscript[u, 5] Subscript[w, 5])Subscript[u, 
     3] \[Sqrt](-4 
\!\(\*SubsuperscriptBox[\(u\), \(4\), \(2\)]\) 
\!\(\*SubsuperscriptBox[\(u\), \(5\), \(2\)]\) 
\!\(\*SubsuperscriptBox[\(v\), \(5\), \(2\)]\) Subscript[w, 3]
          Subscript[w, 4] Subscript[w, 5] Subscript[w, 
         6] + (-Subscript[u, 4] Subscript[u, 5] Subscript[v, 5]
            Subscript[w, 1] Subscript[w, 2] + 
          Subscript[u, 4] Subscript[u, 5] Subscript[v, 5] Subscript[w,
            3] Subscript[w, 4] + 
          Subscript[u, 4] Subscript[u, 5] Subscript[v, 5] Subscript[w,
            5] Subscript[w, 6])^2)), 
 Subscript[v, 4] -> ((2 Subscript[u, 4] 
\!\(\*SubsuperscriptBox[\(v\), \(5\), \(2\)]\) 
\!\(\*SubsuperscriptBox[\(w\), \(1\), \(2\)]\) 
\!\(\*SubsuperscriptBox[\(w\), \(2\), \(2\)]\))/(Subscript[u, 5] 
\!\(\*SubsuperscriptBox[\(w\), \(5\), \(2\)]\)) - (4 Subscript[u, 4] 
\!\(\*SubsuperscriptBox[\(v\), \(5\), \(2\)]\) Subscript[w, 1]
       Subscript[w, 2] Subscript[w, 3] Subscript[w, 4])/(
     Subscript[u, 5] 
\!\(\*SubsuperscriptBox[\(w\), \(5\), \(2\)]\)) + (2 Subscript[u, 4] 
\!\(\*SubsuperscriptBox[\(v\), \(5\), \(2\)]\) 
\!\(\*SubsuperscriptBox[\(w\), \(3\), \(2\)]\) 
\!\(\*SubsuperscriptBox[\(w\), \(4\), \(2\)]\))/(Subscript[u, 5] 
\!\(\*SubsuperscriptBox[\(w\), \(5\), \(2\)]\)) - (2 Subscript[u, 4] 
\!\(\*SubsuperscriptBox[\(v\), \(5\), \(2\)]\) Subscript[w, 1]
       Subscript[w, 2] Subscript[w, 6])/(
     Subscript[u, 5] Subscript[w, 5]) - (2 Subscript[u, 4] 
\!\(\*SubsuperscriptBox[\(v\), \(5\), \(2\)]\) Subscript[w, 3]
       Subscript[w, 4] Subscript[w, 6])/(
     Subscript[u, 5] Subscript[w, 5]) - 1/(\!\(
\*SubsuperscriptBox[\(u\), \(5\), \(2\)]\ 
\*SubsuperscriptBox[\(w\), \(5\), \(2\)]\))2 Subscript[v, 5]
       Subscript[w, 1] Subscript[w, 2] \[Sqrt](-4 
\!\(\*SubsuperscriptBox[\(u\), \(4\), \(2\)]\) 
\!\(\*SubsuperscriptBox[\(u\), \(5\), \(2\)]\) 
\!\(\*SubsuperscriptBox[\(v\), \(5\), \(2\)]\) Subscript[w, 3]
           Subscript[w, 4] Subscript[w, 5] Subscript[w, 
          6] + (-Subscript[u, 4] Subscript[u, 5] Subscript[v, 5]
             Subscript[w, 1] Subscript[w, 2] + 
           Subscript[u, 4] Subscript[u, 5] Subscript[v, 5] Subscript[
            w, 3] Subscript[w, 4] + 
           Subscript[u, 4] Subscript[u, 5] Subscript[v, 5] Subscript[
            w, 5] Subscript[w, 6])^2) + 1/(\!\(
\*SubsuperscriptBox[\(u\), \(5\), \(2\)]\ 
\*SubsuperscriptBox[\(w\), \(5\), \(2\)]\))2 Subscript[v, 5]
       Subscript[w, 3] Subscript[w, 4] \[Sqrt](-4 
\!\(\*SubsuperscriptBox[\(u\), \(4\), \(2\)]\) 
\!\(\*SubsuperscriptBox[\(u\), \(5\), \(2\)]\) 
\!\(\*SubsuperscriptBox[\(v\), \(5\), \(2\)]\) Subscript[w, 3]
           Subscript[w, 4] Subscript[w, 5] Subscript[w, 
          6] + (-Subscript[u, 4] Subscript[u, 5] Subscript[v, 5]
             Subscript[w, 1] Subscript[w, 2] + 
           Subscript[u, 4] Subscript[u, 5] Subscript[v, 5] Subscript[
            w, 3] Subscript[w, 4] + 
           Subscript[u, 4] Subscript[u, 5] Subscript[v, 5] Subscript[
            w, 5] Subscript[w, 6])^2))/((2 Subscript[v, 5] 
\!\(\*SubsuperscriptBox[\(w\), \(1\), \(2\)]\) Subscript[w, 2])/
     Subscript[w, 5] - (
     2 Subscript[v, 5] Subscript[w, 1] Subscript[w, 3] Subscript[w, 
      4])/Subscript[w, 5] - 
     2 Subscript[v, 5] Subscript[w, 1] Subscript[w, 6] - 
     1/(Subscript[u, 4] Subscript[u, 5] Subscript[w, 5])2 Subscript[w,
       1] \[Sqrt](-4 
\!\(\*SubsuperscriptBox[\(u\), \(4\), \(2\)]\) 
\!\(\*SubsuperscriptBox[\(u\), \(5\), \(2\)]\) 
\!\(\*SubsuperscriptBox[\(v\), \(5\), \(2\)]\) Subscript[w, 3]
           Subscript[w, 4] Subscript[w, 5] Subscript[w, 
          6] + (-Subscript[u, 4] Subscript[u, 5] Subscript[v, 5]
             Subscript[w, 1] Subscript[w, 2] + 
           Subscript[u, 4] Subscript[u, 5] Subscript[v, 5] Subscript[
            w, 3] Subscript[w, 4] + 
           Subscript[u, 4] Subscript[u, 5] Subscript[v, 5] Subscript[
            w, 5] Subscript[w, 6])^2)), Subscript[v, 6] -> 0} *)
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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