## mathematical physics – How to seperate the real part and imaginary part from a complex expression

I need to saperate the real part and the imaginary part from the following expression.

``````     Csc(2 (Theta)12)^3 (-32 E^(4 I (Delta))
Cos((Theta)23)^3 Cos(
2 (Theta)23) (Cos((Delta)) Cos((Theta)13)^2 +
I Sin((Delta))) Sin(
2 (Theta)12) (E^(I (Delta))
Cos((Theta)23) Sin(2 (Theta)12)^2 +
2 Sin(4 (Theta)12) Sin((Theta)13) Sin((Theta)23))
(PlusMinus)
I E^(2 I (Delta))
Cos((Theta)23) (Cos((Theta)23) Sin(2 (Theta)12)^2 +
E^(-I (Delta))
Sin(4 (Theta)12) Sin((Theta)13) Sin((Theta)23)) ((1 -
3 E^(2 I (Delta))) Cos(2 (Theta)23) +
32 E^(3 I (Delta))
Cos((Theta)23)^3 (E^(I (Delta))
Cos((Theta)23) Sin(2 (Theta)12)^2 +
2 Sin(4 (Theta)12) Sin((Theta)13) Sin((Theta)23)) + (1
+ E^(2 I (Delta))) (-1 +
2 Cos(2 (Theta)23) Sin((Theta)23)^2)))
Sec((Theta)23)^6)/(64 (E^(I (Delta)) Sin((Theta)12) +
Cos((Theta)12) Sin((Theta)13) Tan((Theta)23))^2 (E^(
I (Delta)) +
4 Cot(2 (Theta)12) Sin((Theta)13) Tan((Theta)23)));```
On doing ```ComplexExpand(Expr1)$$``$$ I am not getting the correct expression. Please help me out.
``````

## Abort A Program for Imaginary Values

Abort A Program for Imaginary Values – Mathematica Stack Exchange

## How to remove redundant imaginary part of a matrix

I have the following code:

``````In[94]:= MM = Table[RandomReal[{-1, 1}], {2}, {2}]

Out[94]= {{-0.652836, -0.601151}, {-0.772436, 0.795763}}

In[95]:= MM = MM * x

Out[95]= {{-0.652836 x, -0.601151 x}, {-0.772436 x, 0.795763 x}}

In[98]:= MM . IdentityMatrix[2]

Out[98]= {{0. - 0.652836 x, 0. - 0.601151 x}, {0. - 0.772436 x,
0. + 0.795763 x}}
``````

A trivial imaginary part is added to the matrix product where all variables are essentially real numbers. Is there a way to remove these “0.”s because they’re going to make following computation look messy ?

## prime numbers – Oppermann’s conjecture in an imaginary world?

I apologize for such a broad title. I just didn’t know how to fit a brief specific title for the following:

For $$๐ฅโ๐$$ where $$๐$$ are all the natural numbers.

The Oppermann’s conjecture states that, for every integer x > 1, there is at least one prime number between $$x(x โ 1)$$ and $$x^2$$, and at least another prime between $$x^2$$ and $$x(x + 1)$$.

The difference between $$x(x โ 1)$$ and $$x^2$$ is $$x$$.

Among this $$x$$ numbers no number can have a factor that is greater than $$x$$.

Example: $$30^2-30โ 29=900-870=30$$. Out of these $$30$$ numbers no number can have a factor greater than $$30$$.

To count all the odd numbers that are prime and that are smaller or equal to any given $$x$$:

$$y = pi (x) + 1$$, where $$pi (x)$$ is the prime counting function and I deduct $$-1$$ because in this case I am not including $$2$$ as an odd prime.

In my example : $$y = pi (30) – 1 = 10-1=9$$.

To count all the odd numbers that are not prime:

$$z = frac{1}{2}x – y$$.

In my example : $$z = frac {30}{2} -9 =15-9=6$$.

The only problem is that we don’t know which of theses numbers are prime and which are not.

Assuming against reality and in an imaginary world, that all the prime numbers are the first numbers on the list that are greater than $$1$$, and all the remaining composite odd numbers are the last numbers on the list including the number $$1$$.

In our example:

Prime numbers: $$3,5,7,9,11,13,15,17,19$$.

Composite Numbers $$1,21,23,25,27,29$$.

Going back to the $$x$$ numbers that are between $$x(x โ 1)$$ and $$x^2$$, in my example the numbers between $$870$$ and $$900$$

From here on I will carry on describing my question with my example:

Since I am pretending that all the first numbers greater than $$1$$ are prime, we need to use the inclusion exclusion principle (even on $$9$$ and $$15$$).

Let the answer be $$A$$ for how many of the $$15$$ odd numbers are not divisible by
$$3,5,7,9,11,13,15,17,19$$ (pretending they are all primes)?

$$15 – (frac{15}{3} + frac{15}{5} + frac{15}{7} + frac{15}{11} + frac{15}{13} + frac{15}{17} + frac{15}{19}) + (frac{15}{15} + frac{15}{21} + frac{15}{27} + frac{15}{33} + frac{15}{39} + frac{15}{45} + frac{15}{51} + frac{15}{57} + frac{15}{35}+ frac{15}{45} + frac{15}{55} + frac{15}{65} + frac{15}{75} + frac{15}{85} + frac{15}{95} + frac{15}{63} + frac{15}{77} + frac{15}{91} + frac{15}{105} + frac{15}{119} + frac{15}{134} + frac{15}{99} + frac{15}{117} + frac{15}{135} + frac{15}{153} + frac{15}{171} + frac{15}{209} + frac{15}{143} + frac{15}{165} + frac{15}{187} + frac{15}{209} + frac{15}{195} + frac{15}{225} + frac{15}{255} + frac{15}{285} + frac{15}{323}) – …$$

So far we have:

$$A=15 – (14.332166285726656) + (8.075594188477142)-…$$ and that is before I continue the inclusion exclusion principle.

I apologize for not continuing, I have tried for several hours and I just keep messing it up, and it wouldn’t matter for the remaining of my question:

As $$x$$ grows in this imaginary world, what will happen to $$A$$? for example: will it always stay positive?

## nt.number theory – Imaginary quadratic fields with \$ell\$-indivisible class number

Let $$ell geq 5$$ be a prime. Show that there exists an imaginary quadratic field $$K$$ with odd fundamental discriminant:

(a) $$ell$$ inert in $$K$$,
(b) $$(ell, h_{K})=1$$.

Remark. Without requiring the discriminant being odd, the existence due to Horie-Onishi.

## calculus and analysis – Mathematica 12.0 returning a imaginary value for a real-valued improper integral

When I use MMA to solve this integral

``````Integrate((1 - Cos(x))/( 2 - Cos(x) - Cos(y)), {x, -Pi, Pi}, {y, -Pi, Pi})
``````

it returns `8I*Pi*Log(2)`, which is obviously wrong.
If I iteratedly calculate it

``````Integrate(Integrate((1 - Cos(x))/(2 - Cos(x) - Cos(y)), {y, -Pi, Pi}), {x, -Pi, Pi})
``````

MMA gives `2Pi^2`, which is correct.
Can anybody give an explaination?

## Is it possible to convert the imaginary matrix into real matrix using real matrix

Assuming I have a complex matrix $$X$$, is it possible to convert it into real by multiplying it by another invertible real matrix $$Y$$ such that $$XY$$ becomes real?

## WolframAlpha gives small imaginary part for real integral \$int_0^infty log(1 – 2xe^{-x} – e^{-2x}),dx\$

Putting the integral $$int_0^infty log(1 – 2xe^{-x} – e^{-2x}),dx$$ into Wolfram|Alpha gives `integral_0^โ log(1 - e^(-2 x) - 2 e^(-x) x) dx = -6.89753 + 3.19343ร10^-7 i`

Two questions:

1. Which numerical algorithm does it use that produces this small imaginary part?
2. Is there a chance for a symbolic solution for this integral?

## equation solving – How to simplify sqrt without imaginary unit

I’ve a system of equations and one solution that Mathematica throws is:

$$x=frac{mathbb{I} b sqrt{pA – pS}}{sqrt{-3 pA + 3 pS}}$$

knowing that $$pS,pA in mathbb{R}$$ and allways

$$pS > pA$$

we can factorize the square root of the numerator like this:

$$sqrt{(-1)(pS-pA)}=mathbb{I}sqrt{pS-pA}$$

wich turns the solution into:

$$x=-frac{b sqrt{pS – pA}}{sqrt{-3 pA + 3 pS}}=-frac{b}{sqrt{3}}$$

how can I get that result within Mathematica? I’ve used

``````expr//ComplexExpand//FullSimplify
``````

without success

## Plotting imaginary part on y-axis against real part on x-axis of complex momentum

I want to plot a complex momentum in complex plane where the y-axis shows imaginary values and x-axis shows the real values. I tried ReIm command but it plots Re and Im parts not Re vs Im.
Below is an example which plots Im and Re parts but I need Im vs Re. Any suggestions please?

``````Clear[m, M, s, t]
m = 0.34
M = 5;
t = m^2 + M^2 - s/2 + 1/2 Sqrt[s - 4 m^2] Sqrt[s - 4 M^2];
tplot = Plot[{Im@t, Re@t}, {s, 4 m^2, 4 M^2}, PlotRange -> All,
Frame -> True]
``````