# Solving equations for all occurences of [constant]

Posted 9 years ago
6343 Views
|
2 Replies
|
0 Total Likes
|
 Hey, slightly new to the whole software of Mathematica, as well as programming, etc. And i've occured a simple problem in my needIt occures that whenever i try to calculate a set of equations with an unknown (set of) constant(s), (which normally would be done through hand) seem to eliminate the constant through the equations, leaving it with a wrong answer, as an example i'd like to be able to compute the reduced solution for x1+2x2+4x3+4*x4=b1 3x1+x2+7x3-3*x4=b2 2x1+x2+5x3-x4=b3 x1+x2+3*x3+x4=b4 or likewise, thanks in advance.
2 Replies
Sort By:
Posted 9 years ago
 In[1]:= eqs = {x1 + 2 x2 + 4 x3 + 4 x4 == b1, 3 x1 + x2 + 7 x3 - 3 x4 == b2 , 2 x1 + x2 + 5 x3 - x4 == b3, x1 + x2 + 3*x3 + x4 == b4}; In[3]:= Reduce[eqs, {x1, x2, x3, x4}] Out[3]= b2 == 2 b3 - b4 && b1 == -b3 + 3 b4 && x3 == b3/8 + b4/8 - (3 x1)/8 - x2/4 && x4 == -((3 b3)/8) + (5 b4)/8 + x1/8 - x2/4 
Posted 9 years ago
 Are you specifying which are the variables to solve for? (Really hard to diagnose when no code is provided.)