#30570 closed defect (duplicate)
wrong result of solve
Reported by: | zimmerma | Owned by: | |
---|---|---|---|
Priority: | major | Milestone: | sage-duplicate/invalid/wontfix |
Component: | calculus | Keywords: | solve, conjugate, maxima |
Cc: | slelievre | Merged in: | |
Authors: | Reviewers: | ||
Report Upstream: | N/A | Work issues: | |
Branch: | Commit: | ||
Dependencies: | Stopgaps: |
Description (last modified by )
[Closed as duplicate of #18488.]
Reported by Alexandre Casamayou (checked with Sage 9.1 and Sage 9.2.beta12):
sage: z = SR.var('z') sage: expr_a = i*z^2 - 2*conjugate(z) + 2 - i sage: sol_a = solve(expr_a, z, solution_dict=True) sage: sol_a [{z: -2*I - 1}, {z: 1}]
The first listed solution is wrong:
sage: [expr_a.subs(s) for s in sol_a] [-8*I, 0]
The issue is that solve
ignores conjugate
. Compare:
sage: expr_b = i*z^2 - 2*z + 2 - i sage: sol_b = solve(expr_b, z, solution_dict=True) sage: sol_b [{z: -2*I - 1}, {z: 1}] sage: [expr_b.subs(s) for s in sol] [0, 0]
Change History (5)
comment:1 Changed 7 months ago by
- Cc slelievre added
- Description modified (diff)
- Keywords solve conjugate maxima added
comment:2 Changed 7 months ago by
- Milestone changed from sage-9.2 to sage-duplicate/invalid/wontfix
- Status changed from new to needs_review
Duplicate of #18488.
comment:3 Changed 7 months ago by
- Status changed from needs_review to positive_review
I agree this is a duplicate. Sorry.
comment:4 Changed 7 months ago by
- Description modified (diff)
- Resolution set to duplicate
- Status changed from positive_review to closed
No problem, thanks for reporting, better twice than not. Duplicate tickets are cheap and easy to close.
I found the other ticket using Trac's query engine:
- tickets whose summary contains "solve": https://trac.sagemath.org/query?order=id&desc=1&summary=~solve
- then search for "conjugate" (with ctrl-F) in the page of results
The reverse works too:
- tickets whose summary contains "conjugate": https://trac.sagemath.org/query?order=id&desc=1&summary=~conjugate
- then search for "solve" (with ctrl-F) in the page of results
Otherwise searching for "solv" or "conjugat" would also catch solving, conjugation...
comment:5 Changed 7 months ago by
- Description modified (diff)
Note: See
TracTickets for help on using
tickets.
It turns out
solve
ignoresconjugate
.