0
|
5692 Views
|
4 Replies
|
4 Total Likes
View groups...
Share
GROUPS:

# Help me to solve the simultaneous equations

Posted 9 years ago
 HI I have a simultaneous equation in terms of a, b, c, d. when I try to use NSolve to solve the equation and get the vales of a, b, c, d in terms of p,q,r,s it is just giving empty bracket as an answer. Any one can help me to solve this equation. NSolve[{a*b + a*c + b*d + c*d == p && a*b + b*c - b*d == q && a*b + b*c + a*d + c*d == r && a*b + a*c - a*d == s}, {a, b, c, d}]  Thanks in advance.
4 Replies
Sort By:
Posted 9 years ago
 together Posted 9 years ago
 In:= Reduce[{a*b + a*c + b*d + c*d == p && a*b + b*c - b*d == q && a*b + b*c + a*d + c*d == r && a*b + a*c - a*d == s}, {a, b, c, d}, Backsubstitution -> True] Out= (p == -q + r + s && a != 0 && b == (a^2 + s - Sqrt[a^4 - 4 a^2 q + 2 a^2 s + s^2])/(2 a) && a^2 + s - Sqrt[a^4 - 4 a^2 q + 2 a^2 s + s^2] != 0 && c == (-3 a^4 + 4 a^2 q - 4 a^2 s - s^2 + 3 a^2 Sqrt[a^4 - 4 a^2 q + 2 a^2 s + s^2] + s Sqrt[a^4 - 4 a^2 q + 2 a^2 s + s^2] - Sqrt a^2 \[Sqrt](-(1/( a^4))(a^4 - 4 a^2 q + 4 a^2 r + 2 a^2 s + s^2) (-a^4 + 2 a^2 q - 2 a^2 s - s^2 + a^2 Sqrt[a^4 - 4 a^2 q + 2 a^2 s + s^2] + s Sqrt[a^4 - 4 a^2 q + 2 a^2 s + s^2])))/(2 a (a^2 + s - Sqrt[a^4 - 4 a^2 q + 2 a^2 s + s^2])) && d == -((a^4 + 2 a^2 s + s^2 - a^2 Sqrt[a^4 - 4 a^2 q + 2 a^2 s + s^2] - s Sqrt[a^4 - 4 a^2 q + 2 a^2 s + s^2] + Sqrt a^2 \[Sqrt](-(1/( a^4))(a^4 - 4 a^2 q + 4 a^2 r + 2 a^2 s + s^2) (-a^4 + 2 a^2 q - 2 a^2 s - s^2 + a^2 Sqrt[a^4 - 4 a^2 q + 2 a^2 s + s^2] + s Sqrt[a^4 - 4 a^2 q + 2 a^2 s + s^2])))/(2 a (a^2 + s - Sqrt[a^4 - 4 a^2 q + 2 a^2 s + s^2])))) || (p == -q + r + s && a != 0 && b == (a^2 + s - Sqrt[a^4 - 4 a^2 q + 2 a^2 s + s^2])/(2 a) && a^2 + s - Sqrt[a^4 - 4 a^2 q + 2 a^2 s + s^2] != 0 && c == (-3 a^4 + 4 a^2 q - 4 a^2 s - s^2 + 3 a^2 Sqrt[a^4 - 4 a^2 q + 2 a^2 s + s^2] + s Sqrt[a^4 - 4 a^2 q + 2 a^2 s + s^2] + Sqrt a^2 \[Sqrt](-(1/( a^4))(a^4 - 4 a^2 q + 4 a^2 r + 2 a^2 s + s^2) (-a^4 + 2 a^2 q - 2 a^2 s - s^2 + a^2 Sqrt[a^4 - 4 a^2 q + 2 a^2 s + s^2] + s Sqrt[a^4 - 4 a^2 q + 2 a^2 s + s^2])))/(2 a (a^2 + s - Sqrt[a^4 - 4 a^2 q + 2 a^2 s + s^2])) && d == -((a^4 + 2 a^2 s + s^2 - a^2 Sqrt[a^4 - 4 a^2 q + 2 a^2 s + s^2] - s Sqrt[a^4 - 4 a^2 q + 2 a^2 s + s^2] - Sqrt a^2 \[Sqrt](-(1/( a^4))(a^4 - 4 a^2 q + 4 a^2 r + 2 a^2 s + s^2) (-a^4 + 2 a^2 q - 2 a^2 s - s^2 + a^2 Sqrt[a^4 - 4 a^2 q + 2 a^2 s + s^2] + s Sqrt[a^4 - 4 a^2 q + 2 a^2 s + s^2])))/(2 a (a^2 + s - Sqrt[a^4 - 4 a^2 q + 2 a^2 s + s^2])))) || (p == -q + r + s && a != 0 && b == (a^2 + s + Sqrt[a^4 - 4 a^2 q + 2 a^2 s + s^2])/(2 a) && a^2 + s + Sqrt[a^4 - 4 a^2 q + 2 a^2 s + s^2] != 0 && c == (-3 a^4 + 4 a^2 q - 4 a^2 s - s^2 - 3 a^2 Sqrt[a^4 - 4 a^2 q + 2 a^2 s + s^2] - s Sqrt[a^4 - 4 a^2 q + 2 a^2 s + s^2] - Sqrt a^2 \[Sqrt]((1/( a^4))(a^4 - 4 a^2 q + 4 a^2 r + 2 a^2 s + s^2) (a^4 - 2 a^2 q + 2 a^2 s + s^2 + a^2 Sqrt[a^4 - 4 a^2 q + 2 a^2 s + s^2] + s Sqrt[a^4 - 4 a^2 q + 2 a^2 s + s^2])))/(2 a (a^2 + s + Sqrt[a^4 - 4 a^2 q + 2 a^2 s + s^2])) && d == (-a^4 - 2 a^2 s - s^2 - a^2 Sqrt[a^4 - 4 a^2 q + 2 a^2 s + s^2] - s Sqrt[a^4 - 4 a^2 q + 2 a^2 s + s^2] - Sqrt a^2 \[Sqrt]((1/( a^4))(a^4 - 4 a^2 q + 4 a^2 r + 2 a^2 s + s^2) (a^4 - 2 a^2 q + 2 a^2 s + s^2 + a^2 Sqrt[a^4 - 4 a^2 q + 2 a^2 s + s^2] + s Sqrt[a^4 - 4 a^2 q + 2 a^2 s + s^2])))/(2 a (a^2 + s + Sqrt[a^4 - 4 a^2 q + 2 a^2 s + s^2]))) || (p == -q + r + s && a != 0 && b == (a^2 + s + Sqrt[a^4 - 4 a^2 q + 2 a^2 s + s^2])/(2 a) && a^2 + s + Sqrt[a^4 - 4 a^2 q + 2 a^2 s + s^2] != 0 && c == (-3 a^4 + 4 a^2 q - 4 a^2 s - s^2 - 3 a^2 Sqrt[a^4 - 4 a^2 q + 2 a^2 s + s^2] - s Sqrt[a^4 - 4 a^2 q + 2 a^2 s + s^2] + Sqrt a^2 \[Sqrt]((1/( a^4))(a^4 - 4 a^2 q + 4 a^2 r + 2 a^2 s + s^2) (a^4 - 2 a^2 q + 2 a^2 s + s^2 + a^2 Sqrt[a^4 - 4 a^2 q + 2 a^2 s + s^2] + s Sqrt[a^4 - 4 a^2 q + 2 a^2 s + s^2])))/(2 a (a^2 + s + Sqrt[a^4 - 4 a^2 q + 2 a^2 s + s^2])) && d == (-a^4 - 2 a^2 s - s^2 - a^2 Sqrt[a^4 - 4 a^2 q + 2 a^2 s + s^2] - s Sqrt[a^4 - 4 a^2 q + 2 a^2 s + s^2] + Sqrt a^2 \[Sqrt]((1/( a^4))(a^4 - 4 a^2 q + 4 a^2 r + 2 a^2 s + s^2) (a^4 - 2 a^2 q + 2 a^2 s + s^2 + a^2 Sqrt[a^4 - 4 a^2 q + 2 a^2 s + s^2] + s Sqrt[a^4 - 4 a^2 q + 2 a^2 s + s^2])))/(2 a (a^2 + s + Sqrt[a^4 - 4 a^2 q + 2 a^2 s + s^2]))) || (s == 0 && p == -q + r && a == 0 && b != 0 && c == (-b^2 + q - Sqrt[b^4 - 2 b^2 q + q^2 + 4 b^2 r])/(2 b) && d == (-b^2 - q - Sqrt[b^4 - 2 b^2 q + q^2 + 4 b^2 r])/( 2 b)) || (s == 0 && p == -q + r && a == 0 && b != 0 && c == (-b^2 + q + Sqrt[b^4 - 2 b^2 q + q^2 + 4 b^2 r])/(2 b) && d == (-b^2 - q + Sqrt[b^4 - 2 b^2 q + q^2 + 4 b^2 r])/( 2 b)) || (q == 0 && p == r + s && b == 0 && a != 0 && c == (-a^2 + s - Sqrt[a^4 + 4 a^2 r + 2 a^2 s + s^2])/( 2 a) && -a^2 + s - Sqrt[a^4 + 4 a^2 r + 2 a^2 s + s^2] != 0 && d == -((a (a^2 + 2 r + s + Sqrt[a^4 + 4 a^2 r + 2 a^2 s + s^2]))/( a^2 - s + Sqrt[a^4 + 4 a^2 r + 2 a^2 s + s^2]))) || (q == 0 && p == r + s && b == 0 && a != 0 && c == (-a^2 + s + Sqrt[a^4 + 4 a^2 r + 2 a^2 s + s^2])/( 2 a) && -a^2 + s + Sqrt[a^4 + 4 a^2 r + 2 a^2 s + s^2] != 0 && d == -((a (a^2 + 2 r + s - Sqrt[a^4 + 4 a^2 r + 2 a^2 s + s^2]))/( a^2 - s - Sqrt[a^4 + 4 a^2 r + 2 a^2 s + s^2]))) || (r == -s && q == 0 && p == 0 && b == 0 && c == 0 && a != 0 && d == -(s/a)) || (s == 0 && q == 0 && p == r && a == 0 && b == 0 && c != 0 && d == r/c) || (s == 0 && r == 0 && q == 0 && p == 0 && a == 0 && b == 0 && c == 0) 
Posted 9 years ago
 Possibly solve the equations stepwise. For example In:= Solve[a*b + a*c + b*d + c*d == p, a] Out= {{a -> (-b d - c d + p)/(b + c)}} In:= a = (-b d - c d + p)/(b + c); Then use this result in second equation for b, etc.
Posted 9 years ago
 That means there is no solution. Also since there are nonnumeric parameters, you might as well use Solve because that's what NSolve will have to do anyway.