At the vertex, the slope is zero, i.e., f'(x) = 0.
f(x) = ax^2 + bx + c
f'(x) = 2ax + b
The vertex is (3, 7), so we have:
f'(x) = 0
2a(3) + b = 0
6a + b = 0
b = -6a --- (1)
Substituting (1) into f(x), we have:
f(x) = ax^2 + (-6a)x + c
f(x) = ax^2 - 6ax + c --- (2)
(3, 7) is on the function curve, so we have:
7 = a(3^2) - 6a(3) + c
7 = 9a - 18a + c
7 = -9a + c
c = 7 + 9a --- (3)
Substituting (3) into (2), we have:
f(x) = ax^2 - 6ax + 7 + 9a --- (4)
(5, -9) is also on the function curve, so we have:
-9 = a(5^2) - 6a(5) + 7 + 9a
-9 = 25a - 30a + 7 + 9a
-9 - 7 = -5a + 9a
4a = -16
a = -16 / 4
a = -4
Substituting a = -4 into (1), we have:
b = -6(-4)
b = 24
Substituting a = -4 into (3), we have:
c = 7 + 9(-4)
c = 7 - 36
c = -29
Hence, the function is f(x) = -4x^2 + 24x - 29