from sympy import *

a, b, c = symbols('a b c')
x1, x2, x3, y1, y2, y3 = symbols('x1, x2, x3, y1, y2, y3')

eqs = [
    a*x1**2 + b*x1 + c - y1,
    a*x2**2 + b*x2 + c - y2,
    a*x3**2 + b*x3 + c - y3
]

abc = solve(eqs, (a, b, c))

print(jscode(abc[a]))
print(jscode(abc[b]))
print(jscode(abc[c]))

x = symbols('x')

min_x = solve(diff(a*x**2 + b*x + c, x), x)
print(min_x)
	

If you have found a bug, please report it at the Codeberg project page.

If you have a suggestion or a question, please write Oleksandr Kaleniuk, Ph. D., Senior lecturer at DTE / IATE / ISKPI.