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.

Filter by
Sorted by
Tagged with
0
votes
1answer
96 views

Can you plot complex maps? [closed]

I want to plot $|z+1|=|z-2+i|$/ Is there any way to do this without converting it to Cartesian form and contour plotting?
0
votes
2answers
82 views

How to Chop parts of an expression?

The following expression has four terms $T1$, $T2$, $T3$ and $T4$, such that the totalFunction = T1 - T2 - T3 + T4;. It turns out that the part T1-T2 gives a ...
7
votes
3answers
231 views

Obtaining a matrix of complex values from associations giving the real and imaginary parts of each element?

I have a list of associations keyed by real and imaginary numbers, like so: ...
9
votes
3answers
722 views

How to use Mathematica to do a complex integrate with poles in real axis?

I want to use Mathematica to compute the following complex integral: Integrate[Exp[I z ] 1/z, {z, -Infinity, Infinity}] Mathematica reports that it does not ...
6
votes
2answers
2k views

How to tell Mathematica that the argument of a function is real?

I want to define the following function in mathematica: $$R(\psi)=\begin{bmatrix}1&0&0\\0&\cos 2\psi & \sin 2\psi\\0&-\sin 2\psi & \cos 2\psi\end{bmatrix}\qquad,\psi\in\mathbb ...
8
votes
2answers
319 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 ...
5
votes
3answers
512 views

How to tell Mathematica to get the real-only inverse function?

The problem I have is that Mathematica seems to play better with complex numbers so that the result of N[InverseFunction[Function[x,x^3]][-1]] is ...
0
votes
1answer
80 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
61 views

Ticks command is not working for one axis

...
0
votes
1answer
119 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. ...
1
vote
2answers
92 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
30 views

Manipulate command in Module command is not working

...
0
votes
2answers
55 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. ...
0
votes
1answer
38 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
84 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 ...
3
votes
2answers
107 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
36 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
96 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
54 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? ...
6
votes
2answers
194 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
121 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
67 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 ...
2
votes
2answers
289 views

Tutorials on complex analysis

Where can I find some good tutorials (notebook files) about complex analysis theory & applications using Mathematica? Currently I can only find a book by Shaw.
-3
votes
3answers
155 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 ...
10
votes
1answer
232 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
156 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
71 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
108 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
57 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 ...
3
votes
3answers
257 views

Problem of `Integrate` and `DSolve` with inhomogeneous Legendre differential equation

I have the following inhomogeneous Legendre differential equation $(m=n=2)$: ...
0
votes
1answer
34 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: ...
7
votes
2answers
187 views

Portion of Curve Omitted by Plot

In the course of addressing question 104559, I encountered the following problem with Plot. Begin with ...
0
votes
0answers
74 views

An optimization problem

I have the following two quantities denoted by $LHS$ and $RHS$: ...
2
votes
2answers
116 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
125 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
126 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
211 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
222 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
vote
1answer
308 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
votes
1answer
137 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
92 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
33 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 ...
0
votes
1answer
76 views

Finding the real part of a complicated complex expression

I've the following code: ...
1
vote
1answer
112 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
57 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" ...
8
votes
3answers
625 views

How to recover Pauli matrices properties in Mathematica?

I want to do a cross or dot product involving a vector of Pauli matrices $ \vec\sigma=(\sigma^1, \sigma^2, \sigma^3) $; for example, $ \vec\sigma\times\vec\sigma=2\mathrm i\vec\sigma $ and $ \vec\...
2
votes
1answer
137 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 ...
0
votes
0answers
54 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
78 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
88 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: ...