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

learn more… | top users | synonyms

0
votes
1answer
138 views

I integrate a real function, I want a real result [closed]

I want to count some integral in Mathematica (actually, check that this integral is zero...) I arrive to an answer which has a zero real part but has some imaginary part! Why? This could be a mistake ...
0
votes
1answer
83 views

A question about using Reduce [closed]

Can someone help decipher what is the meaning of this computation that Mathematica has done? ...
0
votes
1answer
115 views

Series expansion of a complex function

How do I expand a function $f(z)$ in a particular region? For example, how would I expand $f(z)=(z^2-3z+2)^{-1}$ in the region $0<|z-1|<1.$? I believe this can be done by the binomial theorem. ...
2
votes
1answer
92 views

Determine types of input, output and internal variables in compiled functions

I am trying to speedup the computation of a longer function using Compile. For illustration consider the following short example: ...
0
votes
1answer
58 views

Simplifying complex expressions

I'm trying to work with complexes and I want Mathematica to know that all variables are real unless I explicitly assigned the variable with an I so I wrote: ...
3
votes
1answer
130 views

How to do this complex integration on the real line?

$m, r$ are parameters in the following integral: Integrate[z Exp[I z r]/Sqrt[z^2 + m^2], {z, -∞, ∞}] How to do this integration directly? The result should be ...
1
vote
2answers
145 views

How to find the complex number has least and greatest modul satisfying a given condition?

Let be given the complex number $z$ satisfying the condition $|z-2+2i|=2\sqrt{2}$. I want to find the complex numbers $z$ so that their modul obtain least and greatest value. I tried. Put $z = x + y ...
3
votes
1answer
67 views

Complex LogIntegral error

Going through Derbyshire's Prime Obsession & trying to take LogIntegral of 20^ZetaZero[1] & comes up with a value of ...
0
votes
0answers
33 views

Check if a (possibly nested) list is real [duplicate]

I have a very large matrix of numbers. I want to check if all its entries are real. At the moment I am using realQ = And @@ Thread[Flatten[Im @ #] == 0] & Is ...
3
votes
1answer
288 views

How to get rid of all complex numbers and functions?

For almost esthetical reasons, I always have been fascinated by infinite sums of series and I always wonder if theyhave a closed form. A couple of days ago, I found on MSE a question related to the ...
-2
votes
2answers
87 views

Plot isn't outputting a plot [closed]

I am trying to plot the magnitude complex function (f) with respect to w. For some reason, Plot is just displaying a set of axes, with no points. Any Idea what's going on here? ...
0
votes
0answers
39 views

Plotting a complex valued function in mathematica [duplicate]

How can I plot a complex valued function like $f(z)=z^2, z=x+Iy$, in Mathematica? Can anyone help?
0
votes
1answer
138 views

Plotting discrete points on a phase plot

I'm trying to generate a phase plot of a sinusoidal voltage at discrete points using the following code: ...
0
votes
1answer
64 views

decomposing a complex equation

I have an equation such as: a*z^2 + b*(z - c)^2 == d where z is a complex variable and ...
3
votes
2answers
139 views

Complex limit gives wrong answer

I'm evaluating $$\lim_{z\to e^{i \pi/2 n}} \frac{z-e^{i \pi/2 n}}{z^{2 n}+1}$$ with Mathematica 9.0.1: ...
2
votes
1answer
610 views

Simple way to plot a complex valued function of one real variable

How can I plot a complex valued function of one real variable, $f(t)$, as $$x=-\Re f(t),\ z=\Im\ f(t),\ y=t \space?$$ My aim is a 3-dimensional path, treating the complex valued function as if it ...
0
votes
0answers
112 views

Alternate method of conjugation using replaceall

Mathematica really struggles to simplify complex conjugates of complicated expressions - even given assumptions for every symbol in the expression being real. Often times I've found that I can ...
2
votes
1answer
86 views

Solving Complex Equation Over Reals

I want to solve the equation $\frac{abi}{a+bi}=4-2i$, where $a$ and $b$ are real numbers. I know from hand-solving the answer is $a=5$, $b=-10$. How do I get Mathematica to tell me this? I tried: ...
4
votes
1answer
201 views

Factoring a two variable polynomial in a special way

Let $$f=x^9-x^6+4x^5y+2x^3y^2-y^4$$ I would like to factorize $f$ into form: $$(y-F_1(x))\cdots(y-F_k(x))$$ over complex numbers. How can I do it with Mathematica?
2
votes
2answers
203 views

Weighted mean of complex exponential function using NIntegrate

I have defined the following functions: ...
0
votes
1answer
167 views

Bifurcation with a system of equations

I'm trying to plot a flip bifurcation diagram for a dynamical system of equations as follows: x'[t] == v[t] v'[t] == x[t] - A x[t]^3 + R*Cos[\[Omega]*t] - B v[t] ...
2
votes
2answers
172 views

Limit of a complex function

Can someone show me how to find the limit of a complex function? Example: z1 = 3 + 4*I some_function[z] = z * z1 Set-up: ...
2
votes
0answers
93 views

Constrain integration to be over real domain

I am trying to integrate the following: Integrate[(2*Cos[Sqrt[F]*z - G])/E^(D*(p + z)^2), {z, -(h/2), h/2}] I am getting solution in complex domain: ...
4
votes
2answers
425 views

Why does this integral have a complex component?

I wanted to find the probability of my normally-distributed random variable being at least 15, so I set up this integral: ...
4
votes
2answers
775 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$$
1
vote
0answers
70 views

The number of real values assumed by combinations of complex roots of a decic

Define complex conjugate as the pair of complex numbers $a+bi,a-bi$. Assume you have 5 such pairs and they are the 10 roots $x_i$ of a 10th-deg equation with integer coefficients. In general, how many ...
1
vote
2answers
530 views

Export complex number to excel or txt file

I'm doing some calculations on complex numbers in Mathematica. I can use Export to generate a file (*.CSV or *.dat, or anything else) of complex numbers. If I want to use excel, origin or Matlab to ...
3
votes
1answer
472 views

Plotting multiple lists of complex numbers

The user #Nasser showed an elegant way to plot complex numbers: ...
3
votes
1answer
178 views

When does the real part of Zeta vanish on the critical line?

This seems to be a quite a simple problem but I cannot make it work. I am trying to find all values within a given range for which the real part of the Zeta function vanishes on the line: ...
2
votes
2answers
131 views

How to plot complex values given by Solve

Update Solve[N[Table[BernoulliB[n, z], {n, 10, 10}] == 0]] ...
12
votes
2answers
3k 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?
1
vote
1answer
66 views

Substitute complex functions into complicated polynomials

Mathematica has some strange way of sorting terms. It seems that it is using a canonical sort on expressions, e.g. $\mathbb{i} \sin[x] \cos[y] \cos[z]$ is returned as $\mathbb{i} \cos[y] \cos[z] ...
2
votes
0answers
223 views

Taking real and imaginary parts of indexed functions and speeding up ComplexExpand

I am setting up a large system of ODEs and in order to use the IDA method (which is sig. faster for my system and thus attractive), I must split my equations into real and imaginary parts. I am ...
0
votes
1answer
165 views

Plot complex path (essentially a 2D path) expressed in one real parameter

Consider a complex path expressed in one real parameter, such as $$f(\alpha)=\frac{1}{e^{i \alpha} + 1},$$ which is a Möbius transformation of the unit circle. I know I can expand it all out and use ...
9
votes
0answers
899 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 ...
8
votes
2answers
1k views

How do I find line integrals?

For example, how can I calculate $$\int_{\left | z \right |=1}\frac{dz}{z}$$ I know that the answer is $2\pi i$ but how do I do it using Mathematica?
0
votes
1answer
184 views

Plotting region $f(S)$ for given complex function $f$ and $S \subseteq \mathbb{C}$ [duplicate]

I have a function $f: \mathbb{C} \rightarrow \mathbb{C}$ and I want to be able to see the effect of $f$ on any particular region of $\mathbb{C}$ e.g. what happens to the unit disk under this ...
2
votes
2answers
333 views

About Argument of complex numbers

Suppose my z = x + iy Now, if y=0, then z = x i.e it becomes a real number So, logically ...
1
vote
2answers
332 views

Draw the image of a complex region

I'm working on a complex question that asks that I determine a function that maps the complement of the region $D=\{z:|z+1|\le 1\}\cup\{z: |z-1|\le 1\}$ onto the upper half plane. That is, $f$ must ...
5
votes
3answers
241 views
1
vote
2answers
482 views

Contour plot of complex function: problem in choosing argument

I have a complex function F[x,y], and now I want to plot the contour F[x,y] = 0. What can I do in order to have the contour plot vs Re[x] and y (That is, I want to treat y a real variable and x a ...
2
votes
2answers
330 views

How to export a table of complex numbers?

I'm having problems exporting a table of complex numbers. I have: ...
2
votes
1answer
163 views

A question about derivatives (cubics)

Given an equation: f(z) = a (x + I y)^3 + b (x + I y)^2 + c (x + i y) + d Which can be re-written as: ...
1
vote
1answer
471 views

How can I plot a hyperbola from its complex representation?

How can I plot the hyperbola represented by the following complex equation: $$\left|z-a\right|-\left|z-b\right|=2t\tag{1}$$ Should I convert (1) into the following form? ...
0
votes
0answers
151 views

Assigning numerical values to constants results in complex coefficients in Equations of Motion

I am using Mathematica to get the Equations of Motion (EOM) for a mechanical system (using Lagrangian Mechanics). While I get the EOM in symbolic form, on introducing the following code for assigning ...
1
vote
1answer
150 views

Using Collect to gather explicitly imaginary terms

Collect[Expand[(x + I y)^6], I] yields x^6 + 6 I x^5 y - 15 x^4 y^2 - 20 I x^3 y^3 + 15 x^2 y^4 + 6 I x y^5 - y^6 How can I ...
2
votes
3answers
190 views

Conjugating symbolic expression

I am trying to conjugate a symbolic expression, and I have explicitly stated the real terms. However, I simply can't get it to work: ...
0
votes
0answers
113 views

How to add something like a shadow to my resulting figure? [duplicate]

after plotting this function: ...
0
votes
0answers
110 views

Precision of a complex number

In an output I'm getting a number like -0.33998187034939803 + 0.I. Finding ...