How to solve the following equations?

76 Views Asked by At
7 -  a - 4b - ax = 0
8 - 2a - 5b + bx = 0
9 - 3a - 6b -  x = 0

I just have to find the value of x.

What is the fastest algorithm to solve a problem of the above given template with possibly different constants and co-efficients. The template will always remain the same. Eg: if n=4(here n=3), then I would get an extra column of constant c and an extra equation too.

x might have 1 to n number of solutions depending on the equations.

2

There are 2 best solutions below

4
On BEST ANSWER

The system is not a Linear System because of the existence of $ax$ and $bx$ in equations $1$ and $2$. However, we will try Gaussian_elimination. Note: you will need to scroll to see the rest of the answer...

The system (where a,b and x) are all variables:
        7 -  a - 4b - ax = 0
        8 - 2a - 5b + bx = 0
        9 - 3a - 6b -  x = 0

        Can be written as:
        a +  4b + ax = 7
        2a + 5b - bx = 8
        3a + 6b +  x = 9          

        -2 X Eqn (1):
        -2a - 8b - 2ax = -14

        Add to Eqn (2) to get the system:
        a +  4b + ax     = 7
        0 -  3b - bx-2ax = 8-14=-6
        3a + 6b +  x     = 9

        -3 X Eqn (1):
        -3a - 12b -3ax = -21

        Add to Eqn (3) to get the system:
        a +  4b + ax     = 7
        0 -  3b - bx-2ax = -6
        0 -  6b + x -3ax  = 9-21=-12

        -2 X Eqn(2) above:

        0 + 6b + 2(bx+2ax) = 12

        Add this to Eqn(3) above to get the system:
        a +  4b + ax     = 7
        0 -  3b - bx-2ax = -6
        0 +  0  + -3ax+2bx+4ax=-12+12-0

        Simplify 3rd equation to get the system:
        a +  4b + ax     = 7
        0 -  3b - bx-2ax = -6
        0 +  0  + ax+2bx= 0

    The last equation suggests that:
    Either x=0 and/or a+2b=0.

    Case-1 for x=0:
    ================
        The original system becomes

        Can be written as:
        a +  4b  = 7
        2a + 5b  = 8
        3a + 6b  = 9

        We have here 3 equations and 2 variables. At least one may be assumed redundant.

        We can use the first 2 equations to get a,b:
        a +  4b  = 7
        2a + 5b  = 8

       Multiply Eqn(1) by (-2) to get: 
        -2a - 8b = -14

     To be reduced to:

        -3b = -6
        so, b=2

        hence a=7-4b that is:
        a=7-8=-1

        So we get:

        x=0, a=-1 and b=2.

    Case-2 for a=-2b:
    =================
    Maybe you can complete this one.

Note:

If you write the system as:

A -  a - 4b - ax = 0
B - 2a - 5b + bx = 0
C - 3a - 6b -  x = 0, 

you could follow the same process and get a general result.

1
On

Hint: With $$x=9-3a-6b$$ you will get the equations $$8-2a-5b+b(9-3a-6b)=0$$ and $$7-a-4b-a(9-3a-6b)=0$$ and we get $$-2a-3ab-14b-6b^2+8=0$$ $$7-10a+9ab-4b=0$$