Algebra Pre-Algebra and Basic Algebra Math Forum

 November 15th, 2007, 02:12 AM #1 Newbie   Joined: Nov 2007 Posts: 3 Thanks: 0 Constructing a formula I always knew how to do this, until yesterday, my mind just went blank. I'm writing a computer program which will ask questions on constructing a formula... I need to know how to write down the working to find this out. This has been bothering me. Thanks to all who contributes, Garry. November 15th, 2007, 02:51 AM #2 Senior Member   Joined: May 2007 Posts: 402 Thanks: 0 What kind of formula and what kind of questions? November 15th, 2007, 03:03 AM #3 Newbie   Joined: Nov 2007 Posts: 3 Thanks: 0 Oh yeah, oops. Forgot to say what kind of formula. How do you find out that formula. M ---- 1 2 3 4 5 6 7 8 Y ----- 6 9 12 15 18 Y = 2M + 5 November 15th, 2007, 03:29 AM #4 Senior Member   Joined: May 2007 Posts: 402 Thanks: 0 Ok, so what you need is a line. First, let me say that you can make a line go through exactly 2 random points, or any number of specific points. So, the information you gave is too much - you only need two points. So, let's say you have these points: T1(x1,y1) T2(x2,y2) and you need an equation of the form: y(x)=a*x+b So, plugging in the two points you get: y(x1)=y1=a*x1+b y(x2)=y2=a*x2+b ------------------------ subtract the second one from the first y1-y2=a*x1+b-a*x2-b y1-y2=a(x1-x2) ------------------------ solve for 'a' a=(y1-y2)/(x1-x2) ------------------------ plug a into the first (or the second) formula y1=(y1-y2)/(x1-x2)*x1+b ------------------------ solve for b b=y1-(y1-y2)/(x1-x2)*x1 b=y1-(y1*x1-y2*x1)/(x1-x2) b=(y1*x1-y1*x2-y1*x1+y2*x1)/(x1-x2) b=(y2*x1-y1*x2)/(x1-x2) ------------------------ plug that and 'a' into y(x)=a*x+b y(x)=(y1-y2)/(x1-x2)x+(y2*x1-y1*x2)/(x1-x2) y(x)=(y1-y2)/(x1-x2)x+(y2*x1+y2*x2-y2*x2-y1*x2)/(x1-x2) y(x)=(y1-y2)/(x1-x2)x+(y2*x1-y2*x2)/(x1-x2)+(y2*x2-y1*x2)/(x1-x2) y(x)=(y1-y2)/(x1-x2)x+y2+(y2-y1)/(x1-x2)x2 y(x)-y2=(y1-y2)/(x1-x2)(x-x2) ------------------------ or if we had plugged it into the second equation y(x)-y1=(y1-y2)/(x1-x2)(x-x1) but both of them yield the same result! November 15th, 2007, 03:43 AM #5 Newbie   Joined: Nov 2007 Posts: 3 Thanks: 0 Made no sense to me. Not what my teacher taught me. It was way simpler. I'm sorry I didn't understand. That must of took a while, but thank you for your help anyway. November 15th, 2007, 05:41 AM   #6
Senior Member

Joined: Dec 2006

Posts: 1,111
Thanks: 0

I'm not sure I would have done it quite like that. Since we are trying to find a linear line, all we need are two points, like you said, but I would find the equation a little differently: (Maybe "milin" could explain further why he used the method he did, as he must have had a reason).

Quote:
 M ---- 1 2 3 4 5 6 7 8 Y ----- 6 9 12 15 18
y = AM + b (standard linear equation form)

First, we find the slope between the first two points, (1,6) and (2,9):

Slope = (9-6)/(2-1) = 3

y = 3M + b (new equation)

Now, plug in any point (We'll use 1,6) and find the value of 'b':

6 = 3(1) + b

3 = b

y = 3M + 3 Final equation of the line which goes through all the points you originally mentioned.

(I'm not sure where you got the "y = 2M + 5" equation from, but it does not work) Tags constructing, formula Thread Tools Show Printable Version Email this Page Display Modes Linear Mode Switch to Hybrid Mode Switch to Threaded Mode Similar Threads Thread Thread Starter Forum Replies Last Post Vasily Algebra 4 July 6th, 2012 08:47 AM fenglingchao Real Analysis 1 February 11th, 2011 01:12 PM Joeku91 Calculus 1 October 28th, 2009 08:22 AM cindyyo Algebra 2 May 28th, 2008 06:48 AM brakson Algebra 1 March 10th, 2008 07:19 AM

 Contact - Home - Forums - Cryptocurrency Forum - Top      