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)

0
votes
0answers
31 views

How to replace Real part o f a complex number [on hold]

I want to replace the real part of a list of complex numbers by zero. I try these two solutions but it does not works ...
0
votes
2answers
91 views

Integral over real valued function becomes complex

I've tried to solve the following integral, but I get a complex solution even tough it should only have a real part. $$f(x)=- \frac{10^{-20} x}{0.99005- e^{10^{-12}x}}$$ Now I want to calculate the ...
1
vote
1answer
106 views

Conjugate[a/b + c/d]

Trying to obtain the result of Conjugate[a/b+c/d] only gives the same result. As such, I use Refine as: ...
0
votes
0answers
65 views

Tricky inverse Laplace transform

I'm trying to compute the inverse Laplace transform of $f(s) = s^c/(N + s^{ir} )$ where $c,N \in \mathbb{C}$ and $r \in \mathbb{R}^+$ using the Bromwich integral $$ F(t) = \frac{1}{2 \pi i} \int_{- ...
0
votes
0answers
36 views

Interval arithmetics and complex numbers

I am trying to do some simple calculations for a computer assisted proof and since they are not too demanding I thought of using Mathematica. I seems that Mathematica is great for interval ...
6
votes
2answers
1k views

Plot3D with coloring based on phase value of f

I'm reading a sample chapter of Visual Complex Functions by E. Wegert. Near the bottom of this page, there is a link "Download Sample pages 1 (pdf, 2.4 MB)" which allows you to read Chapter 2 of the ...
0
votes
0answers
22 views

Factorising polynomials in Z[i] over Z[i] [closed]

I know that you can use the 'factor' command to factorise polynomials with real coefficients over the Gaussian Integers doing something like this: ...
28
votes
1answer
3k 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 ...
1
vote
2answers
224 views

How to compute this integral?

I'm trying to calculate this integral : $$I(z,k,a)= \displaystyle\int_{1}^{\infty} t^2\, \text{ArcTanh} \left(\sqrt{\frac{t^2-1}{t^2}} \dfrac{k}{z}\right)\, e^{-a\,t} \, dt$$ Where : ...
0
votes
0answers
56 views

Possible to plot Real vs Imaginary for Plot3d?

Tristan Needham stated in the introduction to Visual Complex Analysis that he used Mathematica to create the majority of graphs in his book. I'm trying to recreate the graph he made for figure[14] of ...
1
vote
1answer
64 views

Using NSolve for Elliptic Equations over Fundamental Parallelogram in Complex Plane [closed]

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 ...
10
votes
1answer
114 views

Definition of Mod and Quotient with complex arguments

How are Mod and Quotient defined for three real/complex arguments? I wasn't able to find the definition. My main surprise so ...
3
votes
3answers
124 views

How to obtain this expression in terms of real functions

I know that this expression (2 (ArcCot[E^(-((I ϕ)/2)) r] + ArcCot[E^((I ϕ)/2) r]))/π is real, because is the sum of a real series, in particular: ...
0
votes
1answer
34 views

Complex number simplifications

My Mathematica notebook is not simplifying some expressions which do look trivial. I mean that one of my outputs contains: ...
18
votes
1answer
477 views

Numerical inverse Laplace-Hankel transform

When trying to reproduce the result of this paper about numerical solution of Lamb's problem, I encountered the following double integral (to be more precise, the 0-order inverse Hankel-Laplace ...
5
votes
3answers
252 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: ...
1
vote
0answers
236 views

A power series expansion [closed]

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}$ ...
1
vote
2answers
90 views

Plot values of an $m\times n$ matrix on the complex plane with color varying along $m$

Let's say I have a complex valued matrix $\begin{pmatrix}1+I&2+2I&3+3I\\4+4I&5+5I&6+6I\end{pmatrix}$ represented by a list: ...
-1
votes
1answer
83 views

Image of the unit circle under a complex rational function

Let $$f(z)=\dfrac{z(z-a)}{(z-b)(z-c)(z-d)}$$ be a complex rational function with distinct non zero complex numbers $a,b,c$ and $d.$ I need to plot the image of the unit circle $S=\{z\in\mathbb{C} : ...
0
votes
3answers
59 views

how to take complex conjugate of a real variable

I have a function defined as follows: g[θ_] := 1/k (Exp[-I δ0] Sin[δ0] + 3 Exp[I δ1] Sin[δ1 Cos[θ] + 5/2 Exp[I δ2 (3 (Cos[θ])^2 - 1)) and I compute ...
-1
votes
1answer
64 views

Real and Imaginary matrix

I have a 2 by 2 matrix T: {{x, y}, {-y, x}} where x is the real part of some complex number and y is the imaginary part of something complex number. Let's say z1 = ...
0
votes
1answer
52 views

What makes imaginary parts show up?

If I define a function using alpha[y_, d_] := 2 ArcCos[1 - (2 y)/d] Then if $y$ and $d$ are equal, the result is $2\pi$ : ...
1
vote
1answer
60 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 ...
0
votes
3answers
74 views

Write complex number in terms of absolute value and phase

I have a long vector and some of the values (19 out of 64) are complex. I got them using the Mathematica Rationalize function, so the complex ones are written in the a+bi form. Is there a function I ...
6
votes
0answers
67 views

Generating OpenCL C code [closed]

I'm trying to make an interactive complex function plotter using OpenCl. So far I can only plot functions that I hardcode into the kernel by hand. I'd like to be able to use ...
1
vote
0answers
48 views

Finding Complex expression [closed]

How do you find a real part of a complex expression? Here is an example of what I am looking for complexExpand[Sqrt[x + I*b]] gives me ...
3
votes
1answer
108 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 ...
3
votes
2answers
180 views

How can I get Mathematica to simplify this i * sqrt expression

In[11]:= FullSimplify[I Sqrt[-1 + w^2], Element[w, Reals], Assumptions -> 0 <= w <= 1] Out[11]= I Sqrt[-1 + w^2] Is it possible to have Mathematica ...
2
votes
1answer
55 views

ComplexExpand and Arg function [closed]

Why does the command ComplexExpand[Arg[a]] gives Arg[a] instead of 0? Isn't it that ...
1
vote
1answer
47 views

Chop not working [closed]

I am running a function that has a large output in matrix format with small, complex parts added to the numbers- basically a rounding error. I am trying to use Chop to obtain use-able results, but ...
8
votes
2answers
823 views

Numerical contour integrations in the complex plane - contour deformation gives different answer for analytic kernel

I am trying to do a contour integration in Mathematica numerically. In particular, I'm checking the identity: $$ H_m^{(1)}(z) =\frac{i^{-m}}{\pi}\int_{-\pi/2 + i \infty}^{\pi/2 - i \infty} \exp[i m ...
1
vote
0answers
56 views

Artifacts in the solutions of NSolve [closed]

I have (what I think are) some problems with the precision of NSolve. I'm trying to solve this cubic equation: $a f^3(x)-b f^2(x)-c f(x)-z=0$ for the function $f(x)$ and then plot the following ...
-1
votes
1answer
28 views

What does mean |sin(z)|<=1? [closed]

I already know that the magnitude of sin(z) its equal to sqrt(sin^2(x)+sinh^2(y))
14
votes
2answers
4k views

Plotting complex Sine

I've got another plotting problem. I want to plot Sin[z] where z is complex. So, I've tried the following: ...
1
vote
1answer
41 views

How to find function existence border

I have a function like this f[x_, a_] = Log[-x - a]*(-x - a) + Sin[a]; this function does exist if x > a because of Log[]. a - parameters. if I plot a few graphs ...
0
votes
1answer
43 views

How can I plot an exponential Fourier series? [closed]

Iam triying to plot summatory of the next function: (e^(i*n*t*wo)*Sin[n*Pi/2])/(n*pi) I have no problem plotting a trigonometric fourier serie, so the only ...
1
vote
1answer
33 views

Distribute Conjugate over expression?

I have this output: Conjugate[Subscript[a, 0][x] + t^\[Beta] Subscript[a, 1][x]] I want to distribute Conjugate: ...
0
votes
3answers
91 views

ploting the graph of 1/z for a given value

I want to plot the graph of ${1}/{z}$ , for a specific single value of |z| (z - complex variable) . I would like something like ...
0
votes
0answers
52 views

Using DeleteCases to ignore term of Product

I'd like to calculate $\int_{-\infty}^{\infty}\mathrm{d}x/(1+x^6)$ through a variation of the residue formula, which is $\int_{-\infty}^{\infty}f(x)\mathrm{d}x=2\pi i\sum \text{Res }f$ for Residues in ...
68
votes
4answers
6k 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. ...
0
votes
0answers
36 views

How to specify in NDSolve that the sought function is holomorphic?

If I include the Cauchy-Riemann equations condition in complex form for the sought holomorphic function gf in NDSolve like this: ...
2
votes
2answers
89 views

Plot a line on the complex plane knowing one point and its orientation

I want to draw a line on the complex plane which begins at $0.4+0.1i$, and with an angle of $\frac{\pi}{4}$ with respect to the real axis. Is there a simple way to do this in Mathematica?
7
votes
1answer
269 views

Branch cuts of sqrt

I was trying to plot some complex functions with branch cuts on mathematica but I have two problems. 1) The function is with z-Sqrt[z-1]*Sqrt[z+1] with z complex. Now Mathematica says that the ...
3
votes
1answer
139 views

Why does Compile not make my function faster?

I need to speed up a large program that repeatedly calls the module below (I've not trimmed the code for this question to ensure there is enough calculation to show a speed improvement.) The obvious ...
0
votes
1answer
73 views

Simplify Re[z] in equation to more “natural” form [closed]

If you have a triangle in the complex plane with vertexes {a,b,c} (all complex numbers), the length of the altitude from A to the side BC can be computed as: ...
3
votes
1answer
340 views

How to simplify to form without imaginary unit

I have an integral that I compute with Mathematica and as a result I get a seemingly complex expression (i.e. the expression contains the imaginary unit, $i$, at some places). However, if I try to ...
0
votes
2answers
105 views

How to plot list of numbers in the complex plane? [closed]

This should have a trivial solution, but how do I plot a list of (complex) numbers in the complex plane? Or, put another way, why doesn't the code below work? I get the error "... is not a list of ...
7
votes
1answer
85 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 ...