Page 1 of 1

Simple Algebra Problem

Posted: Wed Feb 11, 2009 4:40 pm
by dandymcgee
Alright so creating some sort of function for random sets of numbers is usually one of my strong points, but this one has me (sort of) stumped. I need to determine y when given x and get the following results:

x | y
======
2 = 25
3 = 20
4 = 15
5 = 10
6 = 5

Here is what I have right now, but there must be a way to simplify it:
y = ( ( x - 1 ) * 25 ) - ( 5 * ( x - 2 ) )

[random]
If I remember correctly I could distribute and simplify ( not really any simpler :P ) it to:
y = (25x - 25) - (5x - 10)

At least I think that's right. (EDIT: Nevermind this doesn't work for anything other than x = 2 lol )
[/random]

The result when x = 1 is irrelevant as 1 will be a special case where y will equal 50. Is my function as simple as it gets or did I miss something?

Re: Simple Algebra Problem

Posted: Wed Feb 11, 2009 4:43 pm
by Ginto8
dandymcgee wrote:Alright so creating some sort of function for random sets of numbers is usually one of my strong points, but this one has me (sort of) stumped. I need to determine y when given x and get the following results:

x | y
======
2 = 25
3 = 20
4 = 15
5 = 10
6 = 5

Here is what I have right now, but there must be a way to simplify it:
y = ( ( x - 1 ) * 25 ) - ( 5 * ( x - 2 ) )

[random]
If I remember correctly I could distribute and simplify ( not really any simpler :P ) it to:
y = (25x - 25) - (5x - 10)

At least I think that's right. (EDIT: Nevermind this doesn't work for anything other than x = 2 lol )
[/random]

The result when x = 1 is irrelevant as 1 will be a special case where y will equal 50. Is my function as simple as it gets or did I miss something?
It's simple linear equations (Edit: BTW this is crap they're teaching the high math class in MY school -_-'); the equation is:
y = 35 - 5x

Re: Simple Algebra Problem

Posted: Wed Feb 11, 2009 5:24 pm
by KuramaYoko10
If the equation you want to simplify is "y = (25x - 25) - (5x - 10)", then you have:

y = 25x - 25 - 5x + 10 //after distributing the - sign on the second parenthesis, then
y = 20x - 15

To check it is right...
x = 2 give y = 25

y =( 20 * 2) - 15
y = 40 - 15
y = 25

So the simplified equation is corect ;)
Ginto8 wrote:It's simple linear equations (Edit: BTW this is crap they're teaching the high math class in MY school -_-'); the equation is:
y = 35 - 5x
I am afraid this is not the right answer then ...

Re: Simple Algebra Problem

Posted: Wed Feb 11, 2009 5:49 pm
by dandymcgee
Ginto8 wrote: It's simple linear equations (Edit: BTW this is crap they're teaching the high math class in MY school -_-'); the equation is:
y = 35 - 5x
Haha thanks Ginto works perfectly :P

y = -5x + 35
I knew I had to use a negative since they have an inverse relationship.. just didn't know where, how did you do it?
KuramaYoko10 wrote: y = 20x - 15

To check it is right...
x = 2 give y = 25

y =( 20 * 2) - 15
y = 40 - 15
y = 25

So the simplified equation is corect ;)

I am afraid this is not the right answer then ...
Yeah it only works for x = 2 :P Thanks for trying to help though.

Re: Simple Algebra Problem

Posted: Wed Feb 11, 2009 8:10 pm
by Ginto8
dandymcgee wrote:
Ginto8 wrote: It's simple linear equations (Edit: BTW this is crap they're teaching the high math class in MY school -_-'); the equation is:
y = 35 - 5x
Haha thanks Ginto works perfectly :P

y = -5x + 35
I knew I had to use a negative since they have an inverse relationship.. just didn't know where, how did you do it?
I figured out y when x = 1, and x = 0, based on the pattern. At x = 0, y = 35. At x = 1, y = 30. Which meant the equation was y = 35 - x(35 - 5), or y = 35 - 5x. ;) Logic + algebra = awesomeness. =P

Re: Simple Algebra Problem

Posted: Wed Feb 11, 2009 10:14 pm
by MarauderIIC
dandymcgee wrote:x | y
======
2 = 25
3 = 20
4 = 15
5 = 10
6 = 5
You asked ginto how he got it. Here's how I would have simply thought/observed about it:

You're clearly losing 5 every time you increase x, starting from...
(1, 30)
(0, 35)

so
y = -5x + 35

But again if you had extended out to the y-intercept, you would have gotten slope = rise/run = (-5)/(1) = -5, (could have gotten slope w/o y-intercept) y-intercept 35:
y = mx + b
y = -5x + 35

Re: Simple Algebra Problem

Posted: Thu Feb 12, 2009 9:07 am
by KuramaYoko10
dandymcgee wrote:
Ginto8 wrote: It's simple linear equations (Edit: BTW this is crap they're teaching the high math class in MY school -_-'); the equation is:
y = 35 - 5x
Haha thanks Ginto works perfectly :P

y = -5x + 35
I knew I had to use a negative since they have an inverse relationship.. just didn't know where, how did you do it?
KuramaYoko10 wrote: y = 20x - 15

To check it is right...
x = 2 give y = 25

y =( 20 * 2) - 15
y = 40 - 15
y = 25

So the simplified equation is corect ;)

I am afraid this is not the right answer then ...
Yeah it only works for x = 2 :P Thanks for trying to help though.

Sorry about that... :oops:

I followed your equation and di just one checking.. the problem foolished me xD
Here is how I would have get:

y - y0 = m(x - x0)
m = deltaY / deltaX

putting the values from your chart in...

y - 25 = -5(x - 2)
y = -5x - 10 + 25
y = 35 - 5x //which certainly works now xD

Sorry again.... take care ;)

Re: Simple Algebra Problem

Posted: Thu Feb 12, 2009 3:24 pm
by dandymcgee
Omg, I'm so stupid. The only reason I didn't think make x = 0 and get the y-intercept is because like I said when x = 1 it's a special case and x will never be equal to 0 ("Why would I plug in a value that will never occur in my program", is how I was thinking). I should have completely set details like that aside when I was finding the equation for the line. :)