Message Boards Message Boards

0
|
7921 Views
|
1 Reply
|
2 Total Likes
View groups...
Share
Share this post:

Symbolic Solution to a System of Non-linear Equations

I need to get a symbolic solution to a system of non-linear equations (equation 8 is non-linear), but Mathematica is running for ever and gives no answer. Is there another way to get the solution? My codes are:

eq1 = g1 - g2 - g3 == 0
eq2 = (a1 + a2) (g1 - gA) - a2 g2 == 0
eq3 = g2 - ((b1 + b2)/b1) gB - ((1. - b1 - b2)/b1) g3 == 0
eq4 = g3 - r - b2 g2 (p - 1.) == 0
eq5 = r - ? - g1 == 0
eq6 = gA - ?A LA == 0
eq7 = gB - ?B (L - Ly - Lq - LA) - f g2 == 0
eq8 = (p - 1.) b1 Ly/ a1 Lq - p/ a2 == 0
eq9 = a1 (a1 + a2) r - a1 a2 g2 - ?A (a1 + a2)^2. (1 - a1 - a2) Ly == 0
eq10 = b1 (b1 + b2) r - b1 g3 - b2 b1 g2 - ?B (b1 + b2)^2. (1. - b1 - b2) Lq == 0
aa = Solve[{eq1, eq2, eq3, eq4, eq5, eq6, eq7, eq8, eq9, eq10}, {Ly, Lq, LA, gA, gB, r, g1, g2, g3, p}]

Thanks, Hossein

POSTED BY: Hossein Hosseini

In general, when working with symbolic algorithms, you should make sure your input is symbolic. For example, you want to use symbolic numbers. Number with a decimal point in them such as "1." and "2." are not symbolic numbers. The are floating point numbers. So first, I would remove the decimal points in the code above.

The second issue is that Solve doesn't know whether these variables are supposed to be Real numbers or Complex numbers. See the documentation for Solve. There is a way to specify the domain over which you want your solutions. In many cases people want to evaluate:

Solve[{eq1, eq2, eq3, eq4, eq5, eq6, eq7, eq8, eq9, eq10}, {Ly, Lq, LA, gA, gB, r, g1, g2, g3, p}, Reals]

I don't know if this equation has a solution without working it out myself. It looks like your equations are multinomials. In that case you might be able to use GrobnerBasis to solve or at least reduce the complexity of set of equations. Using GobernerBasis is beyond the scope of what I can talk about here, but there are examples in the documentation and resources online which explain what it is and how it works.

POSTED BY: Sean Clarke
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