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

36
votes
6answers
5k views

Finding real roots of negative numbers (for example, $\sqrt[3]{-8}$)

Say I want to quickly calculate $\sqrt[3]{-8}$, to which the most obvious solution is $-2$. When I input $\sqrt[3]{-8}$ or Power[-8, 3^-1], Mathematica gives the ...
13
votes
4answers
9k 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 ...
11
votes
2answers
5k views

How to specify assumptions before evaluation?

If I request mathematica evaluate an integral for me, I'll often get a more general ConditionalExpression than I want. Example : ...
13
votes
2answers
4k 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?
48
votes
4answers
4k 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. ...
12
votes
2answers
3k 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: ...
3
votes
1answer
200 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: ...
6
votes
4answers
3k views

Plotting 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 ...
18
votes
3answers
2k views

Visualizing a Complex Vector Field near Poles

I've been playing around with a visualization technique for complex functions where one views the function $f: \mathbb{C} \rightarrow \mathbb{C}$ as the vector field $f: \mathbb{R^2} \rightarrow ...
8
votes
4answers
6k views

Factoring polynomials to factors involving complex coefficients

I've run into some problems using Factor on polynomials with complex coefficient factors. Reading the documentation it looks like it only factors over the ...
4
votes
1answer
869 views

Symbolic integration in the complex plane

Context While answering this question, I defined (symbolic and numerical) path integrations as follows ...
2
votes
1answer
711 views

Finding residues of multi-dimensional complex functions

Say I have a function $f$ of $n$ complex variables, $\{ z_i \}_{i=1}^{i=Nc}$. And then I want to contour integrate the expression such that for each $z_i$ its an integration on an unit circle about ...
8
votes
1answer
2k views

Is it possible to set a variable as a positive one in the whole notebook?

I'm having issues during integration due to the fact that Mathematica doesn't know if an undefined variable is positive or not (it gives me complexes which bothers me in the end). For example I do ...
8
votes
1answer
2k views

Bifurcation diagrams for multiple equation systems

I am interested in constructing a bifurcation diagram for some of my parameters (especially for β and γ) in the dynamical system given in the code below. I want to see how parameter changes affect the ...
4
votes
2answers
1k 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$$
4
votes
1answer
216 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?
6
votes
2answers
364 views

How to eliminate the zero real part of a purely imaginary number?

In Mathematica 9, a purely imaginary number, e.g. 0.9 I, will display as 0. + 0.9i in the output form. How can I eliminate the ...
2
votes
2answers
392 views

Eigensystem, Eigenvalue doesn't output nonreal eigenvalues

Basically I have a matrix and when I used either Eigenvalue or Eigensystem, it doesn't output nonreal eigenvalues, instead it ...
10
votes
1answer
697 views

How does Mathematica understand branchcuts of the complex logarithm?

Say I have the function $f(x) = x \tanh(\pi x) \log (x^2 +a^2)$ where $a$ is some positive real number. Then it seems to be me that Mathematica when given such a ...
10
votes
3answers
2k views

Derivative of real functions including Re and Im

When deriving functions using Re, Im or Arg (and probably some other functions as well), ...
11
votes
3answers
2k views

How can I convert a complex number a+b I to the exponent form A Exp(I phi)?

When I have an expression such as: (1/4 + I/4) ((1 - 2 I) x + Sqrt[3] y) it is hard to get an intuition of the number. So I want to convert it to the complex ...
9
votes
1answer
3k views

Complex number operations: telling Mathematica variables are real

I want to do Conjugate[a + b*I], but when I do that, the solution is Conjugate[a] - I*Conjugate[b]; when for me, a and b are ...
4
votes
4answers
2k views

Solving complex equations

I feel like I am missing a basic, but key point when using Mathematica's Solve or Reduce. ...
4
votes
1answer
607 views

Does the Im function work with symbolic arguments?

Does the Im function work with symbolic arguments? ...
7
votes
3answers
4k views

Is there a simple way to plot complex numbers satisfying a given criteria

I think this should be straightforward, but I cannot seem to find a good source on how to do it after searching around, so I'm trying to sketch sets of complex numbers that meet a given for criteria. ...
2
votes
1answer
2k views

Forcing FindRoot to return only real solutions

FindRoot documentation reports that if the equation and the initial point are reals, the solutions are searched in the real domain. However, in the following case I ...
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?
2
votes
3answers
206 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: ...
1
vote
2answers
349 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 ...
4
votes
2answers
553 views

What can I do to eliminate the error FindFit::nrjnum:?

I am testing the "Power Law with finite-time singularity" hypothesis for world population growth for a project. The data I'm using (same behaviour should also be exhibited by the stock market, thats ...
4
votes
2answers
261 views

presenting a real number as real instead of imaginary

I have an equation which results in an answer of the form $\frac{i a}{\sqrt{c-d}}$ is there any way to get Mathematica to present it in it's real form? like $\frac{a}{\sqrt{d-c}}$ I know that I ...
10
votes
0answers
1k 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 ...
5
votes
3answers
254 views
0
votes
1answer
2k views

Complex line integral

Can someone recommend an online article or introductory tutorial that will show me how to do real and complex line integrals using Mathematica?
4
votes
3answers
3k 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 ...
8
votes
1answer
350 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 ...
7
votes
2answers
291 views

Does FindFit support complex numbers or doesn't it?

Inspired by this previous question: Findfit doesn't give the good fit; Changing the starting values will not change the results. Consider the following complex-valued dataset. ...
7
votes
3answers
202 views

Wrapper for inexact numeric complex numbers that maintains polar form

Related question: How can I convert a complex number a+b I to the exponent form A Exp(I phi)? Mathematica insists on displaying complex number in form a+I b when ...
6
votes
6answers
1k views

Image of first quadrant under $f(z)=(z+i)/(z-i)$

I'm able to plot the region where Im[z] > 0 and Re[z] > 0: ...
5
votes
1answer
474 views

How do I put an image on the complex plane?

I watched this video and became interested in transforming an image. But I have no good idea on how to embed an image in the complex plane using Mathematica. I have a method that seems to work, but ...
2
votes
1answer
203 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 ...
6
votes
1answer
162 views

How to reduce expressions with complex coefficients in the form of a+0.*I

I'm trying to get an eigenvalue equation in Mathematica, and the result is an expression with coefficients of the form a + 0. I. For example, Is there any clever ...
4
votes
2answers
515 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
232 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 ...
3
votes
2answers
265 views

Show does not combine the plots

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
424 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"] ...
1
vote
1answer
145 views

FindFit::nrlnum What am I doing wrong?

I have a model called qobs: ...
1
vote
1answer
418 views

why there is a small imaginary part [closed]

I encountered a problem. I have a eigenvector eigvsI[1] ...
1
vote
1answer
755 views

Plotting a complex function [duplicate]

What does it mean if this message appears: {Im[(1-E^Times[<<3>>] f)/(1-Power[<<2>>] f)]-0,Im[(1-E^Times[<<3>>] f)/(1-Power[<<2>>] f)]-0} must be a list of equalities or ...
0
votes
3answers
207 views

Conjugate and simplify

I want to get a cosine from taking the real part of a complex exponential: $cos(x) = Re(exp(i x))$. What I do in Mathematica is ...