# 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.

1,349 questions
Filter by
Sorted by
Tagged with
65 views

### Bugs with Integrate when dealing with complex situation?

I'm trying to calculate $\int_0^{\infty } \exp \left(t \left(-x^3+(1+i) x\right)\right) dx$ with mathematica, and different assumptions on t give different results: ...
• 1,761
26 views

### AbsArgPlot for List (Parallel Computation)

Basically, I have a very complicated function that I'd like to draw using AbsArgPlot. I thought it could speed up if I first use ...
242 views

### Eliminating complex numbers from solutions

In Maple eq:=ln(y)-1/2*ln(1+y^2) = x-c1; solve(eq,y) In Mathematica ...
• 146k
254 views

### Series expansion of a given function

I attempt to do the series expansion for the following function ...
• 101
1 vote
53 views

### Why does RegionPlot handle Euler's identity differently for functions and direct expressions?

Edit When I change the x range (e.g. {x,1,3}) I get the same error also for the direct expression. Thus, the problem exists either way and I assume it just evaluated different points? Problem I want ...
44 views

### How to generate lattice by integrating over curves on a modular form domain plot?

I was watching this video (2:30 of https://youtu.be/zLEyIT_BCgk?si=ji5NyjR7vcwzaNxi ). Here in the video he said that to get the lattice , we just integrate over the curve(silver line) and we will ...
74 views

### Integrate gives inconsistent result for gamma-like integral with complex variables

I am trying to come up with a generic formula for the below integral, which is analogous to the upper incomplete gamma function, ...
• 71
54 views

### Drawing cycles around and across cuts

I want to draw cycles (or paths) around and across the cuts on the complex plane for the following function (where I have put the cuts between [z1,z2] and ...
120 views

### How can I find minimal modulus of $z^2 - w z - 4$?

Let $z$ and $w$ be two complex numbers satisfying conditions: $|z| = 2$ and $|w i - 2 + 5i| = 1.$ How can I find the minimum of $|z^2 - w z - 4|$? I tried with setting $z = a + b i$ and $w = x + y i$: ...
• 3,901
55 views

### Mathematica crashes when trying to use NIntegrate on a complex function

I am trying to integrate the real part of a specific entry in a Green function given by G[E_] := Re[Inverse[E iF - H + I L/2]][[13, 13]]; ...
• 21
1 vote
127 views

### Contour integral with radius infinite [closed]

How can I get compute a contour integral of the function $f(z)=\exp(i z)/z$ in the upper circle with center in $(0,0)$ and radius $R$? I want verify that $\lim_{R\to \infty}\int_C f(x)=0$ in ...
• 203
119 views

### Is it possible to express $\text{Li}_2(-\frac18(-i+\sqrt{15})+\text{Li}_2(\frac18 (i+\sqrt{15})$ as an explicit real expression (not numeric)? [closed]

I obtain this expression in my calculations, and numerically I am sure that it is a real number. ...
• 195
1 vote
72 views

### How can I ask Mathematica to give the explicit real form of the given function?

In part of my calculations, I obtain this expression which contains the imaginary unit I but I expect that this expression might be real (from the comments below, ...
• 195
1 vote
77 views

### ParametricNDSolveValue, NMaximize: Dealing with complex results in maximization problem

I analyze a system of differential equations in several variables including mus[t], mui[t], and w[t]. Time runs from t=0 to t=T. The two initial values mus[0] and mui[0] can freely be chosen; their ...
42 views

### How to check if there exist variables for which a function may be real?

I have a tough time in checking whether there exist any values of x and y (both real) for which the following pair of functions ...
• 386
90 views

### MatrixExp sometimes erroneously assumes variables are real

Consider the simple expression MatrixExp[I Conjugate[x] {{1,0},{0,1}}] which Mathematica correctly evaluates to ...
• 1,211
213 views

### What to do when FullSimplify runs out of memory?

So close yet so far! I've read a number of posts here about tips and strategies for simplifying expressions. I hope this case still offers guidance to others. I have an expression that (just!) fits ...
537 views

### Basins of attraction using Newton-Raphson method for nonlinear system

I am trying to construct basins of attraction using the newton's method for the system of two equations whose roots are real. I need to develop a code to get basin of attraction. Unfortunately, my ...
• 119
62 views

### Plot freezes with arbitrary precision complex evaluations

I find that Plot has some strange behavior. a = {{-5.3553 I, 0.15893 }, {2.3053, 0.014253}}; Det[a] // Abs gives ...
• 91
107 views

### ExpToTrig conversion problem

Let we have some ODE solution: formExp = c1 E^(-I t) + c2 E^(I t) +c3 E^(-2 I t) + c4 E^(2 I t) It is known that this solution can be reduced to the form: ...
• 1,789
75 views

### Conformal Mapping Function and Scaling Factor

I am having problems determining a scaling factor for a conformal mapping function. The plan is to map the upper half plane into a rectangle (Schwarz Christoffel Transformation) to determine the ...
78 views

### Initial conditions making trouble with NDSolve

I want to solve a number of differential equations in a single NDSolve. The code is as follows: ...
69 views

### How can I improve the accuracy of FindRoot for a complex equation?

I want to solve the following problem: Given a complex matrix $m=\textbf{m}(λ, ω)$, with $λ, ω \in \mathbb R$, find $λ$ and $ω$ such that $$\det[\textbf{m} (λ, ω)] = 0$$ Since one can take the real ...
• 33
1 vote
98 views

### Unable to simplify complex expression [closed]

I am very new to Mathematica. Somehow Mathematica doesn't give me the norm expression, instead, it just gives the original expression. How should I fix this? The code is: ...
108 views

• 991
159 views

### Sqrt returns complex values

I am trying to find sine from a cosine relation using the following commands: ...
• 31
1 vote
239 views

### Differential complex equations in cosmological problem

I want to solve a differential equation of second order with complex initial conditions. Despite I have wrote all the code with detail, I am still facing some problems I might want to review here. The ...
447 views

### How to verify that a certain point is a branch point for a complex function using Mathematica?

It is straightforward to verify that z=0 is a branch point for w[z]=Sqrt[z]: ...
• 2,151
44 views

### Scope of Simplifying Complex Expressions [duplicate]

Do you know what the scope of Mathematica's simplification capabilities for complex expressions is? For example, I put the heavy lifting of proving a complex inequality on Mathematica, using the ...
• 353
87 views

### Vector in the complex plane

Please tell me how I can make an animation with rotating vectors rather than rotating points. ...
• 327
139 views

### How to numerically find complex non-real roots of a function?

Using Mathematica, how can we numerically find only complexes, but not real roots, of a function? For example, if we have f:C->C, and we have roots like, R1,R2,...,Rn (real roots, without imaginary ...
• 1,536
1k views

### Make a "formula-millipede" move along arbitrary path

Math artist Chirag Dudhat specializes in simple math that does something interesting visually. He recently had a hit with a "millipede" simulation with simple complex plane formulas. Below ...
• 73.4k
72 views

...
• 21
142 views

### What is resistivity function of a 3-bar electric switch?

I answered a question on Physics StackExchange - considered as homework - numerically. The question is: What is the resistance of three stacked identical blocks, the middle bar shifted by its half ...
• 3,887
117 views

### Riemann surface of the argument multivalued function

I tried to use Michael Trott's Mathematica Resource function RiemannSurfacePlot3D for plotting the Riemann surface of the Arg function without success. How can I plot this Riemann function with the ...
• 131
1 vote
153 views

### Using NDSolve and complex differential equations

I am trying to solve this system of equations with NDSolve ...
217 views

### Draw a line as a branch cut on a plot

I had asked a question here about visualization of Riemann surface and got an answer: My function is: $$g (z) = (1 - a^2/z) (1 - 1 /z),$$ where $0 < a < 1$. And the branch cut is from $a^2 \to 1$...
879 views

### Mathematica doesn't give the correct value of an integral

I want to calculate the following integral with Mathamtica Integrate[ E^(−2 x I) (Log[Abs[Cos[x − a]]] + Pi I/2 Sign[Cos[x − a]]), {x, 0, 2 Pi}] where $a$ is a real ...
• 141
409 views

### Visualizing branch cut and Riemann surface for a square root

I have the following complex function: $$g (z) = (1 - a^2/z) (1 - 1 /z),$$ where $0 < a < 1$. Calculations show that $\sqrt{g(z)}$ has a branch cut along $a^2 \to 1$. Is there a way to visualize ...
115 views

### Finding the cube root of negative number within a custom function

I'm trying to write a program that shows the gradients on either side of a stationary point. But for functions like x^(4/3) with stationary point at x=0, the derivative has the term x^(1/3), and (-0....
259 views

### How to plot this set of complex numbers?

I want to plot this set of complex numbers in Mathematica: $$D := \left\{\frac{1}{z}: z \in \mathbb{C}, \text{Im}(z) \ge 1, \text{Re}(z) \le \text{Im}(z), |z-1-i| \le 1\right\}$$
• 43
1 vote
105 views

### How to plot the imaginary part of $\tan(x)^{\cos(x)}$ on the $xy$-plane?

So recently, I asked this question on Math.SE on if my thought process on how to solve the limit $\lim_{x\to(\pi/2)^-}\tan(x)^{\cos(x)}$ was correct, and actually, while I was solving this, I was ...
• 233
67 views

### Trouble with Finding a Supremum Constrained by a Condition

I have a function  f(x,y) = \sqrt{\left(x^4 y+\frac{2 x^2 y^2}{x^2 y^2+1}+\frac{2}{x^2 y^2+1}-41 x^2 y-7 x^2\right)^2+\left(-7 x^3 y-x^3-\frac{2 x y}{x^2 y^2+1}-\frac{2 x^3 y^3}{x^2 y^2+1}+41 x\...
98 views

### Workarounds for unevaluated results of ContourIntegrate of non-analytic functions

There is a new useful command ContourIntegrate since 13.3. I find that the command is well-done, but even the Sun has spots. ...
• 27.1k
2k views

### How can we reproduce Eugen Jahnke's drawing of a complex function?

Eugen Jahnke (1863 - 1921) studied mathematics and physics at the Humboldt University of Berlin. He became a professor at the Berlin Mining Academy in 1905. His "Tables of Functions with ...
• 78.8k
267 views

### Absolute value of a complex number [closed]

I want to calculate |xx|^2. Why can't Mathematica just calculate it? What am I supposed to do here? I just want it to actually calculate it, so that there are no imaginary numbers left. Is that so ...
• 33
1 vote
114 views

### Plotting |z-2| < 1 under w = z/(z-1)

How can I plot the image of |z-2| < 1 under the transformation w = z/(z-1)? The expected result should look something like ...
• 681
1 vote
43 views

### How to assume a function is holomorphic?

For example, for a holomorphic function $f(z)=f(x,y)$, it's well know that $\ln |f|$ is harmonic. I want to check it with mathematica with the following code: ...
• 141