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
8
votes
4answers
765 views

How to recover Pauli matrices properties in Mathematica?

I want to do a cross or dot product involving a vector of Pauli matrices $ \vec\sigma=(\sigma^1, \sigma^2, \sigma^3) $; for example, $ \vec\sigma\times\vec\sigma=2\mathrm i\vec\sigma $ and $ \vec\...
7
votes
1answer
129 views

Why can't I replace I with HoldPattern@I?

Just try this sample: I /. HoldPattern@I -> a (* I *) Why does it fail to replace I with ...
6
votes
2answers
169 views

How do I make Conjugate behave more consistently?

Sometimes Conjugate distributes. Sometimes it doesn't. Look: ...
5
votes
2answers
277 views

Plotting complex solutions in Argand plane as arrows

I have: Clear[z] Solve[z^4 == 1 - Sqrt[3] I, z] // ComplexExpand Which produces these solutions: ...
5
votes
1answer
155 views

Performance of Apart with complex numbers

Consider the following code ...
4
votes
2answers
567 views

Overloading conjugate operator for a particular function

I trying to modify the behaviour of the built-in Conjugate[] operator on a particular function I have defined, to take into account that some of its variables are ...
3
votes
3answers
279 views

Problem of `Integrate` and `DSolve` with inhomogeneous Legendre differential equation

I have the following inhomogeneous Legendre differential equation $(m=n=2)$: ...
3
votes
1answer
692 views

Differential Equation in Complex Plane and Parametric Plot

I would like to solve $dx/dt=\sqrt{1 + (I x)^3}$, where x is complex, for some initial condition like $1 - 5 I$ and plot the imaginary part of the solution versus the real part. (A somewhat similar ...
2
votes
2answers
187 views

Complex polynomial variable transformation

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

Plotting Zeros of a Complex Variable

I'm trying to plot the zeros within a certain distance from the origin using Mathematica of a given function (in my case, partial sums of the Zeta Function). I've tried plugging in simple functions, ...
1
vote
1answer
110 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: ...
1
vote
0answers
151 views

Problem of calculating the residue of a expression (to confirm the result from a paper) [duplicate]

I use Mathematica to confirm a result from a paper which is to calculate the residue of a expression at zero. The code and result are given below. Is this residue too complicated for Matheamtia or ...
1
vote
3answers
581 views

finding an argument of a complex number

What is the simplest way to find the argument of the following function? ((1 - E^((I π (1 - α))/(β - α)) z)/(1 - E^(-((I π (1 - α))/(β - α))) z)) as I tried the ...
1
vote
0answers
140 views

How do you force Mathematica to list all values of some multi-valued complex function at some point? [duplicate]

Let's say I have a complex-valued function $f(z) = \sqrt{z}$. When I plug $z = 1$ into it, it returns 1. I need it to return a list $\{-1,1\}$. Is it possible to force Mathematica to do that? I know ...
1
vote
1answer
157 views

Wrong behaviour of ComplexExpand and Conjugate

This input gives the wrong result ComplexExpand[Conjugate[f[x]], {x}] (*f[x]*) instead of Conjugate[f[x]]. In particular it ...
1
vote
1answer
245 views

How to prevent tiny complex errors in Integrate?

Integrate is adding a tiny imaginary error to an easy result. Why? And how can I stop it? ...
0
votes
1answer
511 views
9
votes
2answers
370 views

Integrate and NIntegrate disagreeing over branch cut of Sqrt?

Bug introduced after 8.0.4 and before 9.0.1, and fixed in 11.1.0. In Mathematica 10.2 I'm trying to integrate this piecewise continuous function, but Integrate and ...
8
votes
2answers
368 views

Why does N[Re@f] give complex result?

Consider this code: ...
7
votes
1answer
313 views

Simplify doesn't work properly

I have function and its output. But output isn't simplified. I have tried Simplify[%, x < 0], but result was been the same. ...
7
votes
3answers
255 views

Obtaining a matrix of complex values from associations giving the real and imaginary parts of each element?

I have a list of associations keyed by real and imaginary numbers, like so: ...
7
votes
2answers
195 views

Portion of Curve Omitted by Plot

In the course of addressing question 104559, I encountered the following problem with Plot. Begin with ...
5
votes
3answers
339 views

Analytic result for integral?

I would like to do the integral $$I=\int_0^{2\pi}d\phi\frac{\ln(e^{i\phi}+e^{-i\phi}-\frac{5}{2})}{e^{i\phi}+e^{-i\phi}-\frac{5}{2}}.$$ Numerically, we readily find that it has a specific finite ...
5
votes
1answer
169 views

Calling Integrate with many limits of integration

I accidentally discovered that you can put many numbers into the limits of integration of Integrate and Mathematica will still evaluate it without returning an ...
4
votes
2answers
251 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
325 views

Returning all branches of a multiple-valued function

This question and answer was inspired by this closed as duplicate question. One possible definition of the n-th order root of x ...
4
votes
1answer
149 views

Imaginary part of expression too difficult to calculate

I am trying to calculate the imaginary part of a long expression. It's a long enough expression that Mathematica "hangs" when you run: ...
4
votes
4answers
8k views

How to take conjugate of a function?

Naïvely this is what happens and it obviously is not helpful! ...
4
votes
1answer
220 views

FullSimplify on complex numbers seems inconsistent

FullSimplify[c Conjugate[c]] returns Abs[c]^2 while FullSimplify[2 c Conjugate[c]] ...
3
votes
3answers
943 views

How to extract phase angle from sinusoid

I'm doing some electric circuit calcualtions and I'm trying to get the phasor representation of some arbitrary function of Sin or Cos. Could be complex like: ...
3
votes
2answers
141 views

How to make an organised investigation of branch cuts from a solution to a differential equation

I am attempting to solve two differential equations. The solution gives equations that have branch cuts. I need to choose appropriate branch cuts for my boundary conditions. How do I find the correct ...
3
votes
1answer
133 views

Finding the maximum real part of roots

Suppose that I have this problem ...
3
votes
1answer
1k views

Exporting/Importing a Table of complex numbers

I'm generating a long table of list of the form: PN={{1,2,1+i},{3.5,2.6,2}...},{...},... Using: Export["PN.dat", PN, "Table"] ...
3
votes
5answers
4k views

How to extract only real solutions from the result of Solve

For Example, I have the following polynomial equations: $$ \left\{ \begin{array}{ll} \dfrac{2025 (208 x+5 (y-3446))}{52 (y+90)^2}+\dfrac{300 (8 x-21 y+1920) (y-80)}{7 (x+30)^3}+\frac{300 (80 x-21 z+...
3
votes
2answers
454 views

Show does not combine the plots [duplicate]

i've the following problem: because it's not possible to plot complex numbers (or is it?) i created my own "function": ...
3
votes
1answer
614 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 ...
3
votes
2answers
439 views

Define PolyLog so that positive reals evaluate on upper edge of branch cut

Generalizing the previous question: Define Log so that negative reals evaluate on lower edge of branch For real positive values $x>1$, Mathematica's polylogarithm function ...
3
votes
2answers
399 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 ...
2
votes
1answer
61 views

Solving complex differential equation with ParametricNDSolveValue

I am trying to solve a complex differential equation for the function $S(u,v)$ depending on the parameter $\omega$. The code is: ...
2
votes
1answer
44 views

Verifying $F(A)\subset B$ numerically and symbolically for a complex function $F$ with assumptions

As it is mentioned in a previous question of mine, 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)}...
2
votes
1answer
135 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 ...
2
votes
2answers
1k views

Differentiation of an unknown function

I have to take the partial differentiation of an unknown function. For example, take the unknown function to be $g(x)$. Then it's derivative w.r.t $x$ is $g'(x)$. By default, Mathematica ...
2
votes
1answer
187 views

Need to take infinite sum of residues, is there a way to choose the order of operations for ReleaseHold?

I'm computing an infinite sum of residues. I want to do something like this: ...
1
vote
1answer
61 views

Plotting the roots of polynomials which coefficients are functions [closed]

I am working on Mathematica just for few days and I am confused to plot the roots of a polynomial which coefficients are functions. In Mathematica examples, I found some simple examples such as : <...
1
vote
1answer
114 views

Evaluating Residue at pole with different forms

I want to evaluate residues at the poles of the function $\frac{1}{z^{3/2}+r^{3/2}}$ fun = 1/ (z^(3/2) + r^(3/2)); where z ...
1
vote
1answer
287 views

How to find the pole of a equation where the residue exist?

I want to calculate the residue of an equation, such as: equ = 1/((x - 2)Sqrt[x - 1]) So first I need to find the pole of the equation. My method is find the ...
1
vote
1answer
63 views

Plotting line segments in complex plane

Recent versions of Mathematica have introduced various functions for plotting in terms of complex numbers and complex functions, including ComplexPlot, ...
1
vote
2answers
210 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: ...
1
vote
2answers
756 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: (source: brocku.ca) Is ...
1
vote
1answer
107 views

Find roots of transcendental function in regional complex plane

I want to know how many roots does the following equation have and how to solve them all. $f(z)=\frac{\text{sech}(35.0937 x)}{\left(e^{70.1873 x}-1.\right) x} \left((0.\, +0.0235822 i) x^2 \exp \...