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 evaluate

Solve[{-((2 (4 θ0 + θ1))/σ^2) - (2 (4 θ0 + θ2))/σ^2, 
       -((4 θ0 + θ1)/(2 σ^2)), -((4 θ0 + θ2)/(2 σ^2)),
       -(2/σ) + (4 θ0 + θ1)^2/(2 σ^3) 
       + (4 θ0 + θ2)^2/(2 σ^3)} == {0, 0, 0, 0} && σ > 0, 
      { θ0, θ1, θ2, σ}]

and Solve returns {}. Why? Should it be able to solve the equation?

share|improve this question

1 Answer 1

up vote 5 down vote accepted

Solve works correctly, when returning {} it means there are no solutions.

To demonstrate it let's rewrite your system:

system = Thread[{-((2 (4 θ0 + θ1))/σ^2) - (2 (4 θ0 + θ2))/σ^2,
                 -((4 θ0 + θ1)/(2 σ^2)), 
                 -((4 θ0 + θ2)/(2 σ^2)), 
                 -(2/σ) + (4 θ0 + θ1)^2/(2 σ^3) + (4 θ0 + θ2)^2/(2 σ^3)} ==
                  {0, 0, 0, 0}] 
{-2 (4 θ0 + θ1)/σ^2 - 2 (4 θ0 + θ2)/σ^2 == 0,
 -(4 θ0 + θ1)/(2 σ^2) == 0, 
 -(4 θ0 + θ2)/(2 σ^2) == 0, 
 -(2/σ) + (4 θ0 + θ1)^2/(2σ^3) + (4 θ0 + θ2)^2/(2 σ^3) == 0}

One can see from the second and third equations that we can define appropriate rules to simplify the system:

rules = { θ1 -> -4 θ0, θ2 -> -4 θ0};

Now we have:

system /. rules
{True, True, True, -2/σ == 0}

Thus the system cannot be satisfied because σ > 0 in your assumptions supplementing the system.

share|improve this answer
    
so when I get {}, it usually means that there is no solution? So I've added '&& sigma > 0 && -4 <= teta1 <= 4 && -4 <= teta2 <= 4 && 0 < teta0 < 1' to the solve command. And what does it mean this: «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.» Is the solution still valid –  An old man in the sea. Feb 28 at 13:27
    
In general {} means that there are no solutions. That warning can be returned if you put some machine precission numbers to inequalities so you shouldn't get it unless you put e.g. 4. instead of 4, however after the warning one gets {} what it should be. Solve can work with exact numbers, for machine precission ones use NSolve. –  Artes Feb 28 at 13:38

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.