Ask Your Question

Revision history [back]

Use subs:

sage: p = x^2 - 7*a*x + 5; p.subs(a=5)
x^2 - 35*x + 5
sage: max(p.solve([x]))
x == -1/2*sqrt(1205) + 35/2

Use subs: (wrong solution):

sage: p = x^2 - 7*a*x + 5; p.subs(a=5)
x^2 - 35*x + 5
sage: max(p.solve([x]))
x == -1/2*sqrt(1205) + 35/2