Wzory :
y = ax² + bx + c — postać ogólna
y = a(x - p)² + q — postać kanoniczna
p = -b/2a
q = -∆/4a
∆ = b² - 4ac
a)
f(x) = x² - x - 1
a = 1, b = -1, c = -1
∆ = (-1)² - 4 * 1 * (-1) = 1 + 4 = 5
p = (-(-1))/(2 * 1) = 1/2
q = -5/(4 * 1) = -5/4 = -1,25
f(x) = (x - 1/2)² - 1,25
b)
f(x) = -2x² + 4x + 6
a = -2, b = 4, c = 6
∆ = 4² - 4 * (-2) * 6 = 16 + 48 = 64
p = -4/(2 * (-2)) = -4/-4 = 1
q = -64/(4 * (-2)) = -64/-8 = 8
f(x) = -2(x - 1)² + 8