# Solve a system of non-linear equations?

Posted 2 months ago
795 Views
|
12 Replies
|
5 Total Likes
|
 Hello Everyone! I'm trying to solve a system of non-linear equations using the 'Solve' function in Mathematica 10.0 (code and code file of which are attached herewith). However, the function is not able to solve them. It is running for 2 hours and nothing happened. I have double-checked my equations and I have used space for multiplication. e1 = Subscript[k, 1] po2^(1/2) cv - Subscript[k, -1] cos - Subscript[k, 7] ccs cos == 0; e2 = Subscript[k, 2] pch4 cv - Subscript[k, -2] cch4s - Subscript[k, 3] cch4s cv + Subscript[k, -3] cch3s chs == 0; e3 = Subscript[k, 3] cch4s cv - Subscript[k, -3] cch3s chs - Subscript[k, 4] cch3s cv + Subscript[k, -4] cch2s chs == 0; e4 = Subscript[k, 4] cch3s cv - Subscript[k, -4] cch2s chs - Subscript[k, 5] cch2s cv + Subscript[k, -5] cchs chs == 0; e5 = Subscript[k, 5] cch2s cv - Subscript[k, -5] cchs chs - Subscript[k, 6] cchs cv + Subscript[k, -6] ccs chs == 0; e6 = Subscript[k, 6] cchs cv - Subscript[k, -6] ccs chs - Subscript[k, 7] ccs cos == 0; e7 = Subscript[k, 7] ccs cos - Subscript[k, 9] ccos + Subscript[k, -9] pco cv == 0; e8 = Subscript[k, 8] chs^2 - Subscript[k, 10] ch2s + Subscript[k, -10] ph2 cv == 0; e9 = Subscript[k, 3] cch4s cv - Subscript[k, -3] cch3s chs + Subscript[k, 4] cch3s cv - Subscript[k, -4] cch2s chs + Subscript[k, 5] cch2s cv - Subscript[k, -5] cchs chs + Subscript[k, 6] cchs cv - Subscript[k, -6] ccs chs - Subscript[k, 8] chs^2 == 0; e10 = 6 cv + cos + cch4s + cch3s + cch2s + cchs + ccs + 4 chs + 2 ch2s + ccos == ct; Solve[{e1, e2, e3, e4, e5, e6, e7, e8, e9, e10}, {cos, cch4s, cch3s, cch2s, cchs, ccs, ccos, ch2s, chs, cv}]  Attachments:
12 Replies
Sort By:
Posted 2 months ago
 It's a nonlinear system and well might hang. Also you won't be able to eliminate all those variables and then solve for the rest. Do you want to eliminate that set, or do you want to solve for one set in terms of the other?
Posted 2 months ago
 Thank you for your reply. I want to eliminate all these 10 variables coming under the 'solve' function. I want to solve them in terms of the remaining unknowns in the equations, like in the following example, 'x' and 'y' are solved in terms of 'a' and 'c'. In[10]:= Solve[{x - cy == 0, ax^2 + y^2 == 1}, {x, y}] Out[10]= {{x -> cy, y -> -Sqrt[1 - ax^2]}, {x -> cy, y -> Sqrt[1 - ax^2]}} Now it has been 2 days and it is still unsolved. I have even tried without subscripts but not worked.
Posted 2 months ago
 I am still looking for help on this. If anyone could give his suggestions, it will be really helpful.
Posted 2 months ago
 Why do you need an analytical solution for this equation, probably solution is several hundred pages long. Of course if symbolic solution exists.With numeric I have solution in few seconds.See atthached file. Attachments:
Posted 2 months ago
 Because I need all those variables written in the 'Solve' function to be in terms of other unknowns. These equations are kinetic equations of a reaction. I can only evaluate those unknowns, but not the variables in the solve function.
Posted 2 months ago
 What is ct? It's only used in E10 but is not used as to be calculated variable. So could be anything?
Posted 2 months ago
 Yes. It could be anything.
Posted 2 months ago
 Solve a system of non-linear equations?
Posted 2 months ago
 Have you noticed that solving your first nine equations for your first nine variables happens very quickly? And your tenth equation is just the sum of the previous nine variables? Then you can substitute the nine solutions into your tenth equation which should eliminate most of the variables and leave you with one large equation to study.Most of those solutions appear as Roots. Using InputForm on those solutions might enable you to see the details. This might give you some insight into the form of the tenth equation as a sum of nine roots. Using Simplify on this may or may not help you.You might be able to force some of those roots into algebraic form, but the results would likely be much larger and more complicated and make understanding the structure more difficult.Hopefully this will give you another way of looking at your problem.
Posted 1 month ago
 Thank you so much @ Bill Nelson. I noticed that the first nine equations are solving quickly and are giving a very long analytical solution. However, I am confused about how these are getting solved because these are 10 simultaneous dependent equations containing 10 dependent variables and in order to get a unique solution, one has to solve them simultaneously. The first 9 equations already contain all these 10 variables.Also, I am not able to understand the solution in terms of Root and #.