solve() could be doing something like this to filter out the
parametric solution for x given the real assumption on x
>>> x, y = symbols('x y', real=True)
>>> solve(x**2 + y**2, [x, y])
[(-I*y, y), (I*y, y)]
>>> solve(Eq(I*y, re(I*y)), y)
[0]
>>> (I*y).subs(y, 0)
0
I don't know if it would work in more general cases.
Aaron Meurer
On Tue, Jan 21, 2020 at 11:47 AM Aaron Meurer <[email protected]> wrote:
>
> I'm not sure if it's supported. Normally to get solve() to return only
> real solutions you set real=True on the variables. But it doesn't seem
> to handle this case. It only wants to give the solutions [(-I*y, y),
> (I*y, y)].
>
> Aaron Meurer
>
> On Tue, Jan 21, 2020 at 7:00 AM Jisoo Song <[email protected]> wrote:
> >
> > It seems that solveset only deals with univariate equation, while solve
> > does not consider the domain.
> >
> > How can I get x==0 & y==0 by solving x**2 + y**2 == 0 in real domain?
> >
> > --
> > You received this message because you are subscribed to the Google Groups
> > "sympy" group.
> > To unsubscribe from this group and stop receiving emails from it, send an
> > email to [email protected].
> > To view this discussion on the web visit
> > https://groups.google.com/d/msgid/sympy/0301ee79-b3be-48ef-8740-b771640126b1%40googlegroups.com.
--
You received this message because you are subscribed to the Google Groups
"sympy" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/sympy/CAKgW%3D6KzHup%2BrhCoTENmfkP2fAEa4_SRHAjf8D_s9XPt5cNp6g%40mail.gmail.com.