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
1
vote
1answer
53 views

Integral of complex function

How to compute a complicated complex integral? You can see the example in the figure. I set assumptions that all constants are positive and real, then I try to integrate the $pel(z)$ expression but ...
1
vote
1answer
56 views

Real part of complex exponential

How do you obtain the real part of a complex exponential? For example, Mathematica gives $Re[e^{ik}]$ instead of $\cos(k)$, see figure. ...
0
votes
0answers
17 views

How to force N[ ] to output the real value (or all values) for negative cube roots [duplicate]

Evaluating N[(-1)^(1/3)] returns 0.5 + 0.866i in my v12.0 notebook. Of course, the equation x^3 = -1 has three distinct solutions for x. Is there a global (or local) option that will force Mathematica ...
2
votes
0answers
79 views

How to use _Complex types in CUDAFunctionLoad?

The documentation for CUDAFunctionLoad specifies various base datatypes you can use for your function's arguments, including ...
3
votes
0answers
115 views

Does anyone have a Mathematica implementation of the standard $\arg\zeta(s)$ function required to evaluate $S(T)$?

This question is related to my question Is there an elegant exact formula for the zeta zero counting function? on Math StackExchange. Question: Does anyone have a Mathematica implementation of the ...
5
votes
2answers
173 views

How do I analytically-continue the dilogarithm function?

Here's the dilogarithm definition: $$\text{Li}_2(z)=\sum_{k=1}^{\infty} \frac{z^k}{k^2};\quad |z|<1$$ However, the function can be analytically-continued by several integral means for all $z$ with ...
0
votes
1answer
86 views

Complex exponential plot

I don't know how to plot the exponential of an imaginary number. The function I've to plot is: Exp[-I w t]. I can give w a number, so I've chose w=1 and: ...
8
votes
2answers
494 views

Simplify 1+Sqrt[2]I-Complex[1,Sqrt[2]]

The expression 1+Sqrt[2]I-Complex[1,Sqrt[2]] should be zero. In fact, N[1+Sqrt[2]I-Complex[1,Sqrt[2]]] yields ...
0
votes
1answer
52 views

How to get rid of defects in that ComplexPlot3D?

I mean the result of ComplexPlot3D[Sin[z]/MittagLefflerE[10,z],{z,-1-I, 8 + I},Exclusions->None, PlotPoints -> 50] Its blow-up ...
3
votes
1answer
155 views

Formatting Imported Complex Arrays from Python (csv. files)

Just a short question, I am trying to import a complex array (matrix) from Python to Mathematica by first writing to a csv. file. When I Import the csv. array to Mathematica it is in a form (matrix ...
7
votes
3answers
615 views

How can I get the center and radius of this circle?

I am able to make Mathematica plot the solution to a complex inequality as the interior or exterior of a circle : Let $a$ be a positive real constant, and $f(z) = \frac{z+1}{z-1}$. I want to get the ...
1
vote
1answer
65 views

ComplexListPlot not complete

This code creates three complex lists. The third list is the Union of the other two. There are three plots. When applying ...
0
votes
0answers
49 views

Problem in FullSimplify with assumptions:

For the vector $\psi = \{ 0,F1,\alpha ,0,\beta ,0,0,F2\} $, I am trying to simplify ${\left\| \psi \right\|^2}$ where $\alpha = \cos (\theta )$, $\beta = \sin \left[ \theta \right]$, $F1 = {{\cos ...
3
votes
0answers
59 views

About what does FunctionSurjective think so long time?

Having tried a new in 12.2 command FunctionSerjective, I executed FunctionSurjective[z^(5/2), z, Complexes] // AbsoluteTiming ...
7
votes
0answers
91 views

Plot[Im[f[x]],…] incorrectly gives graph of identical zero function

Consider Plot[Im[(1 + (-1)^(2/3)*x)/((-1)^(2/3) + x)], {x, 0, 1}] At least in Mma 11 it gives the following picture: Meanwhile, ...
0
votes
1answer
40 views

Why is NSolve finding different # of roots for algebraic function?

Consider roots of $f(u)=u^{-1/4}-2/15 u-1/6$ which can be written as $$ u^{-1/4}e^{-1/4 (2n \pi i)}-2/15 u-1/6=0 $$ where $u^{-1/4}$ is taken as principal-value. Or as a GroebenerBasis: $$ f(u)=-...
1
vote
1answer
197 views

Program for efficient computation of given functional:

I need to plot the following functional with accuracy: $$ I(x,s) =\int_0^\infty\mathrm dy \frac{F(x + \mathrm iy,s) − F(x −\mathrm iy,s)}{\mathrm e^{2πy}-1}, $$ Where $ F(z,s) = \dfrac{1}{z^s\Gamma(\...
3
votes
2answers
153 views

Conjugation with real elements

Suppose I have an expression, such as A = 5 t^2 + 3 t + 4; I want to define the variable t to be real, therefore I can write ...
8
votes
1answer
265 views

Ugly streaks caused by Arg in a contour plot

I had a more general question about a similar problem more than two years ago, Getting rid of discontinuities in plots caused by square roots, logarithms, `Arg`, etc, which got lots of interesting ...
7
votes
1answer
109 views

Improve quality of ComplexPlot contours

Context When I plot pl = ComplexPlot[1/(x^2 + 1), {x, -2 - 2 I, 2 + 2 I}, ColorFunction -> {ColorData["RedBlueTones"], "CyclicLogAbsArg"}] ...
4
votes
1answer
258 views

Complex numbers in neural networks

I am trying to construct a neural network which fits a collection of functions from (complex-valued) vectors to complex numbers. After constructing a suitable network, I was surprised to see that ...
1
vote
1answer
43 views

Simplifying this relationship A*B + conj(A) conj(B)

How can I force Mathematica to simplify the $A B + A^* B^*$ relationship so that it takes the following form: $$ A B + A^* B^*=2Re[AB] $$
1
vote
1answer
69 views

Symbolic Integration with trigonometric functions

I have this trigonometric integral which takes forever to evaluate $\int dx \frac{4 \left(\cos \left(p_1 x\right)-\frac{\sin \left(p_1 x\right)}{p_1 x}\right) \left(\cos \left(p_2 x\right)-\frac{\...
0
votes
1answer
47 views

Simplifying expressions after expanding

I am totally new to Mathematica, so if this is a simple googleable question, I am sorry I have this expression: $\left(e^{i \text{p1} x}-e^{-i \text{p1} x}\right) \left(e^{i \text{p2} x}-e^{-i \text{...
1
vote
1answer
103 views

Higher resolution on a complex plot

I'm trying to program the complex zeta-function: ComplexPlot[Zeta[s],{s,-40-40I,40+40I}]. The problem is that if I convert it into an image and then save it, the ...
0
votes
2answers
72 views

Simplifying Simplify[Conjugate[Sqrt[a^2 - b^2]], {a < b}]

How can one simplify the following Simplify[Conjugate[Sqrt[a^2 - b^2]], {a < b}] Edit: I want to add that in my case $a$ and $b$ are real and I expect ...
0
votes
1answer
64 views

Taking absolute square of the following term

I have this equation and I wanted to find the absolute square of this term in Mathematica $$ H_1 = \left | 1 + j\; \left(\frac{ 2 \pi}{1-e^\lambda}\right) \right|^2 $$ I did this in mathematica <...
2
votes
1answer
182 views

How do I draw a conformal mapping from the z-plane to the w-plane

I am total beginner in Mathematica. Don't know a thing. I need to draw some diagrams for showing the conformal nature of map $w=e^z$. I need to draw some contours in $z$-plane; e.g., horizontal line, ...
6
votes
1answer
114 views

Keeping Phase Factors in Sqrt

I am trying to plot certain holomorphic functions that contain square and higher roots. In the complex analysis sense, the function $f:z\mapsto z^\alpha$ for some $\alpha\in\mathbb C$ has a phase ...
3
votes
2answers
153 views

Complex Data Fitting

I have a complex data set and I want to fit with a mathematical model using NonlinearModelFit, but an error appears. Following is the data I'm using and the code ...
0
votes
2answers
106 views

How to get F from this transcendental complex equation?

I want to solve this transcendental equation, but I don't know the step by step to get F in form equation and value of F ...
3
votes
2answers
131 views

How to factor a polynomial expression with variable coefficients (and imaginary values)

How can I factor terms with variable coefficients? For example for the expression: $x^2 + a$ I know that I can factor this to: $(x+i\sqrt{a})(x -i\sqrt{a})$ How do I do this in mathematica? I would'...
2
votes
1answer
63 views

Add vertical lines to `ComplexPlot3D` at roots

I have a Table of 6 plots of polynomials of increasing degree, using ComplexPlot3D: ...
3
votes
1answer
177 views

Incorrect answer of FunctionAnalytic

A new command FunctionAnalytic of version 12.2 sometimes produces incorrect results, e.g. FunctionAnalytic[Cos[Sqrt[z]], z] <...
0
votes
1answer
95 views

Solve complex heat transfer equation

I am trying to solve a heat transfer problem related to calculating the cooling rate after quenching a sample. The equations (and explanations) are taken from this paper: https://sci-hub.se/10.1029/...
1
vote
1answer
40 views

Conjugating the following function

I want to conjugate the above function. It's not working using the below code. Please help. All variables are real and greater than zero. ...
1
vote
1answer
57 views

I have a function $R \to C$, I want to plot it as the way we can plot parametric equations in the $R^2$. How to do it?

I have a real variable $t$ and a function $f(t)$ giving complex values. How to plot the function for $t$ in a given real interval? Also is there a way to do it in Wolfram Alpha website?
0
votes
2answers
71 views

Problem with integral of the type (x^2-y^2)^a/2 x^2 Exp[-x]

I tried to calculate the following integral using Mathematica Integrate[(x^2 - y^2)^(3)/2 x^2 Exp[-x], {x, y, Infinity}] The answer was a conditional expression ...
2
votes
0answers
45 views

How to numerically solve ODEs with a complex variable?

I want to solve the following ODEs: 3(a'[z])^2 == 1/2 a[z]^2 (p'[z])^2 - 1 ; a[z]p''[z] + 3a'[z]p'[z] + z^2 == 0 ; where z is ...
1
vote
1answer
39 views

How to find the norm of an imaginary exponential expresion?

I need to find the norm of the following expression $$ |1+e^{-i2\pi w}+e^{-i4\pi w}|^2$$ With w real number. For doing this I coded: ...
0
votes
0answers
44 views

Do these solutions actually amount to a solution over the Reals and not over the Complexes as Mathematica says?

The following program outputs approximations to ZetaZero[1] and ZetaZero[-1]: ...
1
vote
1answer
53 views

Understanding and visualizing Bessel function with complex argument

I have a vector field in polar coordinates $(r,\phi)$, which I wish to visualize and better understand. It represents the Electric field vectors for a given field distribution inside a circular ...
1
vote
2answers
36 views

How to help Simplify with conjugates without using ComplexExpand

I have a seemingly simple simplification involving conjugates: $Assumptions = Element[{a}, Reals]; FullSimplify[ x E^(I a) + Conjugate[x] E^(-I a)] which merely ...
2
votes
0answers
29 views

NMinimize to ignore arguments for which function is complex valued [closed]

I'd like to minimize a pretty complicated function $f(x, y, z)$ with NMinimize, however for certain values of the arguments $f$ becomes complex valued, and my ...
1
vote
1answer
46 views

How do I find the maximum of a certain complex expression? [closed]

I have this expression: TFilter1 = -(7.5438*10^8/(6.34731*10^8 + 48270.2 s + s^2)) where s is a complex variable give by $s = ...
0
votes
0answers
22 views

Can't plot derivative of Hankel function [duplicate]

I am trying to plot the first derivative of $H^{(1)}_3 (ix)$ with respect to its argument $ix$, where $H^{(1)}_3 (ix)$ is the Hankel function of the first kind with order $3$, $x \in \mathbb{R}$ is a ...
4
votes
3answers
145 views

Plot a set of complex numbers with given argument and absolute value bounds

I want to plot the following complex numbers $$z \in \text{(complex numbers)}:\pi/4 < \arg (z) \leq 5 \pi/4,\ 1 \leq |z| < 2 $$ I don't know how to graph it so that it would look like 2D without ...
2
votes
0answers
39 views

Verifying Gram-Schmidt Algorithm with Mathematica [closed]

According to a review of the Graham-Schmidt alogirithm in my textbook: This is only the first part of the procedure, but it's what I'm focused on for this post. I attempted to verify that $\langle 1 ...
0
votes
3answers
54 views

Solving equations with complex or real or imaginary number

GG = {N3*Conjugate[N3]+ N4*Conjugate[N4] == 1, (2 N3 + (-I + Sqrt[2]) N4)/(2 Sqrt[3]) == 0}; Sols = Solve[GG, {N3, N4}] I need to solve the above equation. But I ...
5
votes
3answers
144 views

Complex Solutions not in a+bi form

Solve[x^2 + x + 1 == 0, x] gives the solution: {{x -> -(-1)^(1/3)}, {x -> (-1)^(2/3)}} I know these are complex ...

1
2
3 4 5
21