1
$\begingroup$

I am trying to solve 3 equations 3 unknown system on Mathematica in order to get numerical results for my three variables x,y,z but the software is always on the Running... status and never gives a result. (It does not give an error message neither. Mathematica stays actionless and after I smust reinitialize it.)

 parametres = {
   σ -> 1.5
 , α -> 0.3
 , β -> 0.6
 , ρ -> 0.02
 , δ -> 0.05
 , ϕ -> 0.8
 };

After the calibration, I use

sol11 = Solve[
 {
  ((α y - ρ) (α - 1))/(σ (α - β - 1)) == x 
  , (β x)/(α - 1) + y^(α - 1) == z
  , x ((β (1 - σ))/(1 - α) + (βy^α)/(ϕ z)) == ρ
  }
 , \{x, y, z}] /. parametres // Simplify

What could be the problem ? Does it mean that there does not exist a result ?

$\endgroup$
  • 1
    $\begingroup$ Your code is currently trying to find a symbolic result first, and then substituting the numerical values into it. You might have better luck if you do the parameter substitution first: Solve[{...}/.parametres, {x, y, z}]. Alternatively, if that doesn't work either, you can try FindRoot. $\endgroup$ – MarcoB Aug 21 '15 at 12:24
  • $\begingroup$ @MarcoB Thanks so much. Solve did not work but FindRoot worked perfectly ! $\endgroup$ – optimal control Aug 21 '15 at 17:38
6
$\begingroup$
parametres = {σ -> 1.5, α -> 0.3, β -> 0.6, ρ -> 
     0.02, δ -> 0.05, ϕ -> 0.8} // Rationalize;

Your third equation contains (βy^α) there needs to be a space as in (β y^α)

eqns = {((α y - ρ) (α - 
           1))/(σ (α - β - 1)) == 
      x, (β x)/(α - 1) + y^(α - 1) == z, 
     x ((β (1 - σ))/(1 - α) + (β \
y^α)/(ϕ z)) == ρ} /. parametres // Simplify;

Restrict the domain to Reals

sol11 = Solve[eqns, {x, y, z}, Reals] // N

{{x -> 0.082946, y -> 0.836879, z -> 1.06166}}

Since Rationalize was used to provide exact numbers for the parameters, Solve provides an exact solution in terms of Root objects. //N was used to convert these to numerical values. Verifying the result:

eqns /. sol11[[1]]

{True, True, True}

$\endgroup$
  • $\begingroup$ Thanks for the clear presentation. I did not think in this way. $\endgroup$ – optimal control Aug 21 '15 at 17:39
3
$\begingroup$

I guess the FindInstance function does the job:

FindInstance[{((α y - ρ) (α - 1))/(σ (α - β - 1)) == x
, (β x)/(α - 1) + y^(α - 1) == z
, x ((β (1 - σ))/(1 - α) + (β y^α)/(ϕ z)) == ρ} 
/. parametres, {x, y, z}, Reals]

{{x -> 0.082946, y -> 0.836879, z -> 1.06166}}

$\endgroup$
  • $\begingroup$ Thanks for the use of this command to which I was not familiar. $\endgroup$ – optimal control Aug 21 '15 at 17:39

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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