Sin function with complex number

As you can see in the picture, I want to know the complex solution Z when Sin(Z)=2, and the answer is shown in the picture, however, I can’t figure it out how can I get the right answer with Mathematica,can someone help me? Thanks.

The equation has infinitely many solution. What do you expect as “the right answer”? Do you need to isolate two of the solutions? Here is a couple of ways:

Solve[Sin[z] == 2, z] /. C[1] -> 0
Solve[Sin[z] == 2 && Abs[z] < 3, z]

Sin function with complex number.

Ok, here is a way:

Solve[Sin[z] == 2 && Abs[z] < 3, z] // ComplexExpand

Oh thank you, I have 2 more question:1.whats the different of using Complexes and ComplexExpand?2.what does [/. C[1] → 0] means or does? thanks again.

Complexes is the set of the complex numbers. When used inside Solve it means that you seek complex solutions. Usually it is the default, and you don’t need ti specify it.

ComplexExpand is a command to try and rewrite complex numbers into separate real and imaginary parts. For example

In[15]:= ComplexExpand[Exp[Pi I/3]]

Out[15]= 1/2 + (I Sqrt[3])/2

Finally, /. C[1] -> 0 is a replacement rule to replace all occurrences of C[1] with 0.

Thanks, you really help a lot :slight_smile: