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.

Filter by
Sorted by
Tagged with
4
votes
2answers
123 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: ...
4
votes
1answer
81 views

Visualizing Riemann surface (two branches) of logarithm

I'm trying to plot two branches of the complex multi-valued function: (In a previous post - linked above-, Mathematica found the branch cut of the following function between -1 and 0) $1-z\ln[(1+z)/z]...
3
votes
3answers
440 views

Plot a specific branch of a multi-valued complex function

Let's say I want to plot a branch of the following function $f(z) = \sqrt{z(z-1)}$. Let $z = r_1 e^{i\theta_1}$ and $z-1 = r_2 e^{i\theta_2}$. How can I tell Mathematica to plot the branch for which $...
1
vote
1answer
57 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 ...
0
votes
0answers
54 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 ...
2
votes
2answers
148 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 ...
1
vote
1answer
100 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: ...
4
votes
4answers
144 views
1
vote
1answer
71 views
3
votes
1answer
167 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)$ ...
8
votes
2answers
173 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: ...
0
votes
0answers
34 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[2]) Sqrt[-11 x - x^2 - 30]; Reduce[(Sin[x] + Cos[x] - Sqrt[2]) Sqrt[-11 x - x^2 - 30] == 0, x] Which ...
1
vote
1answer
55 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 ...
0
votes
0answers
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....
0
votes
1answer
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 ...
0
votes
1answer
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 ...
1
vote
1answer
80 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 ...
1
vote
2answers
34 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,...
2
votes
1answer
45 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 ...
2
votes
1answer
85 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 ...
10
votes
2answers
599 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 ...
0
votes
1answer
52 views

Adding degrees to complex numbers

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 ...
0
votes
1answer
56 views

Showing a specific (complex) point in a Graphic [closed]

Somewhat related to a previous post that I made - Complex infinity at a point and division by zero I'm still following the book on this example and I've come to the part where one draws the '...
2
votes
1answer
44 views

Discolored ComplexPlot ColorFunction [closed]

I have this code. ...
0
votes
1answer
48 views

Complex infinity at a point and division by zero

Edit: I've found out that the book was written for Mathematica 7, which was a pretty long time ago. It boils down to changes in syntax most probably, but simple renaming to lower lettercase does not ...
0
votes
1answer
49 views

Finding the negative real root of in set of solutions under a varying constraint

Suppose I have a function and its derivative like: V = x^3.5 - x*y Vx = D[V, x] I first solve V for ...
1
vote
2answers
153 views
0
votes
0answers
25 views

Expanding the complex conjugate of a Mathieu function as a series

In my calculations, I found this equation: ...
1
vote
0answers
69 views

How can I get Mathematica to recognize that $ab^* + ba^* = 2\Re(ab^*)$?

Mathematica understands that $z + z^* = 2\Re(z)$, FullSimply[z + Conjugate[z]] (* output: 2 Re[z] *) However, Mathematica does not simplify the expression ...
0
votes
1answer
37 views

Can we make a labelled parametric plot in which the parameter is integer? [closed]

Can we make a labelled parametric plot in which the parameters are integers? I'm just using Wolfram Alpha but could equally use Mathematica Online, and want something like here. I want to plot ...
2
votes
2answers
116 views

How to show that $f(z) = z^2 + 1$ intersects the line through the roots of $f(z) = 0$ in ComplexPlot3D?

I have plotted the complex function $f(z) = z^2+1$ by using the following code: ComplexPlot3D[z^2+1, {z, -5 - 5 I, 5 + 5 I}] However, I want to show that $z^2+1$ intersects the line $\Re(z) = 0$. ...
17
votes
4answers
693 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 ...
8
votes
5answers
12k views

How can I plot the complex graph of $x^x$ in Mathematica?

For example, this Wolfram Alpha query shows this graph: But it does not show the code for plotting it in Mathematica. Plot[x^x, {x, -1, 1}] only plots the real ...
0
votes
1answer
40 views

Complex Exponentials to Trig Functions?

I have an expression expr = 1/2 a E^(-3 I ω t) (E^(3 I ω t)+2 Cos[π x/a]) (1+2 E^(3 I ω t) Cos[π x/a]) Sin[π x/a]^2; expr // TeXForm $\frac{1}{2} a e^{-3 i t \...
0
votes
1answer
81 views

How to plot the complex function $f(z) = z^2 + 1$ in a three-dimensional plot with colouring?

I've noticed that there are different ways to plot a complex function. What I am interested in, is a three-dimensional plot with colouring of the complex function $f(z) = z^2 + 1$. Here is an example ...
3
votes
1answer
211 views

Using Im[] and Re[] Correctly

Hi I just want to check my code is working properly as I am trying to rule out any errors. I'm integrating 4 coupled ODE's that have real and imaginary terms, so I have 8 equations. The section of ...
3
votes
1answer
122 views

Finding the maximum real part of roots

Suppose that I have this problem ...
0
votes
0answers
81 views

Plot the maximum of the real parts of the eigenvalues of a trancendental equation

Basically I have this matrix ...
1
vote
1answer
70 views

Plotting $f: x + i\,y \mapsto u + i\, v$ with Plot3D and mapping $v$ to color

Mathematica already has ComplexPlot3D that plots ReIm[x, y] against Abs[f(z)] and ...
2
votes
2answers
631 views

Weird result in complex limit

I am trying to evaluate a limit: gamma[w_] = Sqrt[-(u*e)w^2 + I*(u*s)w]; Limit[Re[gamma[x]], {x -> DirectedInfinity[1]}] I calculated the limit by hand, and ...
2
votes
3answers
319 views

Limit of integral gives incorrect output

I'm trying to evaluate $\lim_{e\to 0} \, \frac{i}{e}\int_{\pi }^0 \frac{1-\exp (i e \exp (i \theta ))}{\exp (i \theta )} \, d\theta$ with Mathematica 9.0.1.0 on OS X. However, I get "Undefined" for ...
7
votes
2answers
241 views

Possible bug with contour integration

I wanted to confirm the value of the integral $$\frac12\int_{\partial\Bbb D}\frac{\sin z}{\cosh z-1}\, dz$$ where $\partial\Bbb D$ is the boundary of the disk of radius $1$. Thus I had written the ...
10
votes
2answers
816 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 ...
12
votes
3answers
415 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 ...
37
votes
5answers
40k 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 ...
17
votes
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 ...
-1
votes
1answer
99 views

ComplexPlot3D and essential singularities [closed]

I am trying to understand the behavior of the functions $$ f(z) = e^\frac{1}{z} \qquad \text{and} \qquad \frac{1}{f(z)} = \frac{1}{e^\frac{1}{z}} $$ in the neighborhood of $z=0$. From the power ...
84
votes
5answers
11k 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. ...
1
vote
0answers
30 views

Discontinuities in taking the roots of a complex function

I have the following functions e1, e2, and e3 which consists of the functions ...
1
vote
0answers
58 views

Efficient evaluation of real/imaginary parts of long expressions

I have the following, rather compact, but complex, expression (see below). I simply want the real part of this. Now, when I do the usual, i.e., ...