krs56
(Karthik Subramaniam)
July 26, 2019, 1:58pm
1
Hi,
I want to solve the following equations:
0.38 + 0.28j=x+((?0.31 + 0.54j)^2y)/(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?
fkampas
(Frank Kampas)
July 26, 2019, 2:54pm
2
Functions like Solve and NSolve assume the variables are complex unless told otherwise
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}]
krs56
(Karthik Subramaniam)
July 27, 2019, 3:33pm
4
This is exactly what I was looking for. Thank you so much Rohit.