The question :
"Find the equation of quadratic function that value positive for $-7 < x < 1$ and the distance of vertex and origin is 5"
I've just tried to let $-7$ and $1$ are the $x$-intercepts, however, nothing works. Could someone help me, please?
You can use vertex form of the quadratic function which is given by,
$y - k = a(x-h)^2$.
Given $y$ is positive for $-7 \lt x \lt 1$, we take these points where the function $y$ turns from positive to negative.
Equating $y$ to zero, we have $x = h \pm \sqrt{-\frac {k}{a}}$
Solving, $h - \sqrt{-\frac {k}{a}} = - 7$ and $h + \sqrt{-\frac {k}{a}} = 1$
$h = -3, -\frac{k}{a} = 16$
As $h^2 + k^2 = 25, k = \pm4$ We know the function is positive for $x \in (-7,1)$ so $k = 4$.
$a = -\frac{1}{4}$.
The equation of quadratic is $y = -\frac{1}{4} (x+3)^2 + 4$