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.

788 questions
Filter by
Sorted by
Tagged with
16 views

Solving complex trig quations - missing solutions?

{ Sin[Pi/2 + I*Log[2 + Sqrt]], Sin[Pi/2 - I*Log[2 + Sqrt]], Sin[Pi/2 + I*Log[2 - Sqrt]], Sin[Pi/2 - I*Log[2 - Sqrt]] } // FullSimplify ...
33 views

Better way to treat branch cut problem in Mathematica

Currently, Mathematica treats function which has branch cuts; $\log(z)$,$\sqrt[n]{z}$, etc, by taking its principal value. This may cause a problem in Contour integration when the path of integration ...
54 views

How to substitute by NDSolve solution to plot a new function

Assume I got some function by NDSolve , like y(t) ...
73 views

Real and imaginary parts of complex logarithm

I need to obtain the real and imaginary parts of the below expression with Mathematica: $(- i a - m^2) \ln(\frac{i m^2}{2 a})$, where $a$ and $m$ are real. So we have: ...
32 views

Convert string of tuple of numbers to complex number

I am reading complex number from a file which gives me a list like that ...
37 views

No result returned on ContourPlot with specific relation

For reference, I am using Wolfram Mathematica 12.0. I am attempting to plot the complex subset defined by: $|z+6|+|z-6| =1$ where z is a complex number $z = x+ i y$. Utilising ContourPlot directly ...
73 views

Contour plot of streamfunction

I am trying to obtain a graph similar to this one: ...
853 views

Modify real part and leaves imaginary part unchanged

How can I flip the sign of the real part but not affect the imaginary part of a complex number: a+bi => -a + bi Example list: ...
67 views

How to chop a complex number?

I'm solving some differential equations by iterating and I want to use Chop to get rid of noice smaller than a certain threshold. However, I found that Chop only "chops" the real part, not the ...
99 views

Linear fit statistics for a complex data set

I am having some technical and conceptual troubles in using NonlinearModelFit with a complex data set. I have a 2 dimensional array where the two positions are complex numbers, such that: ...
34 views

Manipulate and Parametric plot not show anything.Why?

My aim was to map a semi ellipse to a semi-circle, for different values of ellipse parameters to a circle of different radius. So I have written a code in Mathematica. ...
32 views

36 views

32 views

How to compute Bott-Chern operator ddc

I wish I could make Mathematica compute the $dd^c=2i\partial\bar\partial$ of a function depending on several complex variables. The question involves complex or Wirtinger derivatives (https://...
53 views

visualizing branch cut of a complex function

I'm working in the plotting the branch cut of a complex function, namely: $w(z) = (2+z) \ln(2+z) - 2(1+z) \ln(1+z) + z \ln z$. To do so, I have tried this: ...
284 views

Why ArcTan[1, 0. I ] yields -1.5708+0. I?

Bug introduced in 5.2 or earlier and persisting through 12.0.0 Why ArcTan[1, 0. I ] yields -1.5708+0. I ? The result should ...
166 views

To plot branch cut of logarithm

I like to see the branch cut of the function: $$1 - z \ln[(1+z)/z].$$ If I plot it in the complex plane: ...
125 views

64 views

How to plot special contour lines for a “Ridge System” of complex function?

Mathematica makes it very easy to to plot the contour lines for a function of two real variables using ContourPlot. It also makes it very easy to plot the ...
56 views

Unexpected difference between integral and summation?

I am trying to integrating something like: Integrate[Exp[-i*(k*x+k*z)]*Exp[-(x^2+z^2)],{x,-largenumber,largenumber},{z,-largenumber,largenumber}] My issue is that ...
155 views

Getting an Accurate Transformed Region (Part II)

I asked earlier about transforming a set of curves and getting an accurate plot when a curve goes to infinity: Getting an Accurate Transformed Region Here is an example where a transformed region ...
102 views

Getting an Accurate Transformed Region

I would like to get an accurate plot of the image of concentric circles under the transformation $$f(z) = \log(1+z).$$ I've defined $\cal R$ as the union of a few circles: ...
169 views

...
76 views

How to extract only real part of 2nd root solution to C code?

I have this cubic polynomial: ...
186 views

How to solve PDE with periodic and anti-periodic b.c.?

I need to solve the PDE for a complex function $A(x,t)=A_r(x,t)+iA_i(x,t)$ ...
178 views

Replace Complex Head with List

I would like to apply ListPlot to a set of complex numbers. This is what comes to mind to convert a complex number to a pair: ...
35 views

Why do all the Roots not show up in ContourPlot of an equation?

Roots by Normal Method: f[x_] := (Sin[x] + Cos[x] - Sqrt) Sqrt[-11 x - x^2 - 30]; Reduce[(Sin[x] + Cos[x] - Sqrt) Sqrt[-11 x - x^2 - 30] == 0, x] Which ...
61 views

Verification of ComplexPlot

from Wegert Visual complex functions. I am trying to verify a phase portrait by reproducing it with Mathematica. The only problem is that I am misunderstanding the ...
15 views

Set conditions on SingularValueDecomposition

I'm a new user of Mathematica, and I am having some issues with SingularValueDecomposition. This function returns three matrices {u,v,w}, with v that is diagonal and u,w unitary such that u.v....
36 views

Conditions to make unitary a given matrix

Suppose I have some symmetric matrix W = {{c[1, 1], c[1, 2], c[1, 3]}, {c[1, 2], c[2, 2],c[2, 3]}, {c[1, 3], c[2, 3], c[3, 3]}}; where the c's are complex and I ...
36 views

Interesting output in Integrate [closed]

I found interesting behaviour, best illustrated in the following example. When trying to evaluate Integrate[1/(d^2 - 1), d] Mathematica 11.3 gives the following ...
83 views

Sharp jagged lines in Plot3D

I have the following function of five parameters of which I would like to construct a 3D density plot using Plot3D ...
39 views

Different styles for different points in ComplexListPlot?

I'd like to use ComplexListPlot to show a point and its image under a complex function, with the point and image having different styles, say different colors. Use,...
53 views

Plotting Complex Numbers as “Arrows” on the Complex Plane

Given the following complex numbers (defined as the values of two functions f and g defined only on the points ...
86 views

Taking real and imaginary parts after reciprocal

I noticed the following strange scenario. When I defined a variable to be real, Mathematica does not only recognize that it is real after taking an inverse. How can I resolve this so that it will ...
I'd like to take the complex number $(1 + 0i)$ and (i) multiply it by $0.5$ and (ii) add 45 degrees to it (without changing its magnitude). But I'd like to get its complex represenation in non-polar ...