I need to find the equation for the rational function $f$ with the following properties:
Vertical asymptotes at $x = -4$ and $x = -1$.
$x$-intercepts at $(1, 0)$ and $(5, 0)$
A $y$-intercept at $(0, 7)$
I have tried a trial and error approach to this question, but I haven't found one that works.
Vertical asymptotes in the graph of a rational function are indicated by the roots of the denominator, so your rational function might look like $$ f(x) = \frac{\text{something}}{(x+4)(x+1)}\,.$$ Then the roots of the numerator indicate the $x$-intercepts, so maybe it's $$ f(x) = \frac{(x-1)(x-5)}{(x+4)(x+1)}\,.$$ But then you need the point $(0,7)$ to be a solution to your rational function, so just scale it by some $a$ that makes $(0,7)$ a solution: $$ 7 = a\frac{(0-1)(0-5)}{(0+4)(0+1)}\,.$$ Solving this for $a$, we see that the function $$ f(x) = \frac{28(x-1)(x-5)}{5(x+4)(x+1)}$$ satisfies your requirements.