Ask Your Question

Revision history [back]

Variables in Sage

I started using sage today and I encountered sime strange errors:

I declared variables a,b,c,d using var('a,b,c,d'). When I tried to expand ($a^2+b^2)(c^2+d^2)$

(expand($(a^2+b^2)(c^2+d^2$)) I got the following result:

$c^4+2c^2d^2+d^4+b^2$,

which is obviously not the correct result. Does anyone know why I got this incorrect andwer?