# Questions tagged [complex]

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

812 questions
Filter by
Sorted by
Tagged with
12k views

### How can I generate this “domain coloring” plot?

I found this plot on Wikipedia: Domain coloring of $\sin(z)$ over $(-\pi,\pi)$ on $x$ and $y$ axes. Brightness indicates absolute magnitude, saturation represents imaginary and real magnitude. ...
10k views

### Finding real roots of negative numbers (for example, $\sqrt{-8}$)

Say I want to quickly calculate $\sqrt{-8}$, to which the most obvious solution is $-2$. When I input $\sqrt{-8}$ or Power[-8, 3^-1], Mathematica gives the ...
3k views

### Möbius transformations revealed

Möbius Transformations Revealed is a short video that vividly illustrates the simplicity of Möbius transformations when viewed as rigid motions of the Riemann sphere. It was one of the winners in the ...
8k views

### How to visualize Riemann surfaces?

In WolframAlpha we can easily visualize Riemann surfaces of arbitrary functions, can we plot the Riemann surface of an arbitrary function using Mathematica and ...
41k views

### Plotting Complex Quantity Functions

Trying to plot with complex quantities seems not to work properly in what I want to accomplish. I would like to know if there is a general rule/way of plotting when you have complex counterparts in ...
18k views

### How to calculate contour integrals with Mathematica?

How to calculate the integral of $\frac{1}{\sqrt{4 z^2 + 4 z + 3}}$ over the unit circle counterclockwise for each branch of the integrand?
46k views

### How to tell Mathematica that certain variables are real/imaginary, integer-valued, etc

I'm trying to expedite some quantum mechanical calculations (expectation values etc.) by running them through Mathematica. When I say, for example, ...
5k views

I've been playing around with a visualization technique for complex functions where one views the function $f: \mathbb{C} \rightarrow \mathbb{C}$ as the vector field $f: \mathbb{R^2} \rightarrow \... 2answers 4k views ### How does Mathematica understand branchcuts of the complex logarithm? Say I have the function$f(x) = x \tanh(\pi x) \log (x^2 +a^2)$where$a$is some positive real number. Then it seems to be me that Mathematica when given such a ... 5answers 4k views ### Why this real integral yields imaginary results? This integral yields -1-4Iπ/3 in Mathematica: Integrate[(y - y^2 + x - x^2 + 2*x*y)/(1 - x - y), {x,0,1}, {y, 0, 1}] Since ... 1answer 1k views ### Numerical inverse Laplace-Hankel transform When trying to reproduce the result of this paper about numerical solution of Lamb's problem, I encountered the following double integral (to be more precise, the 0-order inverse Hankel-Laplace ... 2answers 1k views ### Why doesn't FullSimplify drop the Re function from an expression known to be real? For some reason Mathematica does not properly simplify this expression: ... 3answers 7k views ### Derivative of real functions including Re and Im When deriving functions using Re, Im or Arg (and probably some other functions as well), ... 1answer 997 views ### Dual complex integral over implicit path using contour plot Context I am interested in doing double contour integral over paths which are defined implicitly. For the sake of debugging, let's assume its $$\oint_{\cal C}\oint_{\cal C} \frac{1}{u\, x} d u d x$$ ... 2answers 12k views ### Plotting complex Sine I've got another plotting problem. I want to plot Sin[z] where z is complex. So, I've tried the following: ... 6answers 8k views ### Plotting complex numbers as an Argand Diagram I have the function:$F(\omega) = \frac{5\; - \;i\;\omega}{5^2\; +\; \omega^2}$When$\omega$has the values :$\{ -7, -2,\; 0,\; 2,\; 7\}$How would I plot the Argand diagram in Mathematica? Or ... 4answers 717 views ### Why is (-1.)^2. a complex number Why (-1.)^2. in Mathematica returns a complex number? It looks like in both C and Fortran it returns 1. Why does Mathematica behave differently than the other ... 2answers 3k views ### Stereographic Projection Say I want to represent points of the complex plane in the sphere$\Bbb S^2$using stereographic projection. That is, the Riemann sphere: Specifically, it would be nice to be able to: Given the ... 4answers 3k views ### Moving the location of the branch cut in Mathematica According to the documentation, Mathematica chooses the branch cut for$\log(z)$to lie along the negative real axis. It it possible to change this so that it lies along the positive axis or elsewhere ... 4answers 14k views ### Factoring polynomials to factors involving complex coefficients I've run into some problems using Factor on polynomials with complex coefficient factors. Reading the documentation it looks like it only factors over the ... 1answer 373 views ### Why are Exp and 2 treated differently within Complex? Why doesn't the last command below split the complex number into its real and imaginary parts? ... 2answers 950 views ### Visualizing a holomorphic bijection between the unit disc and a domain One can construct a holomorphic bijection between the (open) unit disc$D=\{z\in{\bf C}: |z|<1\}$, and a domain$D\setminus\overline{B_{1/2}(-1/2)}$where$B_r(z_0)$denotes the ball of radius$r$... 2answers 15k views ### How to specify assumptions before evaluation? If I request mathematica evaluate an integral for me, I'll often get a more general ConditionalExpression than I want. Example : ... 6answers 801 views ### Is there a workaround for this integral? The command Integrate[Exp[a*Exp[I*x]], {x, -Pi, Pi}] produces ConditionalExpression[0, a == 0] which is not correct in view of ... 2answers 521 views ### Inconsistent results from equivalent integrals Why is Mathematica returning different values for these two integrals: I am just being introduced to complex integration, so it's possible that I have a misunderstanding of how this works, but in ... 3answers 7k views ### How can I convert a complex number into an exponent form When I have an expression such as (1/4 + I/4) ((1 - 2 I) x + Sqrt y) it is hard to get an intuition of the number. So I want to convert it to the complex ... 4answers 262 views ### How to convert this term to a Hypergeometric function? term=8*(-1)^(1/4)*Sqrt[b]*q0^(3/2)*\[Kappa]* EllipticF[I*ArcSinh[((-1)^(1/4)*Sqrt[b]*r)/Sqrt[q0]], -1] This is a physical term and it is not convenient to appear ... 1answer 387 views ### Why does Mathematica choose branches as it does in this situation? Consider these integrals: ... 2answers 7k views ### Paths integrals in the complex plane I can't find how to calculate path integrals of complex functions in the complex plane. For example: $$\oint_{\mid z \mid =2}\frac{1-e^z+z}{z^3 (z-1)^2}dz$$ 2answers 2k views ### Does FindFit support complex numbers or doesn't it? Inspired by this previous question: Findfit doesn't give the good fit; Changing the starting values will not change the results. Consider the following complex-valued dataset. ... 3answers 7k views ### Complex number operations: telling Mathematica variables are real I want to do Conjugate[a + b*I], but when I do that, the solution is Conjugate[a] - I*Conjugate[b]; when for me, a and b are ... 3answers 209 views ### Convert Real packed array of pairs to Complex packed array I have a Real packed array arr. It may have arbitrary depth but Last@Dimensions[arr] == 2. ... 2answers 909 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 ... 2answers 526 views ### How to compute the residue of$e^{z-\frac{1}{z}}$at z=0? I've tried the following but it didn't work: Residue[Exp[z - 1/z], {z, 0}] not even this: Residue[Exp[1/z], {z, 0}] ... 3answers 3k views ### How can I recreate Trott's Riemann Surface plot in Mathematica? In reading Michael Trott's Visualization of Riemann Surfaces of Algebraic Functions, he has: ... 3answers 501 views ### Finding and visualization of branch cuts and branch points Is it possible to determine branch cuts and branch points for complicated functions using mathematica Iam trying to determine the brnach cuts and branch points of this complicated function We have ... 1answer 5k views ### Bifurcation diagrams for multiple equation systems I am interested in constructing a bifurcation diagram for some of my parameters (especially for β and γ) in the dynamical system given in the code below. I want to see how parameter changes affect the ... 1answer 4k views ### Is Abs[z]^2 a bad way to calculate the square modulus of z? For a numerical quantity z, Abs[z] returns the square root of the sum of the squares of the real and imaginary parts of ... 2answers 423 views ### What is the best way to define Wirtinger derivatives Wirtinger derivatives ( also called Cauchy operators) in complex analysis are widely used tools. They are defined in the case of one dimensional complex plane as follows $$\frac{\partial}{\partial z}=... 3answers 6k views ### Is there a simple way to plot complex numbers satisfying a given criteria I think this should be straightforward, but I cannot seem to find a good source on how to do it after searching around, so I'm trying to sketch sets of complex numbers that meet a given for criteria. ... 1answer 188 views ### Definition of Mod and Quotient with complex arguments How are Mod and Quotient defined for three real/complex arguments? I wasn't able to find the definition. My main surprise so ... 2answers 825 views ### Why does Arg'[1. + I] return -0.5? From the document we know that Arg[z] gives the gives the argument of the complex number z. Then how about ... 2answers 611 views ### Symbolic Integration along contour: branch cut problem? Context Following this question on path integrals in the complex plane, having defined again a numerical and symbolic integrator along a path as ... 1answer 238 views ### FiniteElement v.s. TensorProductGrid: which is reliable for Schrödinger equation with periodic b.c.? This is a problem comes up in the discussion under this post and I think it's worth starting a new question for it. I suspect the underlying issue is the same as in this post, but not sure. Consider ... 1answer 773 views ### Contour Integration along a contour containing two branch points I need to compute following contour integrations:$$f(u)=\oint_\alpha dz \sqrt{z^3+z+u} \qquad ; \qquad g(u)=\oint_\beta dz \sqrt{z^3+z+u}$$In which$\alpha$and$\beta$are two contours in ... 6answers 3k views ### Image of first quadrant under$f(z)=(z+i)/(z-i)\$

I'm able to plot the region where Im[z] > 0 and Re[z] > 0: ...
444 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: ...
735 views

### How to use Mathematica to do a complex integrate with poles in real axis?

I want to use Mathematica to compute the following complex integral: Integrate[Exp[I z ] 1/z, {z, -Infinity, Infinity}] Mathematica reports that it does not ...