Non trivial Solutions for a system of equations
조회 수: 22 (최근 30일)
이전 댓글 표시
Hey, so I was solving this system of equations given as follows -
syms a b c
eqn1 = t1*a + b - t1*tm*c == tm;
eqn2 = t2*a + b - t2*tm*c == tm;
eqn3 = t3*a + b - t3*tm*c == tm;
t1 t2 and t3 are constants defined earlier.
After generating two matrices using
[A,B] = equationsToMatrix([eqn1, eqn2, eqn3],[a,b,c]);
I tried solving them using
1) linsolve,
2)sol = solve([eqn1,eqn2,eqn3],[a,b,c])
Both methods yield the same solution namely, a=c=0 and b=tm
However the solution I require is non zero. Is there any way to impose this condition ?
Any help or suggestion would be greatly appreciated.
댓글 수: 0
채택된 답변
Roger Stafford
2017년 9월 27일
Replace a, b, and c with the symbols x, y, and z, respectively:
t1*x + y - t1*tm*z = tm
t2*x + y - t2*tm*z = tm
t3*x + y - t3*tm*z = tm
The pair of equations y = tm and x = tm*z represent an infinite straight line in xyz space, containing of course infinitely many points. Each of the three equations above represents an infinite flat plane which contains this line and oriented at an angle depending on the respective t1, t2, and t3 values. Hence, assuming t1, t2, and t3 are not all equal, the set of simultaneous solutions for the three equations is simply this common line with its infinitely many points. Your ‘linsolve’ and ’solve’ functions cannot give you infinitely many different solutions, so their results must necessarily be incomplete. That is the reason for the difficulties you have encountered.
Another way of stating all of the above is that the matrix of coefficients in the above three linear equations is of rank 2.
댓글 수: 0
추가 답변 (2개)
Walter Roberson
2017년 9월 27일
assume([a~=0,b~=0,c~=0])
... but you just get back a = tm, b = tm, c = 1.
댓글 수: 0
John D'Errico
2017년 9월 28일
편집: John D'Errico
2017년 9월 28일
As others have pointed out, this system has rank 2. How can you recognize that?
You can re-write each equation as
eqn1 = t1*(a-t_m*c) + b == t_m
eqn2 = t2*(a-t_m*c) + b == t_m
eqn3 = t3*(a-t_m*c) + b == t_m
(Note that I used t_m because ™ always turns into a trademark symbol on me.)
OK. So if all 3 equations MUST apply for arbitrary values of t1, t2, t3, then the only solution is identically
b == t_m
a - c*t_m == 0
You can pick a and c arbitrarily, as long as they satisfy the relation a=c*t_m. The simplest such solution is a=c=0. There is no unique solution, but infinitely many solutions.
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Symbolic Math Toolbox에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!