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
2answers
35 views

Plotting partial sum with complex number

$$\sum_{n=1}^{N} e^{2\pi in\sqrt2}$$ We have to use Accumulate and ListLinePlot, and my implementation so far with upper bound ...
1
vote
1answer
38 views

How to check if a complex number belongs to a quadratic field

I am working with lists of complex numbers and want to be able to determine which out of these lists contains only elements from a certain quadratic field, $\mathbb{Q}(\sqrt D) = \{ a+b\sqrt D :a,b \...
1
vote
0answers
32 views

Abs function for complicated complex arguments [closed]

I want to find the Abs square of this complex expression. I tried using Abs command and then squaring it but nothing happened, it just showed 'Abs' in the output. I also tried multiplying it with its ...
1
vote
2answers
70 views

Is there some way I can do integrations on the complex plane without converting it to real and imaginary parts by hand?

For example how do I actually write this in Mathematica? Integrate[ 1/(z^2+1/4), "z on the Unit Circle with origin as center" ]
3
votes
1answer
89 views

Missing roots/contours in ContourPlot

I have read some similar equations in other places, but it seems like theirs suggestions does not work in my case. I would like to plot a complex equation in complex plane by the ContourPlot, the ...
0
votes
1answer
88 views

Why does this integral of a real, analytic, absolutely integrable function give a complex result?

I am using Mathematica to develop some ``interesting" problems for students to solve using Fourier series. The following computation seems as though it should yield a real result: $B_n = \int_0^1 ...
2
votes
3answers
126 views

Best way to solve for domain on which a function is real

Say I have a function like ...
0
votes
3answers
37 views

How to specify domain? [closed]

I wrote x $\in$ Reals; y$\in$ Reals; z = x + I y; Re[z] gave the output -Im[y] + Re[x] as if the first line did not exist How can I specify that x and y are reals?
0
votes
0answers
42 views

Solve a system of complex equations and plot the solution

I'm trying to solve a system of 2 equations with an unknown real parameter k0, the solution is complex. then I want to plot the obtained solution function of k0: here is my code: (I here is the ...
3
votes
3answers
171 views

Plotting Minkowski product of two sets in complex 2D plane

I am trying to draw Minkowski product of two sets in complex 2D plane in Mathematica. While I can draw the individual complex 2d plane for these sets in Mathematica ...
0
votes
0answers
43 views

Complex mapping of curve

I have a curve in the complex plane (a unit circle), and I want to plot the curve with a complex function applied to it ($f(z)=\sqrt{z}$) How do I go about doing that? I know how this can be done ...
14
votes
1answer
258 views

Why does Abs return negative values?

According to the documentation Abs[z] gives the absolute value of the real or complex number z and is also known as the modulus. As far as I'm aware for any definition of the absolute value, norm or ...
3
votes
1answer
36 views

Stopping Simplify and FullSimplify expressing real terms as complex

I am working with real functions but FullSimplify and Simplify express them as complex terms. I assume this is because the ...
0
votes
0answers
67 views

Why does Log[Abs[#]] return a complex number?

For a nonzero number $x$, $\log|x|$ should be a real number. Why does the following NestList contain non-real numbers when no numbers involved are close to zero? Is it a bug? ...
2
votes
1answer
52 views

Using callout[] to create a plane

I want to create a plane that represents $15$ powers of complex number: $a$1 $= (10/7)*(Cos(Pi/10) + i*Sin(Pi/10)) $. I also want to label the points with the text "a to power k" where $k$ ...
0
votes
1answer
50 views

Searching for elegant way manipulate complex vectors

I have some complex vectors that I would like to normalize and further manipulate. For example, one is this: ${\qquad \rm vec}=(-\frac{-a + b + \sqrt{a^2 - 2 a b + b^2 + 4 c^2 + 4 d^2}}{2 (c + i d)},1)...
1
vote
1answer
206 views

How do I visualize $\exp(z)$ as a complex mapping?

How do I visualize $\exp(z)$ as a complex mapping? How can I ensure that it does not miss any value on the complex plane as it's value (is in the best condition of Picard's theorem). Can anyone help ...
0
votes
1answer
96 views

non linear model fit for a complex function

I am trying to fit a complex function which is basically a function for anelastic relaxation. I have 3 columns in my dataset Data , first column is the temperature (which I have denoted by x here), ...
0
votes
0answers
88 views

Why does Mathematica give the wrong answer for this integral, and how can I correct it?

Mathematica is getting the following integral completely wrong: $Assumptions = a > 0; Integrate[1/k (E^-(k + a)^2 - E^-(k - a)^2), {k, 0, ∞}] (* I E^-a^2 π *) ...
0
votes
1answer
39 views

Complex Conjugate Help

I am trying to follow my teacher's instructions to easily compute for a complex conjugate but I get mathematica to actually reveal the complex conjugate besides the word "conjugate" and even ...
0
votes
0answers
48 views

Head of complex sum

We have: 1 + 2 I + 3 + 4 I // Head Complex and 1 + 2 I + 3/5 + 4/5 I // Head Complex But we get: ...
1
vote
1answer
128 views

Plotting line segments in complex plane

Recent versions of Mathematica have introduced various functions for plotting in terms of complex numbers and complex functions, including ComplexPlot, ...
0
votes
0answers
29 views

Why does ComplexListPlot labeling function require an Evaluate?

Start with the list of the cube-roots of unity: cubeRoots = ComplexExpand[Exp[(2 \[Pi] Range[0, 2] I)/3]] I want to use ...
4
votes
2answers
177 views

ComplexListPlot: how to add filling lines to origin?

MMA 12. Many XY-style plot functions support the Filling option, so that e.g Filling->Axis drops a line from every plot point ...
1
vote
2answers
91 views

Value on the cut

I did the following evaluation (-x)^-a /. {x -> 1.23 , a -> 2.34} 0.296789 - 0.539856 I Now I tried to play around it a bit and did the same evaluation in ...
7
votes
1answer
165 views

Pattern-matching complex numbers as a + bi

I just started working with Mathematica and am toying with pattern matching. There may be something obvious I'm missing in this, but I can't figure it out by myself. I want to write down a function ...
0
votes
2answers
208 views

Can the error function be expressed in terms of other special functions?

I obtained with Mathematica some results written in terms of the error function Erfi[x]. Is there is a way to transform the error function into other special functions e.g. Bessel functions or ...
3
votes
5answers
212 views

Simplifying away imaginary part

I'm solving the following eigensystem, and I get result which looks complex-valued. I expect the result to have 0 imaginary part, can anyone see a way to simplify it away? ...
0
votes
1answer
56 views

General form of equation [closed]

How do I use a general equation form as a function that calculates my data points of x and y? Essentially, I am trying to use the vernal form equation to calculate conduction velocity from diameter ...
0
votes
0answers
51 views

Constant inside If condition

I hope you are doing well. I am currently writing some code in which I have an If statement where I will be dividing two expressions and checking to see if the quotient comes out to be a constant ...
0
votes
0answers
52 views

Returning complex numbers when it's supposed to be real numbers

So I am trying to solve the following polynomial ...
1
vote
1answer
157 views

How to show the map of a complex function ( plane z incl the basic square grid to plane w?

I want to make a presentation of the maps of the standard complex functions, as well as some mobius transformations and special complex functions. I want to present it exactly like it is done in the ...
1
vote
0answers
37 views

Integrate returning complex values

I am having trouble using mathematica to calculate some integrals Namely this : ...
2
votes
0answers
82 views

How to convince Mathematica that $(-1)^{2/3} = e^{2\pi i /3}$

I have a list T which contains 3 + 4*E^(2*Pi*I/3). Yet MemberQ[ T , 3 + 4*(-1)^(2/3) ] ...
2
votes
2answers
109 views

Symbolic properties of Re and Im

I want to define a function f such that f[x] is real whenever x is real. So I define ...
4
votes
0answers
109 views

Prime factorization over the Eisenstein integers $\mathbb{Z}[\zeta]$

I am trying to write a function f[a_,b_] which takes in two integers $a,b$ and returns the unique factorization of $a+be^{2\pi i/3}$ into the primes belonging to $\...
0
votes
0answers
45 views

Why doesn't Mathematica ComplexExpand integrals?

Consider this code example: ComplexExpand[Re[Integrate[f[t], {t, a, b}]]] Mathematica gives me the result as ...
2
votes
3answers
211 views

How to plot a complex functions in complex plane? [closed]

How to plot a complex equation like f(z)=z^2 in complex plane? Is it required to separate the real and imaginary parts or it can be done directly ?
0
votes
1answer
69 views

Invalid comparison in Manipulate with Stepwise function

I want to draw a graph of the function that I specified using Piecewise. Though I can draw a graph, I keep getting Min::nord/<...
0
votes
1answer
61 views

Assume that the value of an integral is real

I would like to give a condition that the integral I am handling are not complexes. Consider ...
0
votes
0answers
70 views

Is there a function to convert a trigonmetric expression to an algebraic expression suitable for ComplexPlot?

According to H. A Priesley: "both $cosθ$ and $sinθ$ can be written as simple algebraic functions of $z$": $cosθ =\frac{1}{2} (z + \frac{1}{z}) \tag1$ $sinθ =\frac{1}{2i} (z − \frac{1}{z})\...
5
votes
1answer
106 views

How to get smooth square root of complex valued function?

Let $f(x)$ be smooth complex valued function with real argument $x\in[0,1]$. I want to get square root $g(x)=\pm\sqrt{f(x)}$ where the sign is chosen so that g(x) is smooth. How can I do that? In ...
0
votes
1answer
94 views

Is it possible to have a complex nu in ParabolicCylinderD?

I'm trying to recreate a graph from a paper, and the function that I'm plotting involves three separate parabolic cylinder functions that all have a complex Nu value. After getting it all typed out, I ...
2
votes
1answer
71 views

Removing Abs with `ComplexExpand` not working

Here is what I have used for this. From this link, Why do I get empty graph when adding 'Abs' function? I know that I can remove Abs with ...
1
vote
1answer
46 views

Get modulus and plot complex function

I have the following function: ...
1
vote
1answer
70 views

Split real and imag parts of function with derivative

Consider a complex function y with a real argument x and the function y itself is an ...
2
votes
3answers
91 views

How to solve these complex equations for plot?

I am trying to Plot this code but it is not showing any plot. I want a bistable type plot between "NL" and "P0" and there are six equations and six unknowns. The code is given ...
0
votes
0answers
32 views

How to tell Mathematica to display results in terms of * symbol instead of Conjugate[]

When I have complicated expressions with several complex conjugations, which I write in using the symbolically tidy Esc conj Esc, it frustrates me how Mathematica will then always display ...
1
vote
0answers
55 views

How do you define the domain and range of the variables for a plot?

How do I define the domain to be only reals and the range to be only complexes? Everytime I plot using ComplexPlot[], I get a C->C function so there are basically too many variables to plot and I ...
2
votes
1answer
74 views

Split complex equation

Sometimes it is useful to split a complex equation into its real and imaginary parts. Consider the following ode ...

1 2
3
4 5
21