# Factoring Help, Finding two variables

1. Sep 15, 2014

### Emperor

1. The problem statement, all variables and given/known data

If f(x) = mx^3 + gx^2 - x + 3 is divided by x - 1, the remainder is 3. If f(x) is divided by x + 3, the remainder is -1. What are the values of m and g?

2. Relevant equations

Remainder Theorum/Factor Theorum

3. The attempt at a solution

Here is what I did:

f(x)=mx^3+gx^2-x+3

x -1 remainder = 3

3=m(1)^3+g(1)^2-(1)+3
3=m+g-1+3
1=m+g

x + 3, remainder = -1

-7=m(-3)^3+g(-3)^2-(-3)+3
-7=-27m+9g+3+3
-----------------------

Past that point is where I start getting fractions to my answers which don't lead me anywhere close to my answer. Where did I make a mistake and how can I solve it?

2. Sep 15, 2014

### LCKurtz

Shouldn't those -7's be -1's? And I think the (small) fractions you get will work.

3. Sep 16, 2014

### Emperor

Yeah, I messed up the equation:

-1=m(-3)^3+g(-3)^2-(-3)+3
-1=-27m+9g+3+3

collect like terms:

-7=-27m+9g

-1=(-27/7)n - (-9/7)g

As you can see I end up with some strange numbers. I never got the correct answer with them so I assume they're wrong. And yet, there's no possible way I can get a -9 or even a -3 to factor those numbers.

Last edited: Sep 16, 2014
4. Sep 16, 2014

### LCKurtz

You have $m+g=1$ and $-27m+9g = -7$. Two equations and two unknowns. Just solve them.