Non trivial Solutions for a system of equations
20 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Jay
el 27 de Sept. de 2017
Editada: John D'Errico
el 28 de Sept. de 2017
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 comentarios
Respuesta aceptada
Roger Stafford
el 27 de Sept. de 2017
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 comentarios
Más respuestas (2)
Walter Roberson
el 27 de Sept. de 2017
assume([a~=0,b~=0,c~=0])
... but you just get back a = tm, b = tm, c = 1.
0 comentarios
John D'Errico
el 28 de Sept. de 2017
Editada: John D'Errico
el 28 de Sept. de 2017
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 comentarios
Ver también
Categorías
Más información sobre Symbolic Math Toolbox en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!