# Solve 4 equations with 4 unknowns

#### EssoExplJoe

##### New member
I have managed arrive a solution and programmed it in VBA for three quadratic equations and three unknown. However, I seem to be getting lost in weeds trying to write a general solution for a,b,c,d in the following:

Points: (Y1,X1), (Y2,X2), (Y3,X3), (Y4,X4)
Points: (10,2), (5,4), (4,11), (4,15)
Four Equations with 4 variables:
a) Y1=a+bX1+cX12+dX13
b) Y2=a+bX2+cX22+dX23
c) Y3=a+bX3+cX32+dX33
d) Y4=a+bX4+cX42+dX43

I am searching for the solution and was hoping someone had already done this.

#### HallsofIvy

##### Elite Member
(c) and (d) are possible if b+ c+ d= 0.

#### Subhotosh Khan

##### Super Moderator
Staff member
I have managed arrive a solution and programmed it in VBA for three quadratic equations and three unknown. However, I seem to be getting lost in weeds trying to write a general solution for a,b,c,d in the following:

Points: (Y1,X1), (Y2,X2), (Y3,X3), (Y4,X4)
Points: (10,2), (5,4), (4,11), (4,15)
Four Equations with 4 variables:
a) Y1=a+bX1+cX12+dX13
b) Y2=a+bX2+cX22+dX23
c) Y3=a+bX3+cX32+dX33
d) Y4=a+bX4+cX42+dX43

I am searching for the solution and was hoping someone had already done this.
Use MS-excel and the "minverse" function.

#### Subhotosh Khan

##### Super Moderator
Staff member
So are you saying that (using given data) the 4 equations are:

a) a + 2b + 4c + 8d = 10
b) a + 4b + 16c + 64d = 5
c) a + 11b + 121c + 1331d = 4
d) a + 15b + 225c + 3375d = 4

If so, how d'heck are c) and d) possible?
I get:

 a = 18.7802 b = -5.48834 c = 0.587413 d = -0.01915

and back substitution gives me:

 Y1 9.99999 Y2 4.99987 Y3 3.9968 Y4 3.9918

Last edited:

#### Subhotosh Khan

##### Super Moderator
Staff member
(c) and (d) are possible if b+ c+ d= 0.
How did you get that condition?

#### Subhotosh Khan

##### Super Moderator
Staff member
I have managed arrive a solution and programmed it in VBA for three quadratic equations and three unknown. However, I seem to be getting lost in weeds trying to write a general solution for a,b,c,d in the following:

Points: (Y1,X1), (Y2,X2), (Y3,X3), (Y4,X4)
Points: (10,2), (5,4), (4,11), (4,15)
There is an "algorithm" called Gauss-elimination & back substitution method. Easy to implement and stable. Look it up...

#### EssoExplJoe

##### New member
Unknows

Solved by using Excel Minverse and MMult to arrive a a matrix solution!