4
$\begingroup$

I have to solve an equation of the type $$a z+b \overline{z}=c$$ with $a,b,c\in\mathbb{C}$.

My approach is to set $F(z)=a z+b \overline{z}-c$ transform $z$ to $x+i y$ and then get a real linear system by assuming $x,y\in\mathbb{R}$ and solve

$$\frac{F(x+i y)+\overline{F(x+i y)}}{2}=0$$ $$\frac{F(x+i y)-\overline{F(x+i y)}}{2i}=0.$$

My problem is that this has to happen a lot for a program that I am writing and I was wondering if there is a faster way to do that. It would be ideal if mathematica can solve these linear systems directly.

$\endgroup$
3
  • $\begingroup$ You can use ComplexExpand. $\endgroup$ Commented Dec 13, 2012 at 16:06
  • $\begingroup$ I don't really see how this simplifies the procedure. $\endgroup$
    – tst
    Commented Dec 13, 2012 at 16:11
  • $\begingroup$ Was trying to think more generally; will try to prepare an example. $\endgroup$ Commented Dec 13, 2012 at 16:24

2 Answers 2

8
$\begingroup$

Why not just the following?

Solve[a z + b Conjugate[z] == c, z]

Or, if you prefer separating real and complex parts:

Solve[a (x + I y) + b (x - I y) == c, {x, y}]

Or, if you want to worry about degenerate cases, replace Solve above by Reduce in each form.

$\endgroup$
2
  • $\begingroup$ Well I have no idea why, I just checked and it works fine. I feel stupid now. $\endgroup$
    – tst
    Commented Dec 13, 2012 at 16:16
  • $\begingroup$ You might need to use some additional conditions, such as specifying that z is an element of Complex... $\endgroup$
    – tkott
    Commented Dec 13, 2012 at 17:32
3
$\begingroup$

As per comment, can use ComplexExpand. Here is one way to go about that.

Solve[
 ComplexExpand[{Re[a*z + b*Conjugate[z] - c], 
    Im[a*z + b*Conjugate[z] - c]}, {a, b, c, z}] == 0, {Re[z], Im[z]}]

(* {{Re[
    z] -> -((-Im[a] Im[c] + Im[b] Im[c] - Re[a] Re[c] + Re[b] Re[c])/(
    Im[a]^2 - Im[b]^2 + Re[a]^2 - Re[b]^2)), 
  Im[z] -> -((-Im[c] Re[a] - Im[c] Re[b] + Im[a] Re[c] + 
     Im[b] Re[c])/(Im[a]^2 - Im[b]^2 + Re[a]^2 - Re[b]^2))}} *)
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.