MathGroup Archive 2006

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Strange empty set of solutions

  • To: mathgroup at smc.vnet.net
  • Subject: [mg71849] Re: Strange empty set of solutions
  • From: Jean-Marc Gulliet <jeanmarc.gulliet at gmail.com>
  • Date: Fri, 1 Dec 2006 06:21:49 -0500 (EST)
  • Organization: The Open University, Milton Keynes, UK
  • References: <ekh7pg$sgs$1@smc.vnet.net> <ekjfrf$d7h$1@smc.vnet.net> <ekmdn4$817$1@smc.vnet.net>

José Carlos Santos wrote:
> On 29-11-2006 8:19, Jens-Peer Kuska wrote:
> 
>> and we can't read you mind and the memory of your computer
>> so we must imagine a matrix M and write down
> 
> Do you want an example? Here it is:
> 
> M = {{4/5(c - 1), -2/Sqrt[5]s, 2/5(1 - c)},
>       {2/5(1 - c), -1 + s/Sqrt[5], 4/5 + c/5},
>       {-2s/Sqrt[5], -c, -1 + s/Sqrt[5]}} // N
> 
> with c = Cos[Sqrt[5]] and s = Sin[Sqrt[5]].

Right. This is the first matrix I would have try :-)

> If I type
> 
> Solve[{M.{x, y, z} == {0, 0, 0}}, {x, y, z}]
> 
> I get
> 
> {{x -> 0. - 0.0438861 z, y -> 0. + 1. z}}

The above solution is erroneous: this is a spurious solution that occurs 
due to numerical imprecision (you are using machine-precision arithmetic).

> but if I type
> 
> Solve[{M.{x, y, z} == {0, 0, 0}, x^2 + y^2 + z^2 == 1}, {x, y, z}]
> 
> then I get the empty set. Why is that?

In[1]:=
M = N[{{(4/5)*(c - 1), (-2/Sqrt[5])*s, (2/5)*(1 - c)},
      {(2/5)*(1 - c), -1 + s/Sqrt[5], 4/5 + c/5}, {-2*(s/Sqrt[5]), -c,
       -1 + s/Sqrt[5]}} /. {c -> Cos[Sqrt[5]], s -> Sin[Sqrt[5]]}]

Out[1]=
{{-1.2938183011657334, -0.7036898157513979, 0.6469091505828667}, 
{0.6469091505828667, -0.6481550921243011, 0.6765454247085667},
   {-0.7036898157513979, 0.6172728764571667, -0.6481550921243011}}

In[2]:=
Solve[{M . {x, y, z} == {0, 0, 0}}, {x, y, z}]

 From In[2]:=

Solve::svars: Equations may not give solutions for all "solve" variables.

Out[2]=
{{x -> 0. - 0.04388611995778054*z, y -> 0. + 1.*z}}

In[3]:=
Solve[{M . {x, y, z} == {0, 0, 0}}, {x, y, z}, VerifySolutions -> True]

Out[3]=
{{x -> 0., y -> 0., z -> 0.}}

In[4]:=
Solve[{M . {x, y, z} == {0, 0, 0}, x^2 + y^2 + z^2 == 1}, {x, y, z}]

Out[4]=
{}

In[5]:=
Reduce[{M . {x, y, z} == {0, 0, 0}}, {x, y, z}]

 From In[5]:=
RowReduce::luc: Result for RowReduce of badly conditioned matrix 
{{-0.648155, 0.617273, -0.70369, 0.}, {0.646909, -0.70369, -1.29382, 
0.}, {0.676545, -0.648155, 0.646909, 0.}} may contain significant 
numerical errors.

Out[5]=
x == 0. && y == 0. && z == 0.

In[6]:=
Reduce[{M . {x, y, z} == {0, 0, 0}, x^2 + y^2 + z^2 == 1}, {x, y, z}]

Out[6]=
(x == -0.03101724187965778 || x == 0.03101724187965778) && y == 
-22.786247701141555*x && z == -22.786247701141555*x

In[7]:=
Reduce[{M . {x, y, z} == {0, 0, 0}, x^2 + y^2 + z^2 == 1}, {x, y, z},
   Backsubstitution -> True]

Out[7]=
(x == -0.03101724187965778 && y == 0.7067665564761036 && z == 
0.7067665564761036) || (x == 0.03101724187965778 && y == 
-0.7067665564761036 &&
    z == -0.7067665564761036)

In[8]:=
sol1 = ToRules[%[[1]]]

Out[8]=
{x -> -0.03101724187965778, y -> 0.7067665564761036, z -> 
0.7067665564761036}

In[9]:=
sol2 = ToRules[%%[[2]]]

Out[9]=
{x -> 0.03101724187965778, y -> -0.7067665564761036, z -> 
-0.7067665564761036}

In[10]:=
Chop[M . {x, y, z} /. sol1] == {0, 0, 0}

Out[10]=
True

In[11]:=
Chop[M . {x, y, z} /. sol2] == {0, 0, 0}

Out[11]=
True

In[12]:=
x^2 + y^2 + z^2 == 1 /. sol1

Out[12]=
True

In[13]:=
x^2 + y^2 + z^2 == 1 /. sol2

Out[13]=
True

In[14]:=
M = {{(4/5)*(c - 1), (-2/Sqrt[5])*s, (2/5)*(1 - c)},
     {(2/5)*(1 - c), -1 + s/Sqrt[5], 4/5 + c/5}, {-2*(s/Sqrt[5]), -c,
      -1 + s/Sqrt[5]}} /. {c -> Cos[Sqrt[5]], s -> Sin[Sqrt[5]]}

Out[14]=
{{(4/5)*(-1 + Cos[Sqrt[5]]), -((2*Sin[Sqrt[5]])/Sqrt[5]), (2/5)*(1 - 
Cos[Sqrt[5]])}, {(2/5)*(1 - Cos[Sqrt[5]]), -1 + Sin[Sqrt[5]]/Sqrt[5],
    4/5 + Cos[Sqrt[5]]/5}, {-((2*Sin[Sqrt[5]])/Sqrt[5]), -Cos[Sqrt[5]], 
-1 + Sin[Sqrt[5]]/Sqrt[5]}}

In[15]:=
Solve[{M . {x, y, z} == {0, 0, 0}}, {x, y, z}, VerifySolutions -> True]

 From In[15]:=
Solve::svars: Equations may not give solutions for all "solve" variables.

Out[15]=
{{x -> (-(1/2))*z*Csc[Sqrt[5]/2]*(Sqrt[5]*Cos[Sqrt[5]/2] - 
Sin[Sqrt[5]/2]), y -> z}}

In[16]:=
N[%]

Out[16]=
{{x -> -0.04388611995778057*z, y -> z}}

In[17]:=
Solve[{M . {x, y, z} == {0, 0, 0}, x^2 + y^2 + z^2 == 1}, {x, y, z}]

Out[17]=
{{x -> (1/2)*Csc[Sqrt[5]]*((I*Sin[Sqrt[5]]*Sqrt[2*(-5 + 5*Cos[Sqrt[5]] + 
Sqrt[5]*Sin[Sqrt[5]] - Sqrt[5]*Cos[Sqrt[5]]*Sin[Sqrt[5]] - 
2*Sin[Sqrt[5]]^2)])/
        Sqrt[45 - 14*Sqrt[5]*Sin[Sqrt[5]] + 9*Sin[Sqrt[5]]^2] -
       (I*Sqrt[10*(-5 + 5*Cos[Sqrt[5]] + Sqrt[5]*Sin[Sqrt[5]] - 
Sqrt[5]*C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Sin[Sqrt[5]]^2] +
       (I*Cos[Sqrt[5]]*Sqrt[10*(-5 + 5*Cos[Sqrt[5]] + 
Sqrt[5]*Sin[Sqrt[5]] - Sqrt[5]*Cos[Sqrt[5]]*Sin[Sqrt[5]] - 
2*Sin[Sqrt[5]]^2)])/
        Sqrt[45 - 14*Sqrt[5]*Sin[Sqrt[5]] + 9*Sin[Sqrt[5]]^2]),
    y -> -((I*Sqrt[2*(-5 + 5*Cos[Sqrt[5]] + Sqrt[5]*Sin[Sqrt[5]] - 
Sqrt[5]*Cos[Sqrt[5]]*Sin[Sqrt[5]] - 2*Sin[Sqrt[5]]^2)])/
       Sqrt[45 - 14*Sqrt[5]*Sin[Sqrt[5]] + 9*Sin[Sqrt[5]]^2]),
    z -> -((I*Sqrt[2*(-5 + 5*Cos[Sqrt[5]] + Sqrt[5]*Sin[Sqrt[5]] - 
Sqrt[5]*Cos[Sqrt[5]]*Sin[Sqrt[5]] - 2*Sin[Sqrt[5]]^2)])/
       Sqrt[45 - 14*Sqrt[5]*Sin[Sqrt[5]] + 9*Sin[Sqrt[5]]^2])}}

In[18]:=
N[%]

Out[18]=
{{x -> 0.03101724187965798 + 0.*I, y -> -0.7067665564761035 + 0.*I, z -> 
-0.7067665564761035 + 0.*I},
   {x -> -0.03101724187965798 + 0.*I, y -> 0.7067665564761035 + 0.*I, z 
-> 0.7067665564761035 + 0.*I}}

In[19]:=
Chop[%]

Out[19]=
{{x -> 0.03101724187965798, y -> -0.7067665564761035, z -> 
-0.7067665564761035}, {x -> -0.03101724187965798, y -> 
0.7067665564761035, z -> 0.7067665564761035}}

Regards,
Jean-Marc


  • Prev by Date: Re: Re: Strange empty set of solutions
  • Next by Date: RE: RE: Functional decomposition (solving f[f[x]] = g[x] for given g)
  • Previous by thread: Re: Re: Strange empty set of solutions
  • Next by thread: Re: Strange empty set of solutions