Take the 2-minute tour ×
Mathematica Stack Exchange is a question and answer site for users of Mathematica. It's 100% free, no registration required.

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.

share|improve this question
    
You can use ComplexExpand. –  b.gatessucks Dec 13 '12 at 16:06
    
I don't really see how this simplifies the procedure. –  tst Dec 13 '12 at 16:11
    
Was trying to think more generally; will try to prepare an example. –  b.gatessucks Dec 13 '12 at 16:24
add comment

2 Answers 2

up vote 8 down vote accepted

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.

share|improve this answer
    
Well I have no idea why, I just checked and it works fine. I feel stupid now. –  tst Dec 13 '12 at 16:16
    
You might need to use some additional conditions, such as specifying that z is an element of Complex... –  tkott Dec 13 '12 at 17:32
add comment

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))}} *)
share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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