ASKSAGE: Sage Q&A Forum - RSS feedhttps://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Fri, 04 May 2018 19:10:56 +0200Solve a systemhttps://ask.sagemath.org/question/42255/solve-a-system/ Why this command doesn't give me any solution :
solve([2*x+y==0,x-2*y==1],x)
I suppose because, there is an unique solution and x doesn't depend on y.
___________________________________________
Now I would like to know when we solve an equation such that $$f(z)= 0\iff Re(x)+iIm(x)=0 $$ with $z=x+iy$ and $f(z)=5z-i\overline{z}^2+3+2i$
real(x)=-2*x*y + 5*x + 3
im(x) = -x^2 + y^2 + 5*y + 2
solve([real(x)==0, im(x)==0], x)
**Is this command the right one to solve this problem ?**
Fri, 04 May 2018 18:27:50 +0200https://ask.sagemath.org/question/42255/solve-a-system/Answer by calc314 for <p>Why this command doesn't give me any solution :</p>
<pre><code> solve([2*x+y==0,x-2*y==1],x)
</code></pre>
<p>I suppose because, there is an unique solution and x doesn't depend on y. </p>
<hr>
<p>Now I would like to know when we solve an equation such that $$f(z)= 0\iff Re(x)+iIm(x)=0 $$ with $z=x+iy$ and $f(z)=5z-i\overline{z}^2+3+2i$</p>
<pre><code>real(x)=-2*x*y + 5*x + 3
im(x) = -x^2 + y^2 + 5*y + 2
solve([real(x)==0, im(x)==0], x)
</code></pre>
<p><strong>Is this command the right one to solve this problem ?</strong></p>
https://ask.sagemath.org/question/42255/solve-a-system/?answer=42257#post-id-42257For the first `solve` question, you need to specify that you are solving for x and y.
solve([2*x+y==0,x-2*y==1],[x,y])
For the second question, you can do the following:
var('x y')
assume(x,'real')
assume(y,'real')
z=x+i*y
f=5*z-i*conjugate(z)^2+3+2*i
solve([f.real(),f.imag()],[x,y])Fri, 04 May 2018 19:10:56 +0200https://ask.sagemath.org/question/42255/solve-a-system/?answer=42257#post-id-42257