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)

2
votes
3answers
104 views

Contour plot of the imaginary portion of a function given the real part is positive

How do I plot the imaginary part of the function while its real part is positive? For example, for the below code I could have the imaginary part but I am not able to find the positive or negative ...
0
votes
2answers
67 views

How to plot in the complex plane? [duplicate]

I am new to Mathematica and I would like to ask how to plot in the complex plane in general. Also, as an example, how do you plot $e^{i\theta}$ in Mathematica? In physics the function $e^{i\theta}$ is ...
5
votes
3answers
144 views

How to tell Mathematica to get the real-only inverse function?

The problem I have is that Mathematica seems to play better with complex numbers so that the result of N[InverseFunction[Function[x,x^3]][-1]] is ...
1
vote
3answers
63 views

replacing complex numbers

I know: I'm going to make a poor showing, but really I can't understand this: a is an expressione whose FullForm is ...
1
vote
2answers
66 views

Imaginary part of complex number, nothing works?

I want to find the imaginary part of the complex number (a+i*b). say I have a function in the following form: ...
3
votes
1answer
70 views

Is there a simple way to get the Conjugate of a complex term, provided all information is available?

I've found a few threads addressing this, but they all seem to have pretty clunky answers, and it's hard to believe there's not a more elegant solution in Mathematica: Remove annoying Conjugate a ...
4
votes
4answers
400 views

Solving complex equations with variable exponents

How would I go about solving $(1+i)^n = (1+\sqrt{3}i)^m$ for integer $m$ and $n$? I have tried ...
1
vote
1answer
49 views
2
votes
1answer
65 views

Can't obtain Real results using NSolve

I am trying to find the critical properties of the Carnahan-Starling equation of state, $$p=\rho R T\frac{1+b\rho /4+(b\rho/4)^2-(b\rho/4)^3}{(1-b\rho /4)^3}-a\rho^2$$ using this system of equations, ...
0
votes
1answer
99 views

Solve this equation explicitly for $\beta$

Solve this equation explicitly for $\beta$: $$T_{12}=\frac{x_{11}+x_{22}}{1+|\beta|^2}\beta$$ $x_{11}$ and $x_{22}$ are positive real numbers where $x_{11}>x_{22}$ and $T_{12}$ and $\beta$ are ...
0
votes
2answers
48 views

Unable to simplify the real part of a complex expression

Simplifying this expression shouldn't be hard. I tried adding assumptions asserting that all involved variables are real, but still the Re expression remains ...
1
vote
2answers
59 views

Complex polynomial variable transformation

I have two real polynomials that depend in variables (xi1, xi2) and parameters (eps, e2). I apply the following ...
2
votes
1answer
69 views

FiniteDifferenceDerivative of complex function in 2D--bug?

I want to compute partial derivatives of complex functions via finite difference approximation on two dimensional grid using NDsolve`FiniteDifferenceDerivative ...
2
votes
0answers
82 views

Evaluating an integral

Here is the input: Integrate[E^(2 I*t)/(2*Pi*(E^(I*t) - z)), {t, 0, 2 Pi}] and here the output: ...
1
vote
0answers
109 views

How do I calculate this integral along a complex line (not a contour) in mathematica?

Given the function: $$f(z) = \frac{\pi ^2 \cot(\pi \sqrt z) \cot(\pi \sqrt {z-a})}{4\sqrt{z^2 - az}}$$ Where a is a positive constant and: $$z = \frac{i}{b} + t $$ $$t>a$$ Where b is also a ...
2
votes
1answer
170 views

Polar color coding for complex function plots?

Having browsed this Q on plotting complex functions and the Zeta page, I don't see anything as nice as this plot from Matilde Marcolli's slides "Geometry and physics of numbers". Looks like ...
0
votes
2answers
87 views

Expression containing $\tt{I}$ is real — how can I show this is so in my notebook?

When I solve this equation (for ϕ): -16 y - (1 + 2 ϕ)^2 (-1 + 6 ϕ) == 0 Two solutions have imaginary parts in the symbolic ...
1
vote
2answers
73 views

Display the list of complex roots returned by Solve in their polar form [duplicate]

If I input: Solve[z^4 == 2 (Cos[2 Pi/3] + I Sin[2 Pi/3])] Mathematica returns: ...
0
votes
0answers
37 views

Using NSolve for Elliptic Equations over Fundamental Parallelogram in Complex Plane

I'm considering solving elliptic functions over a fundamental domain of the torus with half-periods $\omega_{1}=\pi/2$ and $\omega_{2} = \pi \tau /2$, where $\tau$ is the modular parameter of the ...
0
votes
1answer
43 views

Plotting an expression with a complex-valued exponential [duplicate]

Given the wave function $\Psi\left ( x,t \right ) = \psi\left ( x \right )T\left ( t \right )$ with the spatial component of the wavefunction $\psi(x) = \psi_{0}e^{-ikx}$, I tried ...
1
vote
1answer
80 views

Problem with complex conjugation of series data in mathematica 10

ComplexExpand in Mathematica 10 doesn't work with series data: Taylor = Series[Exp[I x], {x, 0, 4}]; ComplexExpand[Taylor\[Conjugate]] gives 1+I x-x^2/2-(I ...
1
vote
2answers
102 views

How can I draw a hyperbola of a complex form

How can I use Mathematica to draw locus of point in complex plane given by $||z-i|-|z+i||=1.$ I have tried few codes, but not succeed.
6
votes
1answer
221 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,$$ ...
2
votes
1answer
87 views
1
vote
1answer
67 views

Integrating sinc function over discontinuity

I would like to analytically integrate the sinc function. First of all, if I just perform the integration the following way, everything is as expected: ...
1
vote
0answers
66 views

Finding consecutive residues of large expression?

I have given a large expression expr (has LeafCount of 2772, you can find it in this file or ...
4
votes
1answer
172 views

Plotting Riemann Surface of $w(z)=\sqrt{1-z^{2}}$

I'm working in the plotting the Riemann surface of two functions, namely: $$ w_{1}(z)=\sqrt{1-z^{2}} \,, $$ and $$ w_{2}(z)=\tanh\left(k\sqrt{1-z^{2}}\right)-2iz\frac{\sqrt{1-z^{2}}}{1-2z^{2}}\,, ...
1
vote
2answers
65 views

Translating syntax of a pure function

I have a matrix in complex exponential form. I want to factor out the complex exponential form and then express the inside in the a+i*b form. For example: \begin{bmatrix} e^{i \frac{\pi}{4}} ...
6
votes
1answer
113 views

What is the reason that $zz^*$ is not written as $ |z|^2$ sometimes?

For a general (complex) number $z$ I sometimes get terms that explicitly writes (for instance) $$2zz^*+|z|^2. $$ I should add that these expressions come from long calculations involving packages ...
8
votes
3answers
182 views

Complex result for Real vectors in VectorAngle

I was expecting a real angle using VectorAngle when passing real valued vectors, but I obtained a complex angle: ...
0
votes
1answer
155 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 ...
10
votes
2answers
444 views

Compiling the VoigtDistribution PDF

According to List of compilable functions, Erf and Erfc are compilable functions. However, I want to make a compiled version ...
5
votes
5answers
139 views

Non-algebraic equation in the set of complex numbers

The following equation in $\mathbb{C}$: $4z^2+8|z|^2-3=0$ is not algebraic and has 4 solutions : $\pm\frac{1}{2}$ and $\pm i\frac{\sqrt{3}}{2}$. The Solve function in Mathematica only returns the 2 ...
0
votes
2answers
91 views

Plotting complex functions to find solutions

Is ParametricPlot3D the best way to plot complex functions to find solutions? The algebra for $e^z = 2 i$ tells me that there are infinite solutions at $\frac{\pi}{2} + 2 n \pi$ for all $n \in ...
5
votes
2answers
164 views

Getting Arg[z] to go from $0$ to $2\pi$

I'm defining branch cut functions, and I'm using $\arg(z)$ as a building block. So I just spent an hour at the whiteboard assuming that $\arg(z)$ goes from $0$ to $2\pi$, and then I implement the ...
0
votes
0answers
106 views

Why does this integral have a complex result

I wanted to find the normalization of distribution F2 . ...
5
votes
0answers
91 views

Find regions in which the roots of a third degree polynomial are real

I have to find the roots of a third degree polynomial in $\phi$ that depends from 3 parameters, namely $t,s,w\in \mathbb R$. In order to do that I've used the command ...
1
vote
1answer
71 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
145 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
197 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} \; ...
6
votes
2answers
140 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
133 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
328 views

Riemann surface for cubic root

I'm trying to generate Riemann surfaces of higher order. I read How to visualize Riemann surfaces?, and the subsequent documents. I'm able to reproduce the surface using polar representation, but I'm ...
3
votes
1answer
62 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 ...
1
vote
2answers
135 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 ...
4
votes
1answer
70 views

FullSimplify on complex numbers seems inconsistent

FullSimplify[c Conjugate[c]] returns Abs[c]^2 while FullSimplify[2 c Conjugate[c]] ...
0
votes
1answer
77 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: ...
4
votes
2answers
268 views

Convergence and value of a complex power series

I've done a little math and I got the following power series expansion of $\log z$ about $z_0=-2+i$. $$\log z=\log(-2+i)+\sum_{n=1}^{\infty}\frac{(-1)^{n+1}}{n(-2+i)^n}[z-(-2+i)]^n$$ I've shown that ...