Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Weird solve() problem

I try to solve the equation $$ a^2 + b^2 + 2 a^2 b^2 = c^2 $$ in integers. Using

 var('a,b,c')
assume(a,'integer')
assume(b,'integer')
assume(c,'integer')
solve([a^2 + b^2 + 2*a^2*b^2 == c^2],[a,b,c],solution_dict=True)

gives Pythagorean triples:

{c: t1^2 + t2^2, b: 2*t1*t2, a: t1^2 - t2^2}

which clearly do not satisfy the equation (unless $t_1=t_2$ or $t_2t_2 = 0$). It seems that solve() does not see the term $2a^2b^2$; trying

solve([a^2 + b^2 + 2222*a^2*b^2 == c^2],[a,b,c],solution_dict=True)

gives the same (wrong) result.

Weird solve() problem

I try to solve the equation $$ a^2 + b^2 + 2 a^2 b^2 = c^2 $$ in integers. Using

 var('a,b,c')
assume(a,'integer')
assume(b,'integer')
assume(c,'integer')
solve([a^2 + b^2 + 2*a^2*b^2 == c^2],[a,b,c],solution_dict=True)

gives Pythagorean triples:

{c: t1^2 + t2^2, b: 2*t1*t2, a: t1^2 - t2^2}

which clearly do not satisfy the equation (unless $t_1=t_2$ or $t_2t_2 = 0$). It seems that solve() does not see the term $2a^2b^2$; trying

solve([a^2 + b^2 + 2222*a^2*b^2 == c^2],[a,b,c],solution_dict=True)

gives the same (wrong) result.

UPDATE: The problem does not exist in the newest version (8.1).