Questions about using complex numbers in Mathematica. This includes basic arithmetic, functions of complex numbers, plotting complex functions, and dealing with branch cuts.

learn more… | top users | synonyms (1)

0
votes
1answer
191 views

Why does Mathematica give this ArcSin[2] result?

The code N[ArcSin[2]] evaluates to 1.5708 − 1.31696 I but it should be undefined instead because it is on the branch ...
1
vote
1answer
110 views

Simplify not working for a real part of a complex expression [closed]

When I try to get the real part of a term, for example: $\qquad \Re\left(\frac{e^{-i k} \left(2 k^2+\pi ^2 \left(-1+e^{i k}\right)\right)}{\pi ^2-k^2}\right)$ Mathematica will output the same thing ...
9
votes
2answers
150 views

Problem with Identifying Complex Components

I am trying to isolate out the real and complex terms in a fairly large expression. During the process, I have made several assumptions that last throughout the entire process. ...
7
votes
2answers
239 views

Confusion regarding the incomplete elliptic integral of the first kind

I am trying to manipulate a conformal map from the half-plane to a square $z \rightarrow w(z)$ defined by: $$ w(z) = \int \limits^{z} dx \frac{1}{\sqrt{(1-x^2)x}} = \sqrt{2} \; F\left(\sqrt{z+1},\...
7
votes
2answers
375 views

Exception with GatherBy: gathering complex conjugates

I want to gather the complex-conjugates that are in a list, but with an exception: only if the imaginary part isn't zero. For example: ...
3
votes
1answer
150 views

Exclude one point from the RegionPlot

I'd like to ask you about the way of excluding just one point from this example: ...
3
votes
1answer
94 views

Simplifying an expression with complex variables

The other day I was trying to simplify the following expression of $w \in \mathbb{C}$ and $|w| < 1$: $$f(w) = \left|\frac{2}{(\frac{w+1}{1-w}+1)^2}\right|^{-\Delta} \cdot \frac{1}{\left|{\rm Re}(\...
4
votes
1answer
97 views

FullSimplify on complex numbers seems inconsistent

FullSimplify[c Conjugate[c]] returns Abs[c]^2 while FullSimplify[2 c Conjugate[c]] ...
1
vote
2answers
183 views

Plot $\arg(z)$ in an Argand diagram and display the angle

I'd like to ask you about the way to show the $\arg(z)$ annotation about the angle. My point is to show $\frac{2\pi}{3}$ and $\frac{5\pi}{6}$ on the image. What I mean: Is there any way to ...
0
votes
1answer
101 views

How to plot two lists in the same graph maintaining the scale of the points?

I need to plot two lists of complex numbers in the same graph to show some results, so I'm using the following lists to do that: ...
3
votes
0answers
111 views

Schwarz-Christoffel toolbox [closed]

Is there a toolbox for working with Schwarz-Christoffel transformations in Mathematica? More generally, is there a toolbox for visualizing conformal mappings in the complex plane? There are a lot of ...
1
vote
1answer
76 views

About taking limit of an integral on Wolfram Alpha/Mathematica [closed]

I tried computing this quantity on Wolfram Alpha, but I couldn't get any answer: ...
3
votes
1answer
164 views

Why `Chop` does not make the real part of machine complex numbers an exact zero? [duplicate]

The documentation says Chop does not make the real part of machine complex numbers an exact zero: In[2]:= Chop[10.^-12 + 2. I] Out[2]= 0. + 2. I Why does ...
1
vote
2answers
206 views

How would you calculate a contour integral? [duplicate]

How would you be able to calculate a contour integral of 1/(((z-1)^2)*(z-i)) over the contour |z-1| = 1? Not sure how to type ...
1
vote
2answers
104 views
0
votes
2answers
176 views

Simplifying complex fractions

How can I simplify a complex fraction in order to get something of the shape (a + I b)/(c + I d)? Note that I would not like Mathematica to further simplify it ...
2
votes
3answers
475 views

Plot Two Circles and color their difference

I am trying to plot two circles with radius 1 and another with radius 9. Both are centered at $(0,-1)$. I then want to color in the distance between the circle of radius 9 and the circle of radius 1. ...
2
votes
4answers
322 views

Defining a General Complex Number

I am trying to compute the Complex conjugate of two complex numbers multiplied together. However, when I go to define my complex numbers as $a+b I$ and $c+dI$ it does not like $b$ and $d$ because they ...
2
votes
2answers
191 views

Finding extremums of Abs[complex function]

We have a function same as f[x_]=Cos[x] Cos[2 x] + I Sin[x] Sin[2 x] The final objective is to find all extremums of Abs[f[x]] in [0,2 pi]. But in the first ...
1
vote
1answer
162 views

Solve for when two symbolic complex numbers are equal

I'd like Mathematica to to show that two complex numbers $a + b i$ and $c + d i$ (with real coefficients $a, b, c, d$) are equal if and only if $a = c$ and $b = d$. The obvious thing does not quite ...
3
votes
3answers
183 views

How to test if elements of an array are real or complex?

I am new to Mathematica and I have to select the elements in an array that only contain real numbers and eliminate the ones that have complex parts. Basically the code that I have is an array of ...
4
votes
3answers
175 views

My evaluation is taking a lot of time

I was evaluating the roots of a transcendental equation, when I noticed that Mathematica never finishes but stays in the running state. The following is the code that I was using: ...
2
votes
0answers
61 views

Solving a differential equation with a complex (independent) varible

I'm trying to plug in complex values in the numerical solutions of ODEs without success. For instance y[I] /. NDSolve[{y'[x] == 0, y[0] == 3}, y, {x, -10, 10}] ...
2
votes
1answer
124 views

How to solve coupled complex-valued equations faster and get simplified solution

I have six coupled equations. How to solve these equations symbolically faster in Mathematica. In these equations, variables p,q,x,y are ...
4
votes
1answer
85 views

Returning all branches of a multiple-valued function

This question and answer was inspired by this closed as duplicate question. One possible definition of the n-th order root of x ...
3
votes
1answer
243 views

Derivative of conjugate multivariate function

I have a problem with Mathematica, taking the derivative of the conjugate of some function. I know that a similar question has been posed before here, but the solution did not work for multivariate ...
2
votes
1answer
76 views

Mathematica does not distribute conjugation when used with Assuming sometimes?

If I input: Assuming[$x_{-} \in$ Reals, FullSimplify[Conjugate[$e^{i x_1}x_2$]]] Then the output is: $e^{-ix_1}x_2$ As it should be. And if instead I do: Assuming[$x_{-} \in$ Reals, FullSimplify[...
1
vote
0answers
48 views

How do you force Mathematica to list all values of some multi-valued complex function at some point? [duplicate]

Let's say I have a complex-valued function $f(z) = \sqrt{z}$. When I plug $z = 1$ into it, it returns 1. I need it to return a list $\{-1,1\}$. Is it possible to force Mathematica to do that? I know ...
0
votes
0answers
23 views

Plotting a dispersion curve with complex wavevectors [duplicate]

I want to reproduce a dispersion curve from P. Zou's thesis found here: http://www.ipd.anl.gov/anlpubs/2001/06/39620.pdf on Pg. 31, Eq. 2.13. The problem is, the code below only gives values for the ...
4
votes
2answers
140 views

Reading from a file: complex number with small imaginary part

I'm trying to read a matrix from the next file: 1+1e-18i 24 42 23.43e-23i using u=Import["file.dat","Table"]; and then find, ...
2
votes
0answers
129 views

Evaluating Real and Imaginary parts in a dispersion equation via ContourPlot [closed]

I want to reproduce a dispersion curve from P. Zou's thesis found here: http://www.ipd.anl.gov/anlpubs/2001/06/39620.pdf on Pg. 31, Eq. 2.13. The problem is, the code below only gives values for the ...
5
votes
2answers
608 views

Order of a pole

Is there a simple way to determine the order of the poles of a rational function? I have a difficult function where I need Mathematica to find the poles. It would be interesting to also know what the ...
0
votes
2answers
44 views

Equality of expressions containing complex numbers [closed]

I am using Mathematica to test the equivalence of symbolic expressions. I run into what appears to be a bug when I test the equivalence of expressions involving an imaginary number taken to a complex ...
0
votes
2answers
83 views

Summing complex numbers

Maybe it is a very stupid question but I am having trouble with summing complex numbers in Mathematica. I have q = l1 E^(2 π I t1) + l2 E^(2 π I t2) where ...
3
votes
2answers
182 views

How to declare a function as real in order to get rid of Conjugate in front of the expressions?

I have a complicated complex function containing some other ones that are real, f=f(A,B,C,...) ,where A=A(r) and it is real, for ...
0
votes
0answers
40 views

Please explain this unexpected code snippet behavior [duplicate]

Consider a function that maps a complex function z->f(z) to it's multivariable counterpart (x,y)->f(x,y) ...
3
votes
1answer
189 views

Factoring the imaginary unit

Suppose you have this: Collect[2 u + I + 2 + I,I] It gives the same. Is it possible to factor I in elegant way (not manually)...
3
votes
0answers
54 views

Why does FreeQ seem not to work with complex numbers?

I guess I do not understand how Mathematica evaluates this simple expression inside FreeQ ...
2
votes
2answers
168 views

Plotting a set of points given by a complex expression [closed]

A have the set consisting of the complex numbers $1+3r \cosθ−ir \sinθ$, where $r∈[0,1]$ and $θ$ may vary between $0$ and $2π$. This is my first encounter with Mathematica, and am having difficulty ...
7
votes
1answer
143 views

How to calculate residues using different branches of the logarithm

My goal is to be able to compute the residues of something like $z^{\alpha} R(z)$ where $0 < \alpha < 1$, $R(z)$ is rational, and the exponential can be chosen with any branch. I found a way to ...
4
votes
2answers
258 views

Analytic expression for a Complex Hilbert Transform in Mathematica

I need to solve the following integral equations for a problem I'm working on - $\frac{-i}{2 \pi}$ $\int_{-a}^{a} \mathrm{dt}\,\, \frac{e^{i k t}}{t + i \tau}$ and $\frac{-i}{2 \pi}$ $\int_{a}^{\...
2
votes
1answer
201 views

How can I find all solutions of a complicated expression in a desired interval with Mathematica?

I have an expression which is a combination of Bessel functions: ...
6
votes
1answer
231 views

Confirming conservation laws for complex valued functions

Consider the nonlinear Schrödinger equation (I would like to do this for a more complicated set of equations, but to gain understanding I'll consider this simplified case) $$A_t+iA_{xx}+i|A|^2A =0,$$ ...
0
votes
3answers
136 views

Plotting complex function

(9 Tanh[x]^8 (1 - 2 Tanh[x]^2)^2 (1 - Tanh[x]^2))/(1 + 3 I Sqrt[2/13])^2 How can I plot the function with the range of x {-10,10}?
4
votes
2answers
283 views

Drawing contour integral diagrams

I am $\TeX$ writing notes on complex analysis, I need to use figures of contour paths to integrate on them, how can I plot them on Mathematica, something like this adding also the $\gamma_R$ ...
2
votes
1answer
81 views

Wrong result after Simplify of a complex variable with assumptions satisfying an inequality

Using Mathematica 10,Simplify[a\[Conjugate], Assumptions -> {(a + a\[Conjugate]) > 0}] returns a, i.e. treats ...
3
votes
0answers
126 views

Discrepancy in the series expansion of $\log(z/(z-1))$ in Mathematica 5

When I calculate the series expansion of $\log\frac{z}{z-1}$ around $0$ in Mathematica 5.2, I obtain: ...
0
votes
1answer
101 views

Applying ReplaceAll to I (imaginary unit) [closed]

Why does I/.I->-I return -I but Exp[-I]/.I->-I yields ...
0
votes
1answer
68 views

Compute and Plot the element of a complex sequence

I'm new tho mathematica. I have a complex sequence ${z_n}$ with $z_0:=c$ $z_{n+1}=(z_n)^2+c$ for all $n\in N$ where c is some complex number, I need to plot the first 20 terms of this sequence ...