how i can solve a system of 5 equation where there is numbers

1 次查看(过去 30 天)
hi there i have a system of equation of 5 varaibales as follows :
-(l1+l2)*p1 +p2*(u2)+p3*0+p4*u2=0
l1*p1-p2*(u2+u1)+p3*0+p5*u2==0)
(p2*l2-p3*u1==0)
(l2*p1+p3*u1-p4*(l1+u2)==0)
(l1*p4-u2*p5==0)
(p1+p2+p3+p4+p5==1)
p1 p2 p3 p4 p5 are the unkown while l1 l2 l3 l4 l5 and u1 u2 u3 u4 u5 are the values but I the unkown in terms of l1 l2 l3 l4 l5 and u1 u2 u3u u4 u5 is this possible or not ?

回答(4 个)

SK
SK 2014-10-20
Check the symbolic toolbox and "Mupad" that comes with it.

comlich
comlich 2014-10-20
Hello,
Unfortunately, there is no a way to find an analytical solution in such a complex situation or system of equations. The main reason is that, the solution depends on whether the matrix of the system (when rewritten in the matrix form: Ap=b) is invertible or not.
I have had such a problem with differentials equation which have unknown parameters, see the attached part of a report's draft.

comlich
comlich 2014-10-20
By 'analytical solution', of course I mean analytical solution which depends on the parameters l_i and u_i. You can sill give it a try with Matlab, but I fear that it will return an useless solution (even by using symbolics).

SK
SK 2014-10-20
You should be able to get a symbolic solution - makes no difference what the values of the parameters are. They don't come into play at all. After all it is just Cramer's rule. Having said that, note:
1. You have 6 equations in 5 unknowns so you wont get a symbolic solution.
2. The Symbolic toolbox is S***. Unmentionable word here. It will take you some time to get used to its quirks. Plus the confusion between the Mupad documentation and the matlab - the syntax is totally inconsistent. Best of luck trying to use it. I have written a few m-files to construct and solve some specific large linear systems. Works, but the frustration is not worth the effort.
  2 个评论
John D'Errico
John D'Errico 2014-10-20
Problems with 6 equations in 5 unknowns are NOT directly solvable by Cramer's rule, and even if you could do so, Cramer's rule would be a poor way to solve the problem.
SK
SK 2014-10-20
编辑:SK 2014-10-20
That is exactly what I said in point 1. No need to repeat it.
As for Cramer's rule I mentioned it just to indicate that there is a symbolic solution which can be found using solve or perhaps linsolve or whatever. I didn't recommend actually using it to solve the equations.
Moreover, I suspect, but I'm not sure, that the question poster intended to have 5 equations but made some sort of a typo in his post.

请先登录,再进行评论。

产品

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by