the solution is:
(2x) / (x+1)
the graph that is generated looks like this:
the table that could be generated looks like this:
x y = (2x) / (x+1)
-2 4
-1 undefined
0 0
1 1
2 4/3
since the vertical asymptote was at -1, the denominator of the graph had to be some for of x + 1 because then -1 + 1 = 0 and the graph is undefined at that point.
the numerator of the graph had to be the same level as the denominator, because then the graph has a horizontal asymptote at whatever level of y the numerator was at when the value of x goes to infinity.
a recommended method that i learned is that you divide the numerator and the denominator by the highest level exponent. This makes everything that is not important cancel out.
For example:
Assuming the numerator is 2x and the denominator is (x+1), and you want to find the horizontal asymptote, factor out the greatest exponent term.
2x factors out an x.
(x+1) factors out an x.
you are left with:
x * (2) / (x * (1 + 1/x)
now, as x goes to infinity, the numerator stays at 2 and the denominator stays at 1, so the limit of the expression as x goes to infinity is equal to 2.
the solution is part luck and part detective work in finding what the expression could be.
not sure if i would be successful every time, but it worked this time.
some tutorials on the web that may be helpful are:
http://www.wtamu.edu/academic/anns/mps/math/mathlab/col_algebra/col_alg_tut35_polyfun.htm
http://www.wtamu.edu/academic/anns/mps/math/mathlab/col_algebra/col_alg_tut40_ratgraph.htm