# Thread: Trouble understanding "Write a function" answer

1. ## Trouble understanding "Write a function" answer

I have a problem that states,"Write a rational function $f$ having a vertical asymptote $x = 2$, a horizontal asymptote $y = 0$, and a zero at $x = 1$

My solution was $f(x) = \frac{x-1}{(x-2)^2}$

The answer in the book was "One possible answer is $f(x) = \frac{x-1}{(x-2)(x^2+1)}$"

My first question: Is my answer correct?

My second question: Why would I need the additional term of $(x^2+1)$ in the denominator other than to create a higher degree term? It seems I accomplished the same goal by squaring the $x-2$ without introducing a term that cannot produce a zero (because it would be a complex number).

2. ## Re: Trouble understanding "Write a function" answer

Yours seems to work as well.