# Find a rational function $f(x)$ with H. asymptote of y=2, V. asymptotes at x=-3, x=3 and a y-intercept at $\frac{-2}{3}$

So first I multiplied the V. Asymptotes like so, $$(x+3)(x-3)$$ to get $$(x^2-9)$$

And knowing that because the horizontal Asymptote is a non-negative number, that the leading coefficient in the numerator has to be double that of the leading coefficient in the denominator. Meaning it will be $$2$$ along with the same degree value as the denominator.

So up till now I have $$f(x)=\frac{2x^2}{x^2-9}$$

This is where I get stuck because I am not sure how to incorporate the y-intercept.

You can use $$f(x)=\frac{2x^2+c}{x^2-9}$$ and then use $$x=0$$ to get $$f(0)=\frac{c}{-9}=\frac{-c}{9}=\frac{-2}{3}$$ or $$c=6$$.

So you get $$f(x)=\frac{2x^2+6}{x^2-9}$$

More generally, you can use:

$$f(x)=\frac{2x^2+bx+6}{x^2-9}$$ where $$b\neq \pm 8.$$ (When $$b=\pm 8$$ you lose one of the vertical asymptotes.)

You are on the right track. Note that when you have $$x=0$$ in your current function, the value of the function is also $$0$$ hence we can just have $$f(x)=-\frac23+\frac{8x^2}{3(x^2-9)}$$ Because the constant term gives the $$y$$-intercept, but the factor ahead of the rational term must also be changed to keep the same horizontal asymptote.

Your current function -- call it $$g(x)$$ -- has $$g(0)=0$$ and horizontal asymptote $$y=2$$.

To get a function with $$f(0)=-\frac23$$ and keep the horizontal asymptote $$y=2$$,

you can stretch $$g(x)$$ in the vertical direction so a distance of $$2$$ becomes $$2+\frac23$$,

and then translate down by $$-\frac23$$ so $$f(0)=-\frac23$$. That is, $$f(x)=\frac{8/3}2g(x)-\frac23.$$