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
0answers
37 views

ComplexExpand does not treat everything as real number

ComplexExpand does not treat everything as real number?? Please read the following simple example ...
0
votes
0answers
15 views

Calculate distance base on value that is vary [migrated]

I am new to Mathematica. I am stuck at getting one specific value after calculating with value that is changing from 0.5 to 1.0 I have value 400 and from that I want to go to destination 720 using ...
6
votes
3answers
323 views

How do I plot the images of oriented curves under complex transformation?

I'm working on a complex transformation sketch that I'd like to create via mathematica. I'm working with the function $$w=z^2\tag{0},$$ where its real and imaginary parts are $u=x^2-y^2$ and $v=2xy$, ...
17
votes
1answer
643 views

Mobius transformations revealed

Mobius Transformations Revealed is a short video that vividly illustrates the simplicity of Mobius transformations when viewed as rigid motions of the Riemann sphere. It was one of the winners in the ...
-1
votes
0answers
63 views

Solving system of 9 differential equations with Im & Re parts

I tried to solve a system of nine differential equations. Actually, I tried to do it in two ways, and both of them give me the same error: NDSolve::pdord: Some of the functions have zero ...
1
vote
1answer
73 views

Real and Imaginary parts of solutions to a complex linear ODE system

Consider a complex linear ODE system $x'=Ax$, where $$A=\left( \begin{matrix} 0&1\\ -2&-i \end{matrix}\right). $$ One can first find the eigenvalues and eigenvectors using ...
0
votes
0answers
69 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} ...
2
votes
2answers
107 views

Listplot imaginary part of complex numbers

I have the following list w={{0.01,99 +0.00001414 I},{0.15,6.6370108 +0.003144129 I},{0.25,3.9515722 +0.00854493297 I},{6,0.10041 +0.28132187 I}} and I want to ...
4
votes
1answer
102 views

Optimizing a function containing a complex exponential

I've noticed the following significant different in performance for different formulations of the same function: ...
4
votes
2answers
86 views

Can't solve equation having complex coefficients

Why can't Mathematica solve $\quad\quad\frac{1-i}{\sqrt{2}}=e^{i \alpha } \tan \left(\frac{\beta }{2}\right)$ with the restrictions $\alpha \in [0, 2 \, \pi)$ and $\beta \in [0,\pi]$: ...
1
vote
3answers
76 views

Selecting a specific complex number from a list

I have a formula which is producing a large (hundreds of elements) list of complex numbers of the simple form $x+iy$. However I'm only interested in the one value which satisfies the conditions: ...
1
vote
4answers
167 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 ...
1
vote
1answer
65 views

How to solve the warning problem and obtain real roots without imaginary part?

I am trying to solve a equation with Newton's method via FindRoot, and the codes are: Define the functions: ...
1
vote
1answer
75 views

Plot sets in the complex plane [duplicate]

I just want to know if there's a way to plot sets in the complex plane. For example $$A=\{z\in \mathbb{C},z+e^{z}=0\},\\A=\{z\in \mathbb{C},\Re(z)+e^{z}\geq0\}.$$
3
votes
1answer
88 views

Express a complex function $f(z)$ as $u(x,y)+iv(x,y)$

How can I write a complex function $f(z)$ in the form $u(x,y)+iv(x,y)$ using Mathematica? Re and Im do not work, because they do it for complex numbers, not functions. For example, if I try ...
1
vote
1answer
130 views

Check for holomorphy of a function

Given a (rather complicated) function H(z), what is the best approach to check symbolically whether it is holomorphic? What I tried is checking explicitly the ...
1
vote
1answer
89 views

How do I solve for the real and complex parts of an equation simultaneously?

If I were to have an equation, say something similar to... (1-Sqrt[x - I y])/(1+Sqrt[x - I y]) = A + I B Where I = Sqrt[-1], is there a way for Mathematica to ...
2
votes
2answers
155 views

Contourplot of complex Roots

Suppose I have this equation: $$ z^2 + 3z + (x^2 + y^2) = 0 $$ I want the real and complex contour plot of $z(x,y)$. Analytically, the real/imaginary boundary is separated by condition $x^2 + y^2 ...
7
votes
2answers
241 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. ...
1
vote
1answer
90 views

Simplifying complex expression with Mathematica

I want do get the imaginary part of Exp[I*t]/(1-Exp[I*t]) I've tried to do this Im[ComplexExpand[Exp[I*t]/(1-Exp[I*t])]] ...
0
votes
0answers
54 views

Why does this integral have a complex result

I wanted to find the normalization of distribution F2 . ...
3
votes
1answer
287 views

HarmonicNumber problem

I am looking for all the roots of HarmonicNumber, in the domain [-30, 1] and [0, 6000] for the real and imaginary parts, respectively, and where the parameter ...
0
votes
2answers
95 views

Absolute value and argument of a complex expression

I would like to find the absolute value and the argument of the expression: $ x + \sqrt { x^2 + y^2 } $ under the assumption that the absolute values of $ x $ and $ y $ are equal. I have written: ...
1
vote
1answer
77 views

Real and imaginary parts of a complex number

I would like to find the real and imaginary parts of $x + y$ in terms of polar coordinates. Here is code: ...
0
votes
3answers
100 views

Displaying the roots of a complex function using ListCurvePathPlot

I have the following algorithm: ...
0
votes
1answer
55 views

How to evaluate Floor[1/2 + Arg[z]/(2π)] with Re[z] > 0

I want to do a series expansion of an expression containing Gamma functions with specific arguments. An example is the following: ...
-2
votes
1answer
82 views

how draw root locus in mathematica 9 for a special case

my closed loop transfer function is: H(s)=2exp(-q)/(1+exp(-2q)) q=sqrt((a+k*sqrt(s)+s)*s) , s=sigma+jw how can i draw root locus of H(s) as 'a' changes for ...
3
votes
1answer
125 views

Riemann surface for cubic root

I'm trying to generate Riemann surfaces of higher order. I read How to visualize Riemann surfaces?, and the subsequent documents. I'm able to reproduce the surface using polar representation, but I'm ...
2
votes
1answer
161 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 ...
1
vote
2answers
128 views

Complex differential equation

I want to solve $dx/dt=\sqrt{(1-x^2)}$, where $x$ is complex. When I solve it by hand and analytically for some initial value and draw the imaginary part versus the real part, I obtain an ellipse, as ...
0
votes
1answer
95 views

Plot a real part of complex equation depending on a parameter

I would ask you to kindly provide me a way to solve this problem in mathematica way. Let the equation $z^2 + 9 -1.5 e^{- t z}=0$ where $z\in \mathbb C$ and $t\in \mathbb R^+$. In order to plot graph ...
0
votes
0answers
56 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
94 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
58 views

Polar Plotting in Complex Plane [duplicate]

How would I plot the following functions in the polar complex plane? $$ \phi={-k\over 2\pi r}cos(\theta_0-\theta) $$ and $$ \psi={-k\over 2\pi r}sin(\theta_0-\theta) $$ Please ...
0
votes
1answer
69 views

Trouble fitting an explicitly complex model with the TransformedFit package

This is follow up from a previous question in which @Oleksandr R. suggested the use of a package he developed for splitting a model and data into real and imaginary parts to avoid a problem with ...
0
votes
1answer
60 views

Can't Plot Fourier Series [closed]

I have been trying to plot fourier series but the plot is allways empty. I guess there is something wrong in my code but i dont know exactly what is it. Looking here for some previous ...
-2
votes
1answer
152 views

How to solve a non-linear equation?

I am trying to solve the following non-linear equation: $\frac{i e^{-x^2} \sqrt{\pi } x}{K^2}+\left(-0.131251-0.0379031 x^2-0.0151154 x^4-0.0100462 x^6+0.5 \left(0.00273859 +0.0400003 K^2\right) ...
0
votes
0answers
74 views

About how Mathematica understands the branchcuts of the complex logarithm [Part 3]

One understands that for the function $\log(z^2+a^2)$ Mathematica implicitly puts the branch cuts to be starting at $\pm ia$ and going up/down respectively on the imaginary axis. The phase of this ...
1
vote
0answers
43 views

Conjugate of InterpolatingFunction?

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

Always the same problem with Conjugate [duplicate]

I want to compute something like : ...
0
votes
0answers
673 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
76 views

How does Mathematica understand branchcuts of the complex logarithm? [Part 2]

I observe that the answer generated by the first integration is not in any simple way related to the next two answers. (some simple jump of i 2\pi across the branchcut of the logarithm is not helping ...
9
votes
1answer
584 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 ...
0
votes
0answers
37 views

Chopping pure Imaginary numbers [duplicate]

I would like to be able to Chop complex numbers and display only the non-zeroed real or imaginary part when applicable. Chop alone works just fine if the non-negligible part is only the real part. ...
1
vote
1answer
96 views

FindFit::nrlnum What am I doing wrong?

I have a model called qobs: ...
0
votes
1answer
136 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
102 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
83 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
55 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: ...