# Solve the following simple system of equations?

Posted 5 months ago
856 Views
|
2 Replies
|
4 Total Likes
|
 Hi I can't get this simple system to solve. I want to know a, b, and c which are flow rates and I know the mole fractions, but mathematica won't solve for it. Please help. Solve[yCO == (0.015 a + 0.05 b)/(a + b + c) && yCO2 == (0.07*a)/(a + b + c) && yN2 == 1 - yCO - yCO2, {a, b, c}] 
2 Replies
Sort By:
Posted 5 months ago
 The equation yN2 == 1 - yCO - yCO2 adds no information relevant to estimating a, b, or c so you really have two equations and three unknowns.However, as an example you can solve for a and b in terms of c, yCO, and yCO2: Solve[yCO == (0.015 a + 0.05 b)/(a + b + c) && yCO2 == (0.07*a)/(a + b + c), {a, b}] {{a -> -((1.42857 c yCO2)/(-0.1 + 2. yCO + 1. yCO2)), b -> (0.428571 (-4.66667 c yCO + 1. c yCO2))/(-0.1 + 2. yCO + 1. yCO2)}} A slightly cleaner solution would be to "rationalize" all of the coefficients: Solve[yCO == ((15/1000) a +(5/100) b)/(a + b + c) && yCO2 == ((7/100)*a)/(a + b + c), {a, b}] {{a -> -((100 c yCO2)/(7 (-1 + 20 yCO + 10 yCO2))), b -> -((10 c (14 yCO - 3 yCO2))/(7 (-1 + 20 yCO + 10 yCO2)))}} 
 Adding option MaxExtraConditions -> All to Solve helps: Solve[Rationalize[ yCO == (0.015 a + 0.05 b)/(a + b + c) && yCO2 == (0.07*a)/(a + b + c) && yN2 == 1 - yCO - yCO2, 0], {a, b, c}, MaxExtraConditions -> All] (* {{a -> ConditionalExpression[0, yCO2 == 0 && yCO == 0 && yN2 == 1 && c != 0], b -> ConditionalExpression[0, yCO2 == 0 && yCO == 0 && yN2 == 1 && c != 0]}, {a -> ConditionalExpression[0, yCO2 == 0 && yCO + yN2 == 1 && yCO != 0 && b != 0], c -> ConditionalExpression[(b - 20 b yCO)/(20 yCO), yCO2 == 0 && yCO + yN2 == 1 && yCO != 0 && b != 0]}, {b -> ConditionalExpression[-((3 a)/10), yCO == 0 && yCO2 + yN2 == 1 && yCO2 != 0 && a != 0], c -> ConditionalExpression[-((7 (-a + 10 a yCO2))/(100 yCO2)), yCO == 0 && yCO2 + yN2 == 1 && yCO2 != 0 && a != 0]}, {b -> ConditionalExpression[(a (14 yCO - 3 yCO2))/(10 yCO2), yCO + yCO2 + yN2 == 1 && yCO2 != 0 && yCO != 0 && a yCO != 0], c -> ConditionalExpression[( 3 a - 200 a yCO + (a (14 yCO - 3 yCO2))/yCO2 - ( 20 a yCO (14 yCO - 3 yCO2))/yCO2)/(200 yCO), yCO + yCO2 + yN2 == 1 && yCO2 != 0 && yCO != 0 && a yCO != 0]}}*)