freestone023

10 Reputation

One Badge

8 years, 203 days

MaplePrimes Activity


These are replies submitted by freestone023

@Markiyan Hirnyk 

Thank you so much!!

But I am using Maple 17. Can I use the SolveEquation command?

@Carl Love 

Thank you so much Carl! I am a new user of Maple and my code may be inefficient.

Here is what I wrote(I know it is a little bit messy and I want to solve p[1] and p[2]):

Digits := 20;


h := (.999344588*(1/150*(p[1]+p[2])+theta[0]*(22-p[1]-p[2])-4))*(22-p[1]-p[2])+(0.655412e-3*(1/150*(p[1]+p[2])+theta[0]*(21-p[1]-p[2])-4))*(21-p[1]-p[2])+(0.106e-11*(1/150*(p[1]+p[2])+theta[0]*(20-p[1]-p[2])-4))*(20-p[1]-p[2]);

solveset := solve({h = 0}, {theta[0]});
assign(solveset);

theta[0] := theta[0];

 

f := (.999784798*(1/150*(p[1]+p[2])+theta[1]*(11-p[1])+theta[2]*(11-p[2])-4))*(11-p[1])+(0.808e-5*(1/150*(p[1]+p[2])+theta[1]*(11-p[1])+theta[2]*(10-p[2])-4))*(11-p[1])+(0.20712e-3*(1/150*(p[1]+p[2])+theta[1]*(10-p[1])+theta[2]*(11-p[2])-4))*(10-p[1])+(0.167e-8*(1/150*(p[1]+p[2])+theta[1]*(10-p[1])+theta[2]*(10-p[2])-4))*(10-p[1]);

g := (.999784798*(1/150*(p[1]+p[2])+theta[1]*(11-p[1])+theta[2]*(11-p[2])-4))*(11-p[2])+(0.808e-5*(1/150*(p[1]+p[2])+theta[1]*(11-p[1])+theta[2]*(10-p[2])-4))*(10-p[2])+(0.20712e-3*(1/150*(p[1]+p[2])+theta[1]*(10-p[1])+theta[2]*(11-p[2])-4))*(11-p[2])+(0.167e-8*(1/150*(p[1]+p[2])+theta[1]*(10-p[1])+theta[2]*(10-p[2])-4))*(10-p[2]);

solveset := solve({f = 0, g = 0}, {theta[1], theta[2]});

assign(solveset);

theta[1] := theta[1]; theta[2] := theta[2];

 

demand1 := 47*theta[1]+103*theta[0]; demand2 := 47*theta[2]+103*theta[0];

solve({demand1 = 1, demand2 = 1, 10 <= p[1] and p[1] <= 11, 10 <= p[2] and p[2] <= 11}, {p[1], p[2]});

Page 1 of 1