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 (1)

1
vote
1answer
86 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
129 views

Optimization for inequalities in $\mathbb{C}$

I want to check when the expression $$ \sqrt{\sqrt{\lambda^{2}\left(2E+\lambda^{2}\right)}+E+\lambda^{2}} $$ is real, when it is purely imaginary and when it is complex (with imaginary part not ...
16
votes
0answers
2k 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 ...
14
votes
0answers
251 views

Why does Mathematica choose branches as it does in this situation?

Consider these integrals: ...
3
votes
0answers
51 views

Why does FreeQ seem not to work with complex numbers?

I guess I do not understand how Mathematica evaluates this simple expression inside FreeQ ...
3
votes
0answers
93 views

Discrepancy in the series expansion of $\log(z/(z-1))$ in Mathematica 5

When I calculate the series expansion of $\log\frac{z}{z-1}$ around $0$ in Mathematica 5.2, I obtain: ...
3
votes
0answers
359 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 ...
2
votes
0answers
33 views

Solving a differential equation with a complex (independent) varible

I'm trying to plug in complex values in the numerical solutions of ODEs without success. For instance y[I] /. NDSolve[{y'[x] == 0, y[0] == 3}, y, {x, -10, 10}] ...
2
votes
0answers
116 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: ...
2
votes
0answers
73 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 ...
2
votes
0answers
396 views

Simple contour integral with a parameter gone wrong

Bug introduced in 7.0 and fixed in 7.0.1 I run into the following problem, I tried to evaluate a very simple integral: ...
1
vote
0answers
90 views

Real part of a sum

I would like to take the real part of the following expression: Sum[(a[i] + I b[i]) r^i/(r^2 + z^2)^i, {i, 0, 2 n}] where all of ...
1
vote
0answers
50 views

Complex input for Compile makes it slow

I asked a question here and then tried to use Compile for the solution to gain even more speed. Inside Compile there is a loop ...
1
vote
0answers
54 views

Conjugate of InterpolatingFunction?

From NDSolve, I got this: {{a1 -> InterpolatingFunction[{{0., 40.}}, "<>"]}} What would be a sensible approach to ...
0
votes
0answers
74 views

Plotting Real and Imaginary parts of Riemann Surfaces

I'm working on a project where I need to take curves like, for example, $y^{2}=(x^{2}-1)(x^{2}-3)$ and plot their real and imaginary parts. More specifically, let $x$ just be real and then plot ...
0
votes
0answers
50 views

Simplification of a complex-valued expression with purely real components

(I'm including all the information here, as I'm not sure how much of it is necessary to solve the problem. For a tl;dr skip to the bottom) I've been working on a problem involving calculating ...
0
votes
0answers
224 views

Differential equations with a complex variable

Is Mathematica able to handle ordinary differential equations where the variable itself is complex? I am looking for solutions of ODE systems of the form $$\left\{ \begin{align} i\frac{da_1}{dt} ...
0
votes
0answers
81 views

Why does this integral have a complex result

I wanted to find the normalization of distribution F2 . ...
0
votes
0answers
147 views

Complex integrals and residues

I have a question. I try to integrate this function: Integrate[Exp[I k z]*Exp[-Sqrt[k^2 - A^2]x]*Exp[-k^2*L^2/4]/Sqrt[k^2 - A^2], {k, -Infinity, -A}] But ...
0
votes
0answers
191 views

A power series expansion

Consider the function, $f(z) = z tanh(\pi z) log (z^2 + a^2)$ for some $a>0$. Now I am considering 3 different situations, $z = i(n+0.5) - i\epsilon + \delta - it$ for $n \in \mathbb{Z}$ and ...
0
votes
0answers
1k views

Fastest way to create a NxNxNxN dimensional matrix

I have a function that outputs a complex number Func[x_,y_]:= blah blah; I have constructed a table of all possible values of this function. ...
0
votes
0answers
187 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 ...
0
votes
0answers
186 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 ...
0
votes
0answers
464 views

Solve equations real and imaginary part separately

For my system of equations, the procedure described in Solving complex equations of using Reduce works no more. How can I separate the real and imaginary part of ...