solving 4 equations

hi, i want to solve these 4 equations and i have two problems

1-when i use the function SOLVE , the output is empty brackets, why?

2-how can i add constrains or inequalities to make maple consider them in the solution

the solve line is

solve({e^(-z[11]/t[1])*(p[21]*e^(-z[21]/t[1])+p[22]*e^(-z[22]/t[2])) = t[1]*(1-w-u[11])/(w*p[11]), e^(-z[12]/t[2])*(p[21]*e^(-z[21]/t[1])+p[22]*e^(-z[22]/t[2])) = t[2]*(1-w-u[12])/(w*p[12]), e^(-z[21]/t[1])*(p[11]*e^(-z[11]/t[1])+p[12]*e^(-z[12]/t[2])) = t[1]*(1-w-u[21])/(w*p[21]), e^(-z[22]/t[2])*(p[11]*e^(-z[11]/t[1])+p[12]*e^(-z[12]/t[2])) = t[2]*(1-w-u[22])/(w*p[22])}, [z[11], z[12], z[21], z[22]])

and the constrains that i want maple to consider are

u[11].z[11] = 0

u[12].z[12] = 0

u[21].z[21] = 0

u[22].z[22] = 0

z[11] >= 0

z[12] >= 0

z[21] >= 0

z[22] >= 0

u[11] >= 0

u[12] >= 0

u[21] >= 0

u[22] >= 0

i tryed to add these constrains to the solve line as othe equations but maple still gives me empty brackets

plz help me

 

Robert Israel's picture

solving

First of all, for future reference, in Maple e is not 2.7128..., it's just another variable.  You probably want exp(-z[11]/t[1]) etc.

Second: equations involving different exponentials are generally hard to solve, but in this case the only dependence of the four equations on z[11], ..., z[22] is through exp(-z[11]/t[1]), exp(-z[21]/t[1]), exp(-z[22]/t[2]), exp(-z[12]/t[2]), so we might as well use those as variables instead of z[11] to z[22]: I'll call them x[11] to  x[22].  Now you tried to solve for z[11] to z[22], but u[11] to u[22] seem also to be variables.  Note that z[ij] = 0 corresponds to x[ij] = 1.  The constraints u[ij]*(x[ij]-1) = 0 can be included as equations too.  So:

> eqs:= { x[11]*(p[21]*x[21]+p[22]*x[22])=t[1]*(1-w-u[11])/w/p[11], 
          x[21]*(p[11]*x[11]+p[12]*x[12])=t[1]*(1-w-u[21])/w/p[21], 
          x[12]*(p[21]*x[21]+p[22]*x[22])=t[2]*(1-w-u[12])/w/p[12], 
          x[22]*(p[11]*x[11]+p[12]*x[12])=t[2]*(1-w-u[22])/w/p[22],
          u[11]*(x[11]-1)=0, u[12]*(x[12]-1)=0, u[21]*(x[21]-1)=0, u[22]*(x[22]-1)=0 };
> solve(eqs, {x[11],x[12],x[21],x[22],u[11],u[12],u[21],u[22]});

The result is a sequence of 12 solutions.  Whether any of them satisfies the nonnegativity constraints may depend on the constants w, p[11],p[12],p[21],p[22],t[1],t[2].  For example:

> eqs1:= eval(eqs, {w=1,p[11]=2,p[12]=3,p[21]=4,p[22]=5,t[1]=6,t[2]=7});
  S1:= {solve(eqs1, {x[11],x[12],x[21],x[22],u[11],u[12],u[21],u[22]})}; 

Remove the solutions where some u[ij] < 0 or some x[ij] <= 0 or some x[ij] > 1:
 

> remove(s -> ormap(is, subs(s, 
    {seq(u[ij]< 0, ij = [11,12,21,22]), seq(x[ij] <= 0, ij = [11,12,21,22]),
     seq(x[ij] > 1, ij = [11,12,21,22])})), S1);

{{u[11] = 0, u[12] = 0, u[21] = 0, u[22] = 0, x[11] = -3/2*x[12], x[12] = x[12], x[21] = -5/4*x[22], x[22] = x[22]}}

But that's not acceptable either, because if x[22] > 0 it would make x[11] and x[21]  < 0. 

 

 

thankx

thank u. i will study your answer then i will reply.

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
}