Skip to content
DeepForgeby svx
All problems
EasyOptimizationop-277

Quadratic Minimum Value

Problem

For f(x) = a x^2 + b x + c with a > 0, the minimizer is x* = -b / (2a) and the minimum value is c - b^2 / (4a).

Given a, b, and c, return the minimum value.

Hint

Complete the square or substitute the vertex into f.

Test cases

case 1
in: [1,2,3]
expected: 2
case 2
in: [2,-4,1]
expected: -1
case 3
in: [0.5,1,0]
expected: -0.5
Starter codePython
def quadratic_minimum_value(a, b, c):
    # Your code here
    pass

3 test cases · run your code against them in the editor