Opened 7 years ago

Last modified 3 months ago

#18488 new defect

solve ignores conjugate

Reported by: rws Owned by:
Priority: major Milestone: sage-9.5
Component: symbolics Keywords: solve, conjugate, maxima, wrong result
Cc: slelievre, zimmerma Merged in:
Authors: Reviewers:
Report Upstream: N/A Work issues:
Branch: Commit:
Dependencies: Stopgaps:

Status badges

Description (last modified by slelievre)

Results of solving with solve can be wrong due to conjugate being ignored.

This is due to a Maxima bug.

sage: eq_a = conjugate(z) == I + 1
sage: eq_a
conjugate(z) == (I + 1)
sage: sol_a = solve(eq_a, z, solution_dict=True)
sage: sol_a
[{z: I + 1}]

This is obviously wrong.

sage: [eq_a.subs(s) for s in sol_a]
[(-I + 1) == (I + 1)]

Note that SymPy does not return a wrong answer, but does not solve either:

sage: sol_aa = solve(eq, z, solution_dict=True, algorithm='sympy')
sage: sol_aa
ConditionSet(z, Eq(conjugate(z) - 1 - I, 0), Complexes)

Maybe solve should work around the Maxima conjugate bug.

Initial report and discussion:

Reported again at #30570.

Related:

Change History (5)

comment:1 Changed 15 months ago by slelievre

  • Cc slelievre zimmerma added
  • Description modified (diff)
  • Keywords solve conjugate maxima wrong result added
  • Milestone changed from sage-6.8 to sage-9.2

comment:2 Changed 15 months ago by slelievre

  • Description modified (diff)

The "sage-support" discussion gives excerpts of posts to the "maxima" mailing list.

A workaround discussed there consists in working with real and imaginary parts and solving for those.

comment:3 Changed 13 months ago by mkoeppe

  • Milestone changed from sage-9.2 to sage-9.3

comment:4 Changed 7 months ago by mkoeppe

  • Milestone changed from sage-9.3 to sage-9.4

Moving to 9.4, as 9.3 has been released.

comment:5 Changed 3 months ago by mkoeppe

  • Milestone changed from sage-9.4 to sage-9.5
Note: See TracTickets for help on using tickets.