How do I find solution depending on parameters #a,b in RR#?

#2x+ay-3z=2#
#x+y-z=1#
#-x+by+z=3#

1 Answer
Jan 2, 2018

If #b!=-1#
then #{(x=1+(4(a-3))/(b+1)),(y=4/(b+1)),(z=(4(a-2))/(b+1)):}#

but if #b=-1# then there's no solution.

Explanation:

#{(2x+ay-3z=2),(x+y-z=1),(-x+by+z=3):}#

I'm using Gaussian elimination with smart choice of the first equation and substitution.

Add second equation to third and subtract from first two times
#{(2x-color(red)(2x)+ay-color(red)(2y)-3z-(color(red)(-2z))=2-color(red)(2)larr),(x+y-z=1rarr), (color(red)(x)-x+by+color(red)(y)+z+(color(red)(-z))=3+color(red)(1)larr):}#

Combine like terms
#{(color(red)((a-2)y-z=0)),(x+y-z=1),(color(red)((b+1)y=4)):}#

We got #y#
#{((a-2)y-z=0),(x+y-z=1),(color(red)(y=4/(b+1))):}#
Assuming #b!=-1#. If #b=-1# then #0=4# we have contradiction and no solutions.

Substitute
#{((a-2)color(red)(4/(b+1))-z=0larr),(x+color(red)(4/(b+1))-z=1larr),(y=4/(b+1)rarr):}#

Move known terms to the right
#{(-z=-color(red)((4(a-2))/(b+1))),(x-z=1-color(red)(4/(b+1))),(y=4/(b+1)):}#

We got #z#
#{(color(red)(z=(4(a-2))/(b+1))),(x-z=1-4/(b+1)),(y=4/(b+1)):}#

Substitute
#{(z=(4(a-2))/(b+1)rarr),(x-color(red)((4(a-2))/(b+1))=1-4/(b+1)larr),(y=4/(b+1)):}#

Move known terms to the right
#{(z=(4(a-2))/(b+1)),(x=1-4/(b+1)+color(red)((4(a-2))/(b+1))),(y=4/(b+1)):}#

Simplify and we finally got it
#{(color(red)(x=1+(4(a-2)-4)/(b+1)=1+(4(a-3))/(b+1))),(y=4/(b+1)),(z=(4(a-2))/(b+1)):}#