Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [complex]

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

2
votes
0answers
33 views

Speed up Mathematica's Simplify and ComplexExpand functions

I am trying to simplify an expression and taking the real part only. However Mathematica use ages to run the command (if it is able to do so in the end). The problem is that the expression I am ...
0
votes
3answers
56 views

Solution… 2nd Transcendental Equation with Graphical method [on hold]

If $ 2x^3 + \ln x = 5 $, then what is $ x $? For beginning we started to find a solution for equation $$ \begin{align}\label{eq:eq} \ln x + cx = b \tag{1} \end{align} $$ We know from W function ...
3
votes
2answers
100 views

Replace $ z z^* $ by $ |z|^2 $

I have a long expression involving different complex numbers. I want to force Mathematica to replace z Conjugate[z] by Abs[z]^2 ...
0
votes
1answer
52 views

Is there a function to solve a complicated event probability problem? [on hold]

I need to find the probability of this beast: P[(ABEF)+(CDEH)+(ABEI)+(CDEI)+(ABEJ)+(CDEJ)]. A,B,C, etc. represent events with probabilities close to 0.5 so I don't think rare event approximation can ...
0
votes
0answers
69 views

An optimization problem

I have the following two quantities denoted by $LHS$ and $RHS$: ...
2
votes
2answers
109 views

How to make $\mathrm{Abs}[x + y\, I]^2$ produce $x^2 + y^2$? [duplicate]

I want to get x^2 + y^2 by evaluating Abs[a + b I]^2. Unfortunately, Mathematica just reproduces the same ...
0
votes
0answers
56 views

How to obtain left and right eigenvectors of a general complex matrix with degenerate eigenvalues?

I'm looking to obtain the left and right eigenvectors of a general complex matrix. The left eigenvectors satisfy the equation: $\phi^L_i L = \lambda_i \phi^L_i$, with $\lambda_i$ being the $i$th ...
0
votes
2answers
113 views

How to efficiently evaluate Exp[I m θ] [closed]

The I is imaginary number. My question is when m becomes large and the number of θ increases, how to evaluate it faster. Here is one way to get the result and store all the value it found. ...
1
vote
2answers
71 views

Simplify product of complex numbers

I am trying to take product of a complex number with its conjugate. When I take A*Conjugate[A] // FullSimplify The output is as desired ...
0
votes
0answers
55 views

Plot real and imaginary part of function

I have the following function: f3 = (99. (2154.43 - 100. lh^2.))/lh^1. - (0.0609773 ((2154.43 - 100.lh^2.)/lh^1.)^7.30317)/(-4.64159 - lh)^6.30317 If I plot it, ...
-1
votes
1answer
33 views

How to convert this complex number to exponential form? [closed]

I have $Z = {\frac{2+i}{2-i}}$. I need to write it in exponential form, i.e. $Z = r*e^{i{\phi}}$. I simplified the given example to ${\frac{3 + 4i}{5}}$, i.e. $a={\frac{3}{5}}, b={\frac{4}{5}}$. ...
0
votes
2answers
53 views

Solve the complex equation z^2 + ((2 + i)/5)z + 1/11 == 0 [closed]

I have tried to solve this in mathematica but cant find the right way. I used ComplexExpand[z^2 + ((2 + i)/5) z + 1/11] which gave the result ...
2
votes
0answers
27 views

Specifying different thickness for each graded contours of Mandelbrot Set so that I can export it as .STL file.

I am using Mandelbrot Set function in Mathematica to get the Mandelbrot plot. I want to 3d print this model, so want to specify thickness for each contour and then convert into .STL file. Is this ...
4
votes
1answer
70 views

How to achieve faster performance on plotting complex valued functions

I'm very interested in visualizing complex valued functions $f:\mathbb{C} \rightarrow \mathbb{C}$. Especially interesting to me are Möbius transformations. I found a nice way of visualizing these ...
0
votes
0answers
16 views

How to use “Chop” kind of operation on whole mathematica file

In an array of steps including logarithms and integrations, I am finding the problem of small imaginary parts of some o/p's which are complicating/inhibiting the further steps. I found that "Chop" ...
1
vote
1answer
103 views

Can this integral be calculated using Mathematica?

I have the following integral: $$ \int_{-\infty}^{\infty} \frac{\mathrm d\tau}{2\pi \mathrm i} \int_{-\infty}^{\infty} \frac{\mathrm d\tau'}{2\pi \mathrm i} \frac{\mathrm e^{-c^2(\tau - \tau')^2}}{(\...
0
votes
0answers
46 views

Force a function to be real

I have a multivariable function in Mathematica that arises as an eigenvalue of a matrix. It involves square roots of the variables involved, but Mathematica automatically assumes such a function to be ...
0
votes
2answers
39 views

Problem in dealing with Sign function

Let my function be $f(x)=e^{|x|}$. I wish to find $f''(x)$, this can be done as- $f'(x)=$sgn$(x)e^{|x|}$ $f''(x)=$sgn$(x)^2e^{|x|} =e^{|x|}$ In Mathematica, I am trying to plot $f''(x)$, it ...
1
vote
2answers
61 views

Working with complex valued functions

I have a function which has real and imaginary parts and I need to differentiate both parts separately. This is a simpler example of what I have tried, without success: ...
0
votes
0answers
32 views

How can plot absolute inequality in complex number

I am new to Mathematica and i would like to know how to plot a complex function.. I cant plot absolute inequality...
0
votes
1answer
43 views

Plotting complex number error… |z−2|<1

z[x_, y_] := x + yi f[z_] := {1/(z - 1)}; RegionPlot[{(x - 2)^2 + y^2}^1/2 < 1, {x, -100, 100}, {y, -100, 100}] |Z−2|<1 I am new to Mathematica and i would ...
0
votes
1answer
48 views

Roots of an expression

I have an expression as $1 - 2 \sqrt{1 + i r} + i r$, where $r$ is real. I want to find the roots of its imaginary part. So: ...
0
votes
1answer
27 views

Defining 3rd variable for parametricplot3D of two-variable complex function

I am trying to make a parametricplot3D curve of the function Psi(x,t) shown in the included image. My code is the following: ...
0
votes
1answer
60 views

Using “if” to compare 2 expressions (Complex and real numbers)

Hello. I want to solve this cubic equation and compare the answers then I can assing the lower result to "VmL" and the greatest result to "VmG" but I have problems when the result is a complex number ...
1
vote
1answer
47 views

Failure to plot a subset of curves using ParametricPlot

I wish to plot a parametric curve with parameters Γ,Δ,ϵ such that ...
0
votes
0answers
40 views

Density map for complex and imaginary parts of eigenvalues on one graph

I have three eigenvalues of a particular 3x3 matrix. Namely: ...
2
votes
1answer
38 views
0
votes
0answers
35 views

Residues of products

i have the following problem: My function is given by: $(cz^{-1}+aq^{-j}-bq^{-2j}z)\prod_{m=1}^{Q-1}\frac{qz-z_{m}}{z-z_m}+(-cz^{-1}+dq^{j}+bq^{2j}z)\prod_{m=1}^{Q-1}\frac{q^{-1}z-z_{m}}{z-z_m}=E$, ...
15
votes
6answers
787 views

Is there a workaround for this integral?

The command Integrate[Exp[a*Exp[I*x]], {x, -Pi, Pi}] produces ConditionalExpression[0, a == 0] which is not correct in view of ...
2
votes
1answer
94 views

Re and Im relationships without Abs among Fourier, FourierTransform, InverseFourier, and InverseFourierTransform

Is there a way to make Fourier's Re and Im components separately track the results of ...
6
votes
2answers
100 views

Forcing complex output to take the form $a + b\,i$

Solving the complex equation $z^2=1+2\,i$ using Solve[z^2 == 1 + 2 I] returns $\left\{\left\{z\to -\sqrt{1+2\,i}\right\},\left\{z\to\sqrt{1+2\,i}\right\}\right\}$...
5
votes
1answer
108 views

How to plot complex eigenvalues of a matrix?

I have a matrix , for instance, like this : matrix[a_ ] := {{0, a}, {-a, 1}}; Eigenvalues[matrix[a]] and this give the eigenvalues that depends on ...
1
vote
1answer
34 views

Manipulate function not working possibly because of Arg?

I have the following function eigen1 = 1/3*(p + sig - u2/(2^(8/3)*sig) - 3*I*ω); Where ...
0
votes
1answer
45 views

Evaluate sum of complex exponentials using Kronecker delta

Commonly in e.g. condensed matter physics one encounters sums of the form $\sum_{n=0}^{N-1} \sum_{k} A_k \mathrm{exp}[i\frac{2\pi}{N} kn ]$ where $k$ is summed over all integers in the range $[(-N-...
1
vote
4answers
68 views

Problem with particular simplification of complex function under assumptions

I have proven that $expr=(1 - i)(\dfrac{1+z}{1-z})^{1/4}\dfrac{\sqrt{ 1-z^2+i z\sqrt{1 - z^2}}}{1+z-i\sqrt{1 - z^2}}=1$ when it is assumed that $z\in R$ and $|z|<1$ and when I also plot the real ...
0
votes
1answer
45 views
1
vote
1answer
105 views

Eigenvectors normalization

When eigenvectors are real, they are normalized to 1. How are complex eigenvectors normalized?
0
votes
0answers
54 views

Why won't Mathematica Conjugate this expression>

I've been trying to replicate the derivation of Bloch's equations in Mathematica and for the final substitution, it won't correctly conjugate the expression even though I specify that all of the ...
0
votes
1answer
72 views

Why Does Mathematica Have Trouble Plotting This?

I'm trying to Plot something relatively simple: ...
1
vote
1answer
46 views

Distributing complex conjugate

If you have a statement like: Conjugate[a+b] you get back Conjugate[a+b] but I'm expecting ...
1
vote
1answer
74 views

General result from Integrate differs from result with special values

Can someone explain why these outputs differ? ...
1
vote
1answer
131 views

Square root of complex numbers

This is a pretty simple issue with Mathematica but I could not find any previous discussion on this topic. The issue arises when we have fractions as indices of complex numbers. For e.g. Let's say we ...
1
vote
0answers
76 views

Real integral giving complex result [duplicate]

I'm trying to calculate the following indefinite integral: $$ \int \log \left(\left(\frac{\lambda ^2}{a \lambda ^2+b}+\text{$\Delta $0}\right)^2\right) \, d\lambda $$ which is producing the ...
1
vote
1answer
60 views

How to create a colour picture?

Hope to have a composite colour graphics after I put in complex number, part of t=1 is a color,part of t=2 is another color,and so on. Maybe my function is not good. How to fix it? Thanks a lot! ...
2
votes
2answers
81 views

Incorrect result for the region of convergence of a simple integral

Bug persisting at least through version 11.3.0 The standard Gaussian integral Integrate[Exp[-a x^2], {x,-Infinity,Infinity}] returns ...
1
vote
1answer
32 views

Mathematica not recognizing expressions are real

I see no problem with following calculation. Refine[ComplexExpand[b I /(a + b I)], {Element[a, Reals], Element[b, Reals]}] ...
0
votes
2answers
62 views

how can I define a symbol as a global real number?

Say there is a complex number a=x+I, where x is a real number. Then b=Join[{a},{1+I}], and I ...
0
votes
2answers
74 views
0
votes
2answers
75 views

How to get the real part of a complex expression

I am trying to get the real part of this expression given below. Using the Re command does not lead anywhere. ...
0
votes
5answers
139 views

Weird simplification of complex value and its conjugate?

Consider the following simplification (Sqrt[A] Sqrt[Conjugate[A]])/Sqrt[A Conjugate[A]] // FullSimplify ...