Link to home
Start Free TrialLog in
Avatar of daz84
daz84Flag for Afghanistan

asked on

Solving 3x3 Simultaneous Equations

It's been a lot of years since I did any maths like this and I'm struggling to remember from school...

I know three points on a curve and I wish to calculate an equation for the curve
The three points I know are (315, 4.05) (680, 3.50) (1102, 3.03)

My working is shown below. The values I get for x, y and z don't fit when I put them back into the original equations

I'm probably doing something quite fundamentally wrong! Anyone care to point me in the right direction? Or even just tell me what I should be doing?

Much appreciated!

(A)	4.05 = 99225x + 315y + z
(B)	3.5 = 462400x + 680y + z
(C)	3.03 = 1216609x + 1103y + z

----------------------------------------------------------------------------
(A)	315y = 4.05 - 99225x + z
	y = 4.05/315 - 315x + z

(B)	3.5 = 462400x + 680(4.05/315 - 315x + z) + z
(C)	3.03 = 1216609x + 1103(4.05/315 - 315x + z) + z

(B)	3.5 = 462400x + 8.743 - 214200x + 681z
	-5.243 = 248200x + 681z
	248200x = -681z - 5.243
	x = -(681/248200)z - 5.243/248200

(C)	3.03 = 1216609x + 14.181 - 347445x + 1104z
	-11.151 = 869164x + 1104z
	869164x = -1104z - 11.151
	x = -(1104/869164)z - 11.151/869164

(B)=(C)	-x = -x
	(1104/869164)z - 11.151/869164 = (681/248200)z - 5.243/248200
	(1104/869164)z - (681/248200)z = 11.151/869164 - 5.243/248200
	((1104/869164)-(681/248200))z = (11.151/869164)-(5.243/248200)
	z = ((11.151/869164)-(5.243/248200)) / ((1104/869164)-(681/248200))
	z = 0.00563

----------------------------------------------------------------------------
(A)	4.05 = 99225x + 315y + 0.00563
(B)	3.5 = 462400x + 680y + 0.00563
(C)	3.03 = 1216609x + 1103y + 0.00563

(A)	315y = 4.05 - 99225x + 0.00563
	y = 4.05/315 - 315x + 0.00563
(B)	3.5 = 462400x + 680(4.05/315 - 315x + 0.00563) + 0.00563
	3.5 = 462400x + 8.743 - 214200x + 3.834
	-9.077 = 248200x
	x = -(9.077/248200)
	x = -0.0000366

----------------------------------------------------------------------------
(A)	4.05 = 99225x + 315y + z
	4.05 = 99225*(-0.0000366) + 315y + 0.00563
	4.05 = 3.632 + 0.00563 + 315y
	315y = 0.412
	y = 0.00131

Open in new window

Avatar of Ken Butters
Ken Butters
Flag of United States of America image

You didn't say so... but I am going to assume that your "Curve" is a parabola.

The formula for a parabola is Ax(squared) +Bx + C = y

X and y represent the (X,Y) coordinates for the points you are Given.

You need to solve for A, B, C which will be constants.

Plug in X and y for each of the 3 points that you have... and you will have 3 equations... and 3 variables to solve for(A, B and C).

Given these points:
(315, 4.05)
(680, 3.50)
(1102, 3.03)

First point one would yeild the equation : A*315^2+B*315+C = 4.05
or simplified :  A*99225 + B*315 + C = 4.05

Through subtraction and/or substituion you should be able to solve for A, B, C.
Avatar of daz84

ASKER

That's about how far I got, it's the substitution algebra that I fear is letting me down.

I am happy that the three equations I have at the top of the "code" section of my post are correct, it's solving them for x,y,z or a,b,c in the case of your example, that is the bit I am finding difficult.

I thought I could remember how to do it from years ago and was quite happy when I got something that looked reasonable, but on plugging the values back in to the original equations it yeilds garbage. This is the reason I am lost and need some help.
ASKER CERTIFIED SOLUTION
Avatar of Ken Butters
Ken Butters
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Question....

on your third equation... you had this coordinate: (1102, 3.03)

But this equation:   3.03 = 1216609x + 1103y + z

you used 1103 in the equation... but have 1102 as the point.... which is accurate?
Avatar of daz84

ASKER

That was a typo as I was typing the question buttersk, well spotted! The correct value is 1103

Thank you all for your efforts, especially buttersk! I am going to attempt this with d-glitch's method however, as it looks easier! And easy is what I'm gunning for!

You will all get credit once I have calculated the correct answer!