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.

0
votes
1answer
26 views

Conditional Plot of a function if another function satisfies something and in the case of complex variable

Let's say we have function $g(\zeta)$ and another map $f(\zeta)$, where $\zeta$ is a complex variable. I am trying to plot a graph of $f(\zeta)$ but given the condition of $g(\zeta)$. For instance, ...
-1
votes
3answers
41 views
0
votes
1answer
43 views

How to collect the real and imaginary parts and make it into two equations

I have an equation which consists of a real and complex quantity I just wanted to separate it out and form two new equations. ...
7
votes
2answers
192 views

Complex continuation of an interpolated function

Context I have a complicated real function defined implicitly by a series of imbricated numerical integration. I need to make a continuation of this function for a complex variable which is easily ...
1
vote
2answers
65 views

Why does this replacement rule for imaginary unit not work? [closed]

I'm trying to replace imaginary unit in an expression with a real unit: E^(-I y) /. I -> 1 E^(-I y) As you can see, in ...
0
votes
0answers
26 views
0
votes
1answer
29 views

Finding complex conjugate [closed]

I have some expressions and I would like to calculate the complex conjugate of them. How can I get delta2 and delta3 in a simple ...
1
vote
2answers
45 views

Find n-roots of unity and put them in vector [closed]

Assume you want to find all roots of n-unity and then you want to put them in a vector. I tried to find all the roots of unity this way: Solve(z^n==1,z) But now ...
0
votes
2answers
26 views

Simplifying complex-valued entries in a matrix

I have a matrix where some entries are complex or roots of unity. For example, (-1)^(2/9) - (-1)^(5/9) + (-1)^(8/9) is one such entry and it is equal to 0. ...
2
votes
2answers
69 views

Complex solutions to ODEs

How do I solve the following IVP problem in Mathematica so that I get real solutions? $Q'(t)=b - \dfrac{Q(t)}{100-t}; \quad Q(0)=250$ I tried the following: $\text{$\$$Assumptions}=b>0;\text{$\$$...
1
vote
0answers
32 views

Inverting a series

How do I invert the following, \[Rho]=r + b0 Sum[Pochhammer[1/2, k]/(k! ((1 - q) k - 1)), {k, 0, \[Infinity]}] + b0^(1 - q)/(2 q) r^q + O[r^(2 q - 1)] to get $r(...
2
votes
2answers
93 views

`Re[z]` Command [closed]

Suppose we have complex number $z=a+i b$, where $a$ and $b$ are variables. Now, if we want real part of $z$, then in mathematica we use Re[z] command. But this ...
0
votes
0answers
47 views

double Integral in complex number field

The following expression is an expansion of Hypergeometric2F1 function from the above expression with the help of 9.113(in 'Table Of Integrals, Series And Products'). but I got different results.WHY? ...
5
votes
2answers
140 views

Does Mathematica gives us a wrong result for the integral of a function including elliptic functions?

Calculus tells us that the differentiation of the integral of a function should be itself, but at least in one case Mathematica answers NO. I feel very confused. The new figure seems to bifurcate at ...
3
votes
1answer
105 views

Complex first-order differential equation

I have a differential equation $\frac{dx}{dt} = \sqrt{1+x^4}$ $x$ is a complex variable. I want to solve it for some given initial condition, and plot the solution (real part vs. imaginary part). ...
2
votes
1answer
50 views

Choose a branch cut using assumptions

I understand Sqrt function won't simplify expressions such as $\sqrt{x^2}$ unless there is an assumption that $x \in \mathbb{R}$. In my computation, I get an output containing an expression like this ...
-3
votes
3answers
130 views

Gives me a complex solution [closed]

A := DSolve[{D[((It - Ir) * x / L + Ir) * w''[x], {x, 2}] - p/Y, w[x] == 0, w'[0] == 0, w''[L] == M0/(Y*Ir), w'''[L] == -P/(Y*Ir)}, w[x], x] I want a real ...
9
votes
1answer
166 views

FiniteElement v.s. TensorProductGrid: which is reliable for Schrödinger equation with periodic b.c.?

This is a problem comes up in the discussion under this post and I think it's worth starting a new question for it. I suspect the underlying issue is the same as in this post, but not sure. Consider ...
2
votes
0answers
44 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
67 views

Solution… 2nd Transcendental Equation with Graphical method [closed]

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
106 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
53 views

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

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
72 views

An optimization problem

I have the following two quantities denoted by $LHS$ and $RHS$: ...
2
votes
2answers
111 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
78 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
117 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
99 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
96 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
52 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
72 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
77 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
23 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
108 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
49 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
50 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
64 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
35 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
49 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
49 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
29 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
64 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
48 views

Failure to plot a subset of curves using ParametricPlot

I wish to plot a parametric curve with parameters Γ,Δ,ϵ such that ...
0
votes
0answers
45 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
43 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
792 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
104 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
102 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
153 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 ...