Skip to main content

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
2 votes
1 answer
100 views

Replicating Complex Plot (branch cuts, poles, shading)

I am trying to recreate the following 2 plots: where the function being plotted is $|e^{2ipR}S_0^{\text{well}}(p)|$ where $|...|$ is the absolute value, $R=1$, and $S_0^{\text{well}}(p)$ is given as \...
MathZilla's user avatar
  • 145
0 votes
0 answers
45 views

Why doesn't mathematica simplify the result of Norm in a Module calculation in this case?

I have a computation that involves the "contraction" of matrix and vector indices, see this question. I am now running into a problem of simplification when using the expression as opposed ...
villaa's user avatar
  • 201
1 vote
0 answers
62 views

How can I speed up symbolic integration of this highly oscillatory function?

I am trying to figure out how to speed up this symbolic integration. I have tried parallelization and numerical integration (both I am failing to implement). Here is the function: ...
brian mcgloughlin's user avatar
0 votes
0 answers
43 views

Poincaré half plane model gives all imaginary sides and angles

I want to compute right triangle sides/angles from Poincaré half-plane model in hyperbolic geometry (semi-circle diameters on x-axis ). $$ \cosh a =\frac{\cos \alpha+\cos \beta}{\sin \beta \sin \gamma}...
Narasimham's user avatar
  • 3,214
0 votes
1 answer
31 views

How do I display my output as a complex number with decimals for the real and imaginary components? [closed]

This is my code: c=Integrate[t/(E^t-1),{t,-Pi,Pi}]/(2Pi) a[j_]:=Integrate[t*Cos[j*t]/(E^t-1),{t,-Pi,Pi}]...
Alexandra's user avatar
  • 101
1 vote
1 answer
64 views

Series does not deal with the branch cut for the power function correctly [bug]

This is an issue I am having in Mathematica version 13.1.0.0. According to https://functions.wolfram.com/ElementaryFunctions/Power/04/05/02/, the power function should have a branch cut for $x<0$ ...
Zachary Wüthrich's user avatar
2 votes
2 answers
220 views

Simplifing equation with complex coefficients

I'm trying to simplify an expression with complex coefficients. It should be very straightforward, but for some reason, I cannot get the correct answer. Please, see the code below: ...
Pedro Henrique's user avatar
2 votes
3 answers
187 views

How to fix this "wrong" analytical integral evaluation?

Integrate[(1/Sqrt[(x + 1)^2 + 1])*(1/Sqrt[1 + x^2]), {x, 0, 1}] yields ...
WillG's user avatar
  • 1,000
1 vote
1 answer
143 views

I want to plot the group delay of the following mathematica code but it takes too long time

I am working on a Mathematica project where I want to plot the group delay. The problem is this code is running too slow. Is there any possibility of speeding up the code? Here is the original code: <...
abdul wahab's user avatar
2 votes
1 answer
152 views

How can I find a condition for convergence of an integral? [closed]

Wolfram|Alpha says that $$ \int_0^\infty \frac{x^n}{(x-1)(x-2)} dx=\pi (1-2^n)(\cot(\pi n)+i)$$ for $\text{Re}(n)>-1$. However, for $n=0$, it says the integral doesn't converge, even though it has ...
Faoler's user avatar
  • 123
2 votes
3 answers
203 views

Contour integration over lower half of complex plane

I need to perform this integration as a contour integral over the lower half of the complex omega plane with Mathematica. $$\int_{-\infty }^{\infty } \frac{e^{-i \left(\omega -\omega _0\right) (t-\tau ...
Ashish Anil's user avatar
1 vote
3 answers
114 views

Why doesn't Conjugate[] conjugate exponentials inside other functions?

Why does something like Conjugate[Sqrt[Exp[I x]]] give output Conjugate[Sqrt[E^(I x)]] instead of ...
EFE TÜRBEDAR's user avatar
1 vote
2 answers
162 views

Confused about the output of `CosIntegral`

I am interested in the properties of the cosine integral function, in this case the anti-derivative of Cos[Pi*x]/x, which Mathematica evaluates to ...
Richard Burke-Ward's user avatar
1 vote
1 answer
44 views

Trying to extract the real part of a real big and may complex number

I have this order 7 polynomium: ...
Rafael De Barros Souza's user avatar
2 votes
2 answers
87 views

Construct plot of $exp(1/z)$ [closed]

I want to plot the function $f(z) = e^\frac{1}{z}$ in 3 forms: First to be a plot like [this][1]. But I want to show legend of both magnitude and imaginary part scales. Second to be a plot only with $\...
MathLearner's user avatar
2 votes
1 answer
79 views

Bugs with `Integrate` when dealing with complex situation?

I'm trying to calculate $\int_0^{\infty } \exp \left(t \left(-x^3+(1+i) x\right)\right) dx$ with mathematica, and different assumptions on t give different results: ...
Jie Zhu's user avatar
  • 2,185
0 votes
0 answers
30 views

AbsArgPlot for List (Parallel Computation)

Basically, I have a very complicated function that I'd like to draw using AbsArgPlot. I thought it could speed up if I first use ...
YueZhi Zhang's user avatar
3 votes
2 answers
254 views

Eliminating complex numbers from solutions

In Maple eq:=ln(y)-1/2*ln(1+y^2) = x-c1; solve(eq,y) In Mathematica ...
Nasser's user avatar
  • 149k
2 votes
2 answers
267 views

Series expansion of a given function

I attempt to do the series expansion for the following function ...
Vayne's user avatar
  • 101
1 vote
1 answer
56 views

Why does RegionPlot handle Euler's identity differently for functions and direct expressions?

Edit When I change the x range (e.g. {x,1,3}) I get the same error also for the direct expression. Thus, the problem exists either way and I assume it just evaluated different points? Problem I want ...
Jannik Wyss's user avatar
2 votes
0 answers
50 views

How to generate lattice by integrating over curves on a modular form domain plot?

I was watching this video (2:30 of https://youtu.be/zLEyIT_BCgk?si=ji5NyjR7vcwzaNxi ). Here in the video he said that to get the lattice , we just integrate over the curve(silver line) and we will ...
Kazi Abu Rousan's user avatar
0 votes
2 answers
77 views

Integrate gives inconsistent result for gamma-like integral with complex variables

I am trying to come up with a generic formula for the below integral, which is analogous to the upper incomplete gamma function, ...
ThomasJr's user avatar
  • 131
2 votes
0 answers
57 views

Drawing cycles around and across cuts

I want to draw cycles (or paths) around and across the cuts on the complex plane for the following function (where I have put the cuts between [z1,z2] and ...
Physics Moron's user avatar
2 votes
2 answers
124 views

How can I find minimal modulus of $z^2 - w z - 4$?

Let $z$ and $w$ be two complex numbers satisfying conditions: $|z| = 2$ and $|w i - 2 + 5i| = 1.$ How can I find the minimum of $|z^2 - w z - 4|$? I tried with setting $z = a + b i$ and $w = x + y i$: ...
minhthien_2016's user avatar
0 votes
0 answers
56 views

Mathematica crashes when trying to use NIntegrate on a complex function

I am trying to integrate the real part of a specific entry in a Green function given by G[E_] := Re[Inverse[E iF - H + I L/2]][[13, 13]]; ...
flg's user avatar
  • 21
1 vote
2 answers
146 views

Contour integral with radius infinite [closed]

How can I get compute a contour integral of the function $f(z)=\exp(i z)/z$ in the upper circle with center in $(0,0)$ and radius $R$? I want verify that $\lim_{R\to \infty}\int_C f(x)=0$ in ...
eraldcoil's user avatar
  • 203
2 votes
1 answer
120 views

Is it possible to express $\text{Li}_2(-\frac18(-i+\sqrt{15})+\text{Li}_2(\frac18 (i+\sqrt{15})$ as an explicit real expression (not numeric)? [closed]

I obtain this expression in my calculations, and numerically I am sure that it is a real number. ...
MsMath's user avatar
  • 195
1 vote
0 answers
74 views

How can I ask Mathematica to give the explicit real form of the given function?

In part of my calculations, I obtain this expression which contains the imaginary unit I but I expect that this expression might be real (from the comments below, ...
MsMath's user avatar
  • 195
1 vote
1 answer
81 views

ParametricNDSolveValue, NMaximize: Dealing with complex results in maximization problem

I analyze a system of differential equations in several variables including mus[t], mui[t], and w[t]. Time runs from t=0 to t=T. The two initial values mus[0] and mui[0] can freely be chosen; their ...
beginners's user avatar
2 votes
1 answer
42 views

How to check if there exist variables for which a function may be real?

I have a tough time in checking whether there exist any values of x and y (both real) for which the following pair of functions ...
Jee's user avatar
  • 386
4 votes
1 answer
91 views

MatrixExp sometimes erroneously assumes variables are real

Consider the simple expression MatrixExp[I Conjugate[x] {{1,0},{0,1}}] which Mathematica correctly evaluates to ...
Anti Earth's user avatar
  • 1,261
5 votes
2 answers
231 views

What to do when FullSimplify runs out of memory?

So close yet so far! I've read a number of posts here about tips and strategies for simplifying expressions. I hope this case still offers guidance to others. I have an expression that (just!) fits ...
RealDisinformation's user avatar
8 votes
3 answers
561 views

Basins of attraction using Newton-Raphson method for nonlinear system

I am trying to construct basins of attraction using the newton's method for the system of two equations whose roots are real. I need to develop a code to get basin of attraction. Unfortunately, my ...
onk's user avatar
  • 119
4 votes
1 answer
66 views

Plot freezes with arbitrary precision complex evaluations

I find that Plot has some strange behavior. a = {{-5.355`3 I, 0.1589`3 }, {2.305`3, 0.01425`3}}; Det[a] // Abs gives ...
Ming's user avatar
  • 173
0 votes
2 answers
160 views

ExpToTrig conversion problem

Let we have some ODE solution: formExp = c1 E^(-I t) + c2 E^(I t) +c3 E^(-2 I t) + c4 E^(2 I t) It is known that this solution can be reduced to the form: ...
lesobrod's user avatar
  • 1,894
0 votes
1 answer
80 views

Conformal Mapping Function and Scaling Factor

I am having problems determining a scaling factor for a conformal mapping function. The plan is to map the upper half plane into a rectangle (Schwarz Christoffel Transformation) to determine the ...
tommowic's user avatar
0 votes
0 answers
79 views

Initial conditions making trouble with NDSolve

I want to solve a number of differential equations in a single NDSolve. The code is as follows: ...
Julian Yussef's user avatar
3 votes
1 answer
75 views

How can I improve the accuracy of FindRoot for a complex equation?

I want to solve the following problem: Given a complex matrix $m=\textbf{m}(λ, ω)$, with $λ, ω \in \mathbb R$, find $λ$ and $ω$ such that $$\det[\textbf{m} (λ, ω)] = 0$$ Since one can take the real ...
fritess's user avatar
  • 45
1 vote
1 answer
98 views

Unable to simplify complex expression [closed]

I am very new to Mathematica. Somehow Mathematica doesn't give me the norm expression, instead, it just gives the original expression. How should I fix this? The code is: ...
Zhanning Liu's user avatar
2 votes
1 answer
108 views

Find the Intersection Point of Two Complex Functions Using Complex3DPlot

I want to find the intersection point using ComplexPlot3D. I have a function call it $f(\lambda,k)$ ($k$ is fixed) such that at two particular values of $\lambda_{1,...
ZHENGYAO HUANG's user avatar
1 vote
0 answers
54 views

How does mathematica handle roots of complex numbers

When Mathematica takes $(-1)^{\frac{3}{4}}$, is it really interpreting it as $((-1)^3)^{\frac{1}{4}}$, or $((-1)^{\frac{1}{4}})^3$? These seem like they would give $e^{i \frac{3\pi}{4}}$ versus $\...
ions me's user avatar
  • 1,055
2 votes
2 answers
160 views

Sqrt returns complex values

I am trying to find sine from a cosine relation using the following commands: ...
PKD's user avatar
  • 31
1 vote
1 answer
239 views

Differential complex equations in cosmological problem

I want to solve a differential equation of second order with complex initial conditions. Despite I have wrote all the code with detail, I am still facing some problems I might want to review here. The ...
Julian Yussef's user avatar
2 votes
1 answer
449 views

How to verify that a certain point is a branch point for a complex function using Mathematica?

It is straightforward to verify that z=0 is a branch point for w[z]=Sqrt[z]: ...
lotus2019's user avatar
  • 2,245
0 votes
0 answers
44 views

Scope of Simplifying Complex Expressions [duplicate]

Do you know what the scope of Mathematica's simplification capabilities for complex expressions is? For example, I put the heavy lifting of proving a complex inequality on Mathematica, using the ...
Matthias's user avatar
  • 353
2 votes
2 answers
93 views

Vector in the complex plane

Please tell me how I can make an animation with rotating vectors rather than rotating points. ...
Vladimir's user avatar
  • 359
0 votes
2 answers
150 views

How to numerically find complex non-real roots of a function?

Using Mathematica, how can we numerically find only complexes, but not real roots, of a function? For example, if we have f:C->C, and we have roots like, R1,R2,...,Rn (real roots, without imaginary ...
GarouDan's user avatar
  • 1,536
28 votes
2 answers
1k views

Make a "formula-millipede" move along arbitrary path

Math artist Chirag Dudhat specializes in simple math that does something interesting visually. He recently had a hit with a "millipede" simulation with simple complex plane formulas. Below ...
Vitaliy Kaurov's user avatar
2 votes
1 answer
72 views

FindRoot::trcx when using NDSolve

...
Josuva J's user avatar
5 votes
0 answers
144 views

What is resistivity function of a 3-bar electric switch?

I answered a question on Physics StackExchange - considered as homework - numerically. The question is: What is the resistance of three stacked identical blocks, the middle bar shifted by its half ...
Roland F's user avatar
  • 4,206

1
2 3 4 5
28