Ask Your Question

Revision history [back]

One solution

sage: K.<I> = QuadraticField(-1)
sage: R.<z> = K[]
sage: S.<x> = R[]
sage: q = x**2 - z**2 * I
sage: q.discriminant()
4*I*z^2

The default I in Sage is (for now) a symbolic expression.