imposing side conditions on Solve
- To: mathgroup at smc.vnet.net
- Subject: [mg24029] imposing side conditions on Solve
- From: Albert Maydeu-Olivares <amaydeu at tinet.fut.es>
- Date: Tue, 20 Jun 2000 03:07:41 -0400 (EDT)
- Organization: University of Barcelona
- Sender: owner-wri-mathgroup at wolfram.com
Hello everyone, I have two questions for the group on using Solve. 1) How do I impose conditions on the solution? Consider the following example omega1 = {l1^2 + ps1, l1*l2, l2^2 + ps2, l1*l3, l2*l3, l3^2 + ps3, l1*l4, l2*l4, l3*l4, l4^2 + ps4}; theta1 = {l1, l2, l3, l4, ps1, ps2, ps3, ps4}; omega2 = {e1^2*(ll1^2 + pp1), e1*e2*ll1*ll2, e2^2*(ll2^2 + pp2), e1*e3*ll1*ll3, e2*e3*ll2*ll3, e3^2*(ll3^2 + pp3), e1*e4*ll1*ll4, e2*e4*ll2*ll4, e3*e4*ll3*ll4, e4^2*(ll4^2 + pp4)}; theta2 = {ll1, ll2, ll3, ll4, pp1, pp2, pp3, pp4}; sol = Solve[omega1 == omega2, theta1] omega2 ==Simplify[omega1/.Flatten[sol[[1]]]] So it works. However, how do I impose the condition that all elements of theta1 must be positive? 2) Why Solve fails to say that there is no solution to this problem? omega1={1 + ps1, 1, 1 + ps2, 1, 1, 1 + ps3, 1, 1, 1, 1 + ps4}; theta1={ps1, ps2, ps3, ps4}; omega2={e1^2*(1 + pp1), e1*e2, e2^2*(1 + pp2), e1*e3, e2*e3, e3^2*(1 + pp3), e1*e4, e2*e4, e3*e4, e4^2*(1 + pp4)}; theta2={pp1, pp2, pp3, pp4}; sol = Solve[omega1 == omega2, theta1] omega2 == Simplify[omega1/.sol[[1]]] Thank you for your help, Albert