Opened 2 years ago

Closed 2 years ago

Last modified 2 years ago

# wrong result of solve

Reported by: Owned by: zimmerma major sage-duplicate/invalid/wontfix calculus solve, conjugate, maxima slelievre N/A

### Description (last modified by slelievre)

[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]
```

### comment:1 Changed 2 years ago by slelievre

• Cc slelievre added
• Description modified (diff)
• Keywords solve conjugate maxima added

It turns out `solve` ignores `conjugate`.

### comment:2 Changed 2 years ago by slelievre

• Milestone changed from sage-9.2 to sage-duplicate/invalid/wontfix
• Status changed from new to needs_review

Duplicate of #18488.

### comment:3 Changed 2 years ago by zimmerma

• Status changed from needs_review to positive_review

I agree this is a duplicate. Sorry.

### comment:4 Changed 2 years ago by slelievre

• 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:

The reverse works too:

Otherwise searching for "solv" or "conjugat" would also catch solving, conjugation...

### comment:5 Changed 2 years ago by slelievre

• Description modified (diff)
Note: See TracTickets for help on using tickets.