# How to solve complex simultaneous equations in mathematica?

**URL:** <https://community.wolfram.com/t/how-to-solve-complex-simultaneous-equations-in-mathematica/14519>\
**Category:** Questions\
**Created:** [July 26, 2019, 1:58pm UTC](https://community.wolfram.com/t/how-to-solve-complex-simultaneous-equations-in-mathematica/14519 "2019-07-26T13:58:36Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![krs56](https://avatars.discourse-cdn.com/v4/letter/k/ecc23a/32.png) [@krs56](https://community.wolfram.com/u/krs56)\
**Post date:** [July 26, 2019, 1:58pm UTC](https://community.wolfram.com/t/how-to-solve-complex-simultaneous-equations-in-mathematica/14519/1 "2019-07-26T13:58:36Z")

</div>

Hi,

I want to solve the following equations:

0.38 + 0.28j=x+((?0.31 + 0.54j)^2_y)/(1-y^2)  
0.38 + 0.27j=y+((?0.31 + 0.54j)^2_x)/(1-x^2)

where both x and y are complex numbers. Thus in reality there are 4 equations and 4 variables to be found (each equation has a real and imaginary part as does each variable). Does anyone know how to do this in Mathematica?

---

<div class="post-metadata">

**Author:** ![fkampas](https://yyz1.discourse-cdn.com/wolfram/user_avatar/community.wolfram.com/fkampas/32/41217_2.png) [@fkampas](https://community.wolfram.com/u/fkampas)\
**Post date:** [July 26, 2019, 2:54pm UTC](https://community.wolfram.com/t/how-to-solve-complex-simultaneous-equations-in-mathematica/14519/2 "2019-07-26T14:54:35Z")

</div>

Functions like Solve and NSolve assume the variables are complex unless told otherwise

---

<div class="post-metadata">

**Author:** ![rohitnamjoshi](https://avatars.discourse-cdn.com/v4/letter/r/f1d935/32.png) [@rohitnamjoshi](https://community.wolfram.com/u/rohitnamjoshi)\
**Post date:** [July 27, 2019, 2:04am UTC](https://community.wolfram.com/t/how-to-solve-complex-simultaneous-equations-in-mathematica/14519/3 "2019-07-27T02:04:04Z")

</div>

Hi Karthik,

Is this what you are looking for?

```
eq1 = 0.38 + 0.28 I == x + ((-0.31 + 0.54 I)^2*y)/(1 - y^2);
eq2 = 0.38 + 0.27 I == y + ((-0.31 + 0.54 I)^2*x)/(1 - x^2);
NSolve[eq1 && eq2, {x, y}]

(* 
{{x -> 1.00892 - 0.244074 I, 
  y -> 1.01236 - 0.242929 I}, {x -> -0.906078 + 0.107832 I, 
  y -> -0.905534 + 0.107027 I}, {x -> 0.27659 + 0.415833 I, 
  y -> 0.273741 + 0.406312 I}, {x -> 1.10103 + 0.0882231 I, 
  y -> -1.03967 - 0.268297 I}, {x -> -1.04307 - 0.269002 I, 
  y -> 1.10111 + 0.0871896 I}}
*)

```

You can also use `Rationalize` and `Solve`

```
eq1 = Rationalize@eq1;
eq2 = Rationalize@eq2;
Solve[eq1 && eq2, {x, y}]

```

---

<div class="post-metadata">

**Author:** ![krs56](https://avatars.discourse-cdn.com/v4/letter/k/ecc23a/32.png) [@krs56](https://community.wolfram.com/u/krs56)\
**Post date:** [July 27, 2019, 3:33pm UTC](https://community.wolfram.com/t/how-to-solve-complex-simultaneous-equations-in-mathematica/14519/4 "2019-07-27T15:33:46Z")

</div>

This is exactly what I was looking for. Thank you so much Rohit.
