Message Boards Message Boards

No output, solving system of equations?

Posted 3 years ago

Hi, I tried to solve the following system of equations:

solve[{rkd==RHOK*gx^(1-RHOK)*hk^(GAMMAA)*a1*kdk^(mu1-1)*lk^(1-RHOK-GAMMAA), rki==rho*gx^(1-RHOK)*hk^(GAMMAA)*(1-a1)*kik^(mu1-1)*lk^(1-RHOK-GAMMAA) , w*(1+CHII*(R-1))==GAMMAA*gx^(1-RHOK)*hk^(-RHOK)*lh^(1-RHOK-GAMMAA),  rla==(1-GAMMAA-RHOK)*gx^(1-RHOK)*hk^(-RHOK)*lh^(1-RHOK-GAMMAA) ,  gx^(1-RHOK)*hk^(-RHOK)* lh^(1-GAMMAA-RHOK)==rkd*kdk*(hk)^(-1)+rki*kik*(hk)^(-1)+w*(1+CHII*(1-R))*rla*lh}, {hk,lk,lh,w,rla}]

Only {hk,lk,lh,w,rla} are unknowns, the rest are parameters or variables which values I already know. The output does not say any error, just repeat what I wrote. What can I do? it is my first time using Mathematica. Thanks!

2 Replies
Posted 3 years ago

Use

Solve

not

solve

Try substituting in the values of the variables that you know.

If that does not give a solution then try

Reduce

instead of

Solve
POSTED BY: Bill Nelson

I may have misinterpreted your input. However, it seems that your equations can be solved for your unknowns only if the parameters satisfy a compatibility condition. I found a solution for a choice of numerical values of the parameters:

eqs = {rkd == 
    RHOK*gx^(1 - RHOK) hk^(GAMMAA) a1kdk^(mu1 - 1) lk^(1 - RHOK - 
        GAMMAA), 
   rki == rho*
     gx^(1 - RHOK) hk^(GAMMAA) (1 - 
       a1) kik^(mu1 - 1) lk^(1 - RHOK - GAMMAA), 
   w (1 + CHII (R - 1)) == 
    GAMMAA*gx^(1 - RHOK) hk^(-RHOK) lh^(1 - RHOK - GAMMAA), 
   rla == (1 - GAMMAA - 
       RHOK) gx^(1 - RHOK) hk^(-RHOK) lh^(1 - RHOK - GAMMAA), 
   gx^(1 - RHOK) hk^(-RHOK) lh^(1 - GAMMAA - RHOK) == 
    rkdkdk (hk)^(-1) + rkikik (hk)^(-1) + w (1 + CHII (1 - R)) rla*lh};
compatibilityConditions = Solve[Eliminate[eqs,
     {hk, lk, lh, w, rla}], rkd][[1]];
Block[{GAMMAA = 1, RHOK = 2, mu1 = 2, CHII = 1, R = 1, a1 = 0, 
  kik = 1, rkdkdk = 1, rkikik = 1, rki = 1, gx = 1, a1kdk = 1, 
  rho = 1},
 Reduce[eqs /. compatibilityConditions,
  {hk, lk, lh, w, rla}]]
POSTED BY: Gianluca Gorni
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract