P, Q, S, T = symbols('P Q S T')
c, y_0, y_c, dy_0, dy_c = symbols('c y_0 y_c dy_0 dy_c')
eq_y = (P * x + Q - y(x)) ** 2 + S * x + T
eq_dy = eq_y.diff(x)
equations = [eq_y.subs([(x, 0), (y(0), y_0), (y(x).diff(x).subs(x, 0), dy_0
    )]), eq_dy.subs([(x, 0), (y(0), y_0), (y(x).diff(x).subs(x, 0), dy_0)]),
    eq_y.subs([(x, c), (y(c), y_c), (y(x).diff(x).subs(x, c), dy_c)]),
    eq_dy.subs([(x, c), (y(c), y_c), (y(x).diff(x).subs(x, c), dy_c)])]
solve(equations, P, Q, S, T)
Как решить нелинейное уравнение в Sympy?