Message Boards Message Boards

[✓] Solve two non-linear equations?


I am a new one here... so i need your help for a solution!!

Here is a problem where I need to solve 2 non linear equations that contain summaries.. Can anyone help to overcome this problem? I need a solution for the da and db (the unknown variables). The file is attached .. Thank you in advance.

rc = 47;

IntensityA = 17346;
IntensityB = 9831;
IntensityC = 91882;
KBC = 0.422;
KAB = 0.43;
BAB = (IntensityA/IntensityB)*KAB;
BBC = (IntensityB/IntensityC)*KBC;

lba = 4.12;
lbb = 2.05;
lcc = 1.82;
lcb = 1.49;
lca = 2.95;
laa = 3.44;
lac = 2.12;
lab = 1.72;
lbc = 2.52;

At100 = 0.0035;
Pc = 3.85;
Pb = 7.18;
MwB = 231.85;
MwC = 79.88;

theta = (At100*rc*Pc*MwB)/(3*db*Pb*MwC);

rb = rc + db;
ra = rc + db + da;

dc = 2*rc*Cos[i];
db = Sqrt[rb^2 - (rc*Sin[i])^2] - rc*Cos[i];
da = Sqrt[ra^2 - (rc*Sin[i])^2] - Sqrt[rb^2 - (rc*Sin[i])^2];

S = Pi*rc^2*((Sin[i + Pi/180])^2 - (Sin[i])^2);

SC = (1 - Exp[-dc/lcc])*Exp[-da/lca]*(1 + theta*Exp[-db/lcb] - theta)*
SB = (1 - Exp[-db/lbb])*Exp[-da/lba]*(1 + Exp[-dc/lbc]*Exp[-db/lbb])*S;
SA = (1 - Exp[-da/laa])*(1 + 
     Exp[-dc/lac]*Exp[-da/laa]*(1 + theta*Exp[-2*db/lab] - theta))*S;

Ic = Sum[SC, {i, Pi/180, Pi/2}];
Ia = Sum[SA, {i, Pi/180, Pi/2}];
Ib = Sum[SB, {i, Pi/180, Pi/2}];

R1 = (Ib/Ic ) - BBC;
R2 = (Ia/Ib) - BAB;
FindRoot[{R1 == 0, R2 == 0}, {{da, 1}, {db, 1}}]
POSTED BY: Sotiris Tsat
14 days ago

Everything seems fine until you get to

db = Sqrt[rb^2 - (rc*Sin[i])^2] - rc*Cos[i]

To do that it looks up the value of rb which is rc + db. To do that it looks up the value of rc which is 47. Then it looks up the value of db. You have started defining the value of db and so it starts all over again with your db=Sqrt[...]. And it does all this over and over and over until after doing this 1024 times it puts up a warning and usually fails.

Perhaps this is only a small typo. Or perhaps you didn't mean to define db in terms of db.

Can you formulate your problem where the value of variables aren't defined in terms of the value of those same variables?

POSTED BY: Bill Simpson
14 days ago

it is impossible to define the problem differently (i believe so). For example if I use initial values for da the problem gives me the result i want . The reverse process unfortunately can not be done i.e. i can's solve via this process the system of tghose eq. in order to find the unknowns da,da.As you can see the da,db is the real unknown variables an not ra, rb because ra,ra are depended from rc wchich is known.

POSTED BY: Sotiris Tsat
13 days ago

Without assigning any values to your parameters, perhaps this can provide some information

    ra == rc + db + da,
    rb == rc + db,
    da == Sqrt[ra^2 - (rc*Sin[i])^2] - Sqrt[rb^2 - (rc*Sin[i])^2],
    db == Sqrt[rb^2 - (rc*Sin[i])^2] - rc*Cos[i]},
  {da, db}],
Pi/180 <= i <= Pi/2]

That gives some warnings that it cannot find a single solution. But, with or without the Simplify, you might be able to look at the result of that, possibly provide some additional information about the domain of ra, rb, rc, da, db and provide it enough information that it could give you solutions for da and db.

You probably also want to change each of your Sums from

Ia = Sum[SA, {i, Pi/180, Pi/2}]


Ia = Sum[SA, {i, Pi/180, Pi/2, Pi/180}]

if you want it to sum every two degrees because otherwise it will only sum the values i=Pi/180 and i=Pi/180+1 and then stop.

POSTED BY: Bill Simpson
12 days ago

I have already fix the summation. But if you can see i am asking from the program to find the local minimum i.e. the roots for db=1 and da=1 (around the one, for example in the particular problem the solution is about da=0.8 and db=0.3 lets say).By this way I want to confine the solutions. The domain that you tried to simplify is the key for sure but until now i cannot understand why doesnt work.

POSTED BY: Sotiris Tsat
12 days ago

Also you forgot that in the particular domain rc=47 (known) takes place

POSTED BY: Sotiris Tsat
12 days ago

All of your equations are defined in terms of i, i is only defined inside each Sum, but you seem to want to find roots for da and db perhaps outside of the Sums.

Are those roots for some specific i?

POSTED BY: Bill Simpson
12 days ago

Problem solved.. thank Bill for your time! Finally it was easy!

POSTED BY: Sotiris Tsat
1 day ago

Group Abstract Group Abstract