## mathematical optimization – NonlinearModelFit returning imaginary numbers after adjusting actual data

I have problems when I try to use `NonlinearModelFit` to adapt a function similar to the square root to a set of real data points.

Here is the function:

$$begin {equation} left (- frac {2 sum _ {i = 0} ^ n c_i q ^ i} { sqrt { left ( sum_ {i = 0} ^ M b_i q ^ i right) {} ^ 2-4 left (a_1 q + 1 right) sum _ {i = 0} ^ n c_i q ^ i} + sum _ {i = 0} ^ M b_i q ^ i} right) ^ 2 end {equation}$$

or $$M, , n in mathbb {N}$$.

I can not impose constraints `NonLinearModelFit` because I need mistakes, and I can not try to change the function with `Re` or `Conjugate`.

Here are the data:

``````{{{0.0491483}, 0.85451}, {0.106523} 0.041859, {0.202128, 0.567694}, {0.00429277, 0.985704}, {0.0438898, 0.868359}, {0.202524, 0.567161}, {0.164643, 0, ## EQU00001 ##, {0.0887417} 0.865331}, {0.079667, 0.780801}, {0.200001, 0.570565}, {0.13433, 0.672086}, {0.130211, 0.12540}, {0.181252, 0.596908}, {0.104507, 0.728124}, {0.171583, 0.611263}, {0.0359265, 0.890045} }, {0.187224, 0.58831}, {0.225738, 0.53731}, {0.0723277, {0.197555}, {0.197555} {0.10055, 0.736123}, {0.141649, 0.65939}, {0.0926702, 0.752483}, {0.0598971, 0.827301}, {0.176524} , 0.60386}, {0.0342446, 0.894738}, {0.110842, 0.715605}, {0.0116676,, 0.623958}, {0.243646, 0.515952}, {0.0561636, 0.836589}, {0.203855, 0.565379}, {0 .0780196, 0.784511}, { 0.196865, 0.574841}, {0.175081, 0.606007}, {0.0955304, 0.746478}, {0.0320406, 0.900951}, {1.5931, 0.0890937}, {1.0712, 0.1460,}. , (0.827541, 0.194791), {1.41378, 0.104037}, {2.60719, 0.0446751}, {1.56054, 0.0915489}, {0.647142, 0.249531}, {2.86556, 0.0388113}, {2.65311, 0.04.37.37},}, {{{{{{{{{{{{{{{{{{}} {{{{{{{{}} {{{{{{{}} {{{{{{{}} {{{{{{}} {{{{{}} , 0.319958, {0.501975, 0.31344}, {1.51357, 0.0952797}, {2.58615, 0.0452123}, {2.08624, 0.0616378}, {1.91234, 0.0696033}, {0.646257, 0.249857}, {1.54624, 0.0917261}, 0.0605774}, { 0.580136, 0.276214}, {4.01178, 0.0230932}, {10.7232, 0.00449478}, {11.2478, 0.00413793}, {8.94916, 0.00613476}, {6.91823, 0.00948793}, {5.382830, 40}}}
``````

## Mathematical Optimization – The fit of a nonlinear model returns imaginary numbers in a real fit

I have problems when I try to adapt a function similar to a square root to a set of real data, here is the function:
$$begin {equation} left (- frac {2 sum _ {i = 0} ^ n c_i q ^ i} { sqrt { left ( sum_ {i = 0} ^ M b_i q ^ i right) {} ^ 2-4 left (a_1 q + 1 right) sum _ {i = 0} ^ n c_i q ^ i} + sum _ {i = 0} ^ M b_i q ^ i} right) ^ 2 end {equation}$$
Or $$M, n in mathbb {N}$$.
I can not try to put constraints on the NonLinearModelFit because I need errors, and I can not try to change the function with Re[] or conjugate[]because is change the function. Here are the data:
{{{0.0491483.0.85451}, {0.00306566.0.989755}, {0.156523.0.634745}, {0.19322.0.579874}, {0.107026.0.723105}, {0.159402.0.630146}, {0.126612.0.685905}, {0.041859.0.07.707} , {0.02},,,,, {0.2478.13.03.08. , {0.25778.0.549804}, {0.140331.0.661648}, {0.0450278.0.865331}, {0.079667.0.780801}, {0.200001.0.570565}, {0.13433.0.672086}, {0.130211.0.679405}, {0.24480.5.5}, , {0.181252.0.596908}, {0.104507.0.728124}, {0.171583.0.611263}, {0.0359265.0.890045}, {0.187224.0.58831}, {0.225738.0.53731}, {0.0723277.0.797555}, {0.1913.35.35. 55.3. {0.10055.0.736123}, {0.141649.0.65939}, {0.0926702.0.752483}, {0.0598971.0.827301}, {0.110842.0.715605}, {0.011667.0.96266,, 0.623958}, {0.243646.0}, 515952}, {0,0561636,0,836589}, {0,203855,0,565379}, {0,0780196,0,784511}, {0,196865,0,574841}, {0,175081.0}, 606007}, {0.0955304.0747888}, 0.900951}, {1.5931.0.0890937}, {1.0712.0.146087}, {1.75196.0.078463}, {2.65825.0.0434119}, {0.827541.0.194791}, {1.41378.0.104037}, {2.60719.0.0446.2759}, {1.56054.09.59.59.59. }, {0.647142.0.249531}, {2.86556.0.0388113}, {2.65311.0.0435367}, {2.67742.0.0429519}, {0.834751.0.193004}, {1.00899.0.156551}, {1.5725.0.0906352}, {2.34786.0.020663} }, {0.270901.0.48594}, {0.871762.0.184223}, {1.24283.0.122258}, {1.30046.0.115596}, {0.489775.0.319958}, {0.501975.0.31344}, {1.51357.0.0952797}, {2.58615.0.0452123, { 2.08624. , 0.0616378}, {1.91234.0.0696033}, {0.646257.0.249857}, {1.55824.0.0917261}, {2.11203.0.0605774}, {0.580136.0.276214}, {4.01178.0.0230932}, {10.7232.0.004.48.88,}. }, {8.94916,0.00613476}, {6.91823.0.00948793}, {5.38288.0.0143832}, {8.16001.0.00718018}}}

## complex – Effective evaluation of real / imaginary parts of long expressions

I have the following expression, rather compact, but complex (see below). I just want the real part of this. Now, when I make the habit, that is to say `ComplexExpand[Re[...]]//Simplify` since all parameters and functions are real, the number of terms produced by `ComplexExpand` is apparently too large (about 6000 terms) for `Simplify` manage. It has been running for almost an hour now, with no sign of conclusion.

From similar expressions in the same context, I know that the result of the simplification is also quite compact (just like the expression I'm starting with), so I'm wondering if it's possible to skip the "Expand" part. "from `ComplexExpand`? Why develop in thousands of terms, while everything resonates in a compact expression?

There must be a more efficient way, right?

``````- ((I E ^ (I am[Phi] + t [Omega]I -
He [Omega]r) ((1 / (
1 + (i [Nu] -
I r [Nu]) ^ 2 [Chi]^ 2 Cos[[Theta]]^ 2)) (r ^ 2 + [Chi]^ 2 Cos[
[Theta]]^ 2) (-1 + (2 r) / (
r ^ 2 + [Chi]^ 2 Cos[[Theta]]^ 2)) (-m [Chi] (r (-2 +
r (I[Nu] +
r[Nu]) ^ 2 ((-2 + r) r + [Chi]^ 2)) + (I i [Nu] +
r[Nu]) ^ 2 [Chi]^ 2 (r ^ 2 + [Chi]^ 2) Cos[[Theta]]^ 2)
(I RaI[r] + RaR[r]) (I say[[Theta]]+
SaR[[Theta]]) + (I [Omega]I +[Omega]r) (-r (r ^ 3 + (2
+ r + r ^ 3 (i [Nu] - I r[Nu]) ^ 2 +
2 r ^ 2 (I i [Nu] + r[Nu]) ^ 2)[Chi]^ 2 +
r (i [Nu] - I r[Nu]) ^ 2 [Chi]^ 4) + [Chi]^ 2 (r (2 -
r + 2 r ^ 2 (I i [Nu] + r[Nu]) ^ 2) + (-1 +
r ^ 2 (I i [Nu] + r[Nu]) ^ 2)[Chi]^ 2 + (I i [Nu] +
r[Nu]) ^ 2 [Chi]^ 4) Cos[[Theta]]^ 2) (I RaI[r] +
RaR[r]) (I say[[Theta]]+ SaR[[Theta]]+
r (I[Nu] +
r[Nu]) ((-2 +
r) r + [Chi]^ 2) (r ^ 2 + [Chi]^ 2) (-1 + (I i [Nu] +
r[Nu]) ^ 2 [Chi]^ 2 Cos[[Theta]]^ 2) (I SaI[[Theta]]+
SaR[[Theta]]) (I drift[1][RaI][r]    +
Derivative[1][RaR][r]) - (I i [Nu] + r[Nu]) (1 +
r ^ 2 (I i [Nu] + r[Nu]) ^ 2)[Chi]^ 2 ((-2 +
r) r + [Chi]^ 2) Cos[[Theta]](I RaI[r] +
RaR[r]) Peach[[Theta]](I drift[1][SaI][[Theta]]+
Derivative[1][SaR][[Theta]])) + (
1 / (- 1 + (I i [Nu] + r[Nu]) ^ 2 [Chi]^ 2 Cos[[Theta]]^ 2))
2 r[Chi] Peach[[Theta]]^ 2 (1 /
2 r (I[Nu] +
r[Nu]) [Chi] ((-2 + r) r + [Chi]^ 2) (-2 + (I i [Nu] +
r[Nu]) ^ 2 [Chi]^ 2 + (I i [Nu] +
r[Nu]) ^ 2 [Chi]^ 2 Cos[2 [Theta]]) (I say[[Theta]]+
SaR[[Theta]]) (I drift[1][RaI][r]    +
Derivative[1][RaR][r]) - (I RaI[r] +
RaR[r]) ((-r [Chi] (-2 +
r (I[Nu] +
r[Nu]) ^ 2 ((-2 +
r) r + [Chi]^ 2)) (I [Omega]I +[Omega]r) +
m[Chi]^ 2 (1 + (I i [Nu] +
r[Nu]) ^ 2 [Chi]^ 2) baby crib[[Theta]]^ 2 - (I i [Nu] +
r[Nu]) ^ 2 [Chi]^ 3 Cos[[Theta]]^ 2 ((r ^ 2 +
[Chi]^ 2) (I [Omega]I +[Omega]r) + m [Chi] Crib[[Theta]]^ 2) +
m r (-2 + r + 2 r ^ 2 (i [Nu] - I r[Nu]) ^ 2 +
r ^ 3 (I i [Nu] + r[Nu]) ^ 2 +
r (I[Nu] +
r[Nu]) ^ 2 [Chi]^ 2) Csc[[Theta]]^ 2) (I SaI[
[Theta]]+ SaR[[Theta]]) + (I i [Nu] + r[Nu]) (1 +
r ^ 2 (I i [Nu] + r[Nu]) ^ 2)[Chi] (-2 +
r) r + [Chi]^ 2) baby crib[[Theta]](I drift[1][
SaI][[Theta]]+
Derivative[1][SaR][[Theta]])))))) / ((1 +
r ^ 2 (I i [Nu] + r[Nu]) ^ 2) ((-2 +
r) r + [Chi]^ 2) (r ^ 2 + [Chi]^ 2 Cos[[Theta]]^ 2) ^ 2))
``````

## performance tuning – imaginary part of the expression too difficult to calculate

I'm trying to calculate the imaginary part of a long phrase. This is a pretty long phrase that Mathematica "hangs" when you run:

``````imFUN2 = ComplexExpand[Im[expression]];
``````

Can I do something that can help speed things up?

Here is my complete code:

``````expression = - ((I [CapitalOmega]c (4 [Gamma]a ^ 4 +
16 [CapitalDelta]d4 -
48 [CapitalDelta]d ^ 3 [CapitalDelta]p +
48 [CapitalDelta]d ^ 2 [CapitalDelta]p ^ 2 -
16 [CapitalDelta]re[CapitalDelta]p ^ 3 +
4 I[Gamma]a ^ 3 (3 [CapitalDelta]c + 6 [CapitalDelta]re -
4 [CapitalDelta]p - [CapitalDelta]s) -
16 [CapitalDelta]d ^ 3 [CapitalDelta]s +
32 [CapitalDelta]d ^ 2 [CapitalDelta]p[CapitalDelta]s -
16 [CapitalDelta]re[CapitalDelta]p ^ 2 [CapitalDelta]s -
4 [CapitalDelta]d ^ 2 [CapitalOmega]c ^ 2 +
4 [CapitalDelta]re[CapitalDelta]p[CapitalOmega]c ^ 2 +
4 [CapitalDelta]re[CapitalDelta]s [CapitalOmega]c ^ 2 -
4 I'm degrading [CapitalDelta]re[CapitalOmega]d ^ 2 +
12 [CapitalDelta]d ^ 2 [CapitalOmega]d ^ 2 +
4 I'm degrading [CapitalDelta]p[CapitalOmega]d ^ 2 -
24 [CapitalDelta]re[CapitalDelta]p[CapitalOmega]d ^ 2 +
12 [CapitalDelta]p ^ 2 [CapitalOmega]d ^ 2 -
8 [CapitalDelta]re[CapitalDelta]s [CapitalOmega]d ^ 2 +

8 [CapitalDelta]p[CapitalDelta]s [CapitalOmega]d ^ 2 -
[CapitalOmega]c ^ 2 [CapitalOmega]d ^ 2 + [CapitalOmega]d4 +
4 [CapitalDelta]c ^ 2 (4 [CapitalDelta]d ^ 2 -
4 [CapitalDelta]re[CapitalDelta]p +
[CapitalOmega]d ^ 2) -
2 [Gamma]a ^ 2 (4 [CapitalDelta]c ^ 2 +
26 [CapitalDelta]d ^ 2 + 10 [CapitalDelta]p ^ 2 +
2 [CapitalDelta]c (13 [CapitalDelta]re -
7 [CapitalDelta]p - 2 [CapitalDelta]s) +
6 [CapitalDelta]p[CapitalDelta]s -
2 [CapitalDelta]d (18 [CapitalDelta]p +
5 [CapitalDelta]s) - [CapitalOmega]c ^ 2 +
4 [CapitalOmega]d ^ 2) +
4 [CapitalDelta]c (8 [CapitalDelta]d ^ 3 -
4 [CapitalDelta]d ^ 2 (4 [CapitalDelta]p +
[CapitalDelta]s) - (4 [CapitalDelta]p + [CapitalDelta]s)
[CapitalOmega]d ^ 2 + [CapitalDelta]d (8 [CapitalDelta]p ^ 2 +
4 [CapitalDelta]p[CapitalDelta]s -
[CapitalOmega]c ^ 2 + 4 [CapitalOmega]d ^ 2)) -
2 I [Gamma]one (24 [CapitalDelta]d ^ 3 +
4 [CapitalDelta]c ^ 2 (3 [CapitalDelta]re -
[CapitalDelta]p) - 4 [CapitalDelta]p ^ 3 -
4 [CapitalDelta]p ^ 2 [CapitalDelta]s -
4 [CapitalDelta]d ^ 2 (13 [CapitalDelta]p +
4 [CapitalDelta]s) + [CapitalDelta]p
[CapitalOmega]c ^ 2 + [CapitalDelta]s [CapitalOmega]c ^ 2 -
2 I'm degrading [CapitalOmega]d ^ 2 -
ten[CapitalDelta]p[CapitalOmega]d ^ 2 -
3 [CapitalDelta]s [CapitalOmega]d ^ 2 + [CapitalDelta]c
(36)[CapitalDelta]d ^ 2 + 8 [CapitalDelta]p ^ 2 +
4 [CapitalDelta]p[CapitalDelta]s -
4 [CapitalDelta]d (11 [CapitalDelta]p +
3 [CapitalDelta]s) - [CapitalOmega]c ^ 2 +
7 [CapitalOmega]d ^ 2) + [CapitalDelta]d (32
[CapitalDelta]p ^ 2 + 20 [CapitalDelta]p[CapitalDelta]s -
3 [CapitalOmega]c ^ 2 +
ten[CapitalOmega]d ^ 2)))) / (([Gamma]a +
2 I [CapitalDelta]d) (2 [Gamma]a ^ 2 -
4 [CapitalDelta]c ^ 2 +
4 [CapitalDelta]re[CapitalDelta]p -
4 [CapitalDelta]p ^ 2 +
4 [CapitalDelta]re[CapitalDelta]s -
8 [CapitalDelta]p[CapitalDelta]s -
4 [CapitalDelta]s ^ 2 +

2 I [Gamma]one (3 [CapitalDelta]c + [CapitalDelta]re -
3 ([CapitalDelta]p + [CapitalDelta]s)) +
[CapitalDelta]c (-4)[CapitalDelta]d +
8 ([CapitalDelta]p + [CapitalDelta]s)) +
[CapitalOmega]d ^ 2) (4 I [Gamma]a ^ 3 ([CapitalDelta]c -
[CapitalDelta]p) -
16 [CapitalDelta]c ^ 2 [CapitalDelta]re[CapitalDelta]p -
16 [CapitalDelta]c[CapitalDelta]d ^ 2 [CapitalDelta]p +
16 [CapitalDelta]c ^ 2 [CapitalDelta]p ^ 2 +
48 [CapitalDelta]c[CapitalDelta]re[CapitalDelta]p ^ 2 +
16 [CapitalDelta]d ^ 2 [CapitalDelta]p ^ 2 -
32 [CapitalDelta]c[CapitalDelta]p ^ 3 -
32 [CapitalDelta]re[CapitalDelta]p ^ 3 +
16 [CapitalDelta]p ^ 4 -
4 [CapitalDelta]c[CapitalDelta]re[CapitalOmega]c ^ 2 -
4 [CapitalDelta]d ^ 2 [CapitalOmega]c ^ 2 +
8 [CapitalDelta]c[CapitalDelta]p[CapitalOmega]c ^ 2 +
8 [CapitalDelta]re[CapitalDelta]p[CapitalOmega]c ^ 2 -
8 [CapitalDelta]p ^ 2 [CapitalOmega]c ^ 2 +
[CapitalOmega]c ^ 4 - 4 [CapitalDelta]c ^ 2 [CapitalOmega]d ^ 2 -
4 [CapitalDelta]c[CapitalDelta]re[CapitalOmega]d ^ 2 +
8 [CapitalDelta]c[CapitalDelta]p[CapitalOmega]d ^ 2 +
8 [CapitalDelta]re[CapitalDelta]p[CapitalOmega]d ^ 2 -
8 [CapitalDelta]p ^ 2 [CapitalOmega]d ^ 2 -
2 [CapitalOmega]c ^ 2 [CapitalOmega]d ^ 2 +
[CapitalOmega]d4 +
2 [Gamma]a ^ 2 (-4 [CapitalDelta]c ^ 2 -
6 [CapitalDelta]c[CapitalDelta]d +
14 [CapitalDelta]c[CapitalDelta]p +
6 [CapitalDelta]re[CapitalDelta]p -
ten[CapitalDelta]p ^ 2 + [CapitalOmega]c ^ 2 +
[CapitalOmega]d ^ 2) -
2 I [Gamma]one (4 [CapitalDelta]c ^ 2 ([CapitalDelta]re -
3 [CapitalDelta]p) -
4 [CapitalDelta]d ^ 2 [CapitalDelta]p + [CapitalDelta]re
(20 [CapitalDelta]p ^ 2 -
3 [CapitalOmega]c ^ 2 - [CapitalOmega]d ^ 2) +
[CapitalDelta]c (4 [CapitalDelta]d ^ 2 -
24 [CapitalDelta]re[CapitalDelta]p +
28 [CapitalDelta]p ^ 2 -
3 [CapitalOmega]c ^ 2 - [CapitalOmega]d ^ 2) +
4 [CapitalDelta]p (-4)[CapitalDelta]p ^ 2 +
[CapitalOmega]c ^ 2 + [CapitalOmega]d ^ 2)) +
2 out of phase (2 [Gamma]a ^ 3 +
2 I [Gamma]a ^ 2 (2 [CapitalDelta]c +
3 [CapitalDelta]re -
5 [CapitalDelta]p) + [Gamma]one (-4
[CapitalDelta]d ^ 2 -
4 [CapitalDelta]c ([CapitalDelta]re -
3 [CapitalDelta]p) +
20 [CapitalDelta]re[CapitalDelta]p -
16 [CapitalDelta]p ^ 2 + [CapitalOmega]c ^ 2 +
[CapitalOmega]d ^ 2) +
2 I (4 [CapitalDelta]d ^ 2 [CapitalDelta]p -
8 [CapitalDelta]re[CapitalDelta]p ^ 2 +
4 [CapitalDelta]p ^ 3 - [CapitalDelta]p
[CapitalOmega]c ^ 2 + [CapitalDelta]re[CapitalOmega]d ^ 2 -
[CapitalDelta]p[CapitalOmega]d ^ 2 + [CapitalDelta]c (4
[CapitalDelta]re[CapitalDelta]p -
4 [CapitalDelta]p ^ 2 + [CapitalOmega]d ^ 2)))))) /.
{[Gamma]a -> 1, out of phase -> 10 ^ -4};
imFUN2 = ComplexExpand[Im[expression]];
``````

## Analytical Number Theory – Explicit formula for the imaginary part of the smooth logarithmic derivative of zeta

Consider the following formula, for $$t> T ^ {1/4}$$

$$( star) hspace {4 mm} sum_ { gamma} bigg ( frac { sin ( tfrac {1} {2} ( gamma-t) log T)} { tfrac {1} {2} ( gamma-t) log T} bigg) ^ 2 – frac { log t} { log T} = – frac {2} { log T} textbf {Re } sum_ {n
There is also a significant contribution $$2 textbf {Re} frac {T ^ { tfrac {1} {2} -it}} {( tfrac {1} {2} -it) ^ 2 log ^ 2 T}$$ poles but since we assumed $$t> T ^ {1/4}$$ he is absorbed by the term error.
You can prove it by assuming that RH and integrating $$zeta ^ prime / zeta$$ with $$displaystyle { bigg ( frac {T ^ {s / 2} -T ^ {- s / 2}} {s} bigg) ^ 2}.$$
I was wondering if there was a neat formula for
$$– frac {2} { log T} textbf {Im} sum_ {n

I understand by order a formula that can be used for computation with a computer. I guess it should look like the derivative of the LHS of $$( star)$$ divided by constant time $$log T$$ but I can not find any proof. The reason for my conjecture is that, for the most part, we are dealing with the sum involving $$cos (t log n)$$ and partly imaginary with the need $$sin (t log n)$$but when I take a derivative, there is an additional factor of log between, and I could not get rid of it by using partial summation, since we close the sum using the smooth weight $$Big (1- frac { log n} { log T} Big),$$ for $$n .

## plot – how to plot data containing an imaginary number

I have a data that contains real values ​​in x and imaginary values ​​in y, I wanted to draw this dataset but I could not plot. How to do this? I get a wired plot, with which I am unable to draw conclusions.

``````data = {{6.28319, 0. - 198342. I}, {12.5664, 0. - 97729.6 I}, {18.8496,
0. - 63550.7 I}, {25.1327, 0. - 45978.9 I}, {31.4159,
0. - 35048.9 I}, {37.6991, 0. - 27438.5 I}, {43.9823,
0. - 21723.7 I}, {50,2655, 0. - 17192. I}, {56.5487,
0. - 13447.7 I}, {62.8319, 0. - 10253.2 I}, {69,115,
0. - 7456.79 I}, {75.3982, 0. - 4957.45 I}, {81.6814,
0. - 2684.93 I}, {87.9646, 0. - 588.956 I}, {94.2478,
0. - 1367.53 I}, {100.531, 0. - 3212.47 I}, {106.814,
0. - 4967.37 I}, {113.097, 0. - 6649.18 I}, {119.381,
0. - 8271.36 I}, {125.664, 0. - 9844.87 I}, {131.947,
0. - 11378.8 I}, {138.23, 0. - 12880.6 I}, {144.513,
0. - 14356.8 I}, {150.796, 0. - 15812.9 I}, {157.08,
0. - 17253.7 I}, {163.363, 0. - 18683.6 I}, {169.646,
0. - 20106.4 I}, {175.929, 0. - 21525.6 I}, {182.212,
0. - 22944.6 I}, {188.496, 0. - 24366.5 I}, {194.779,
0. - 25794.1 I}, {201.062, 0. - 27230.6 I}, {207.345,
0. - 28678.8 I}, {213.628, 0. - 30141.5 I}, {219.911,
0. - 31622.1 I}, {226.195, 0. - 33123.3 I}, {232.478,
0. - 34648.9 I}, {238.761, 0. - 36202.1 I}, {245.044,
0. - 37787.5 I}, {251.327, 0. - 39409.2 I}, {257.611,
0. - 41072.8 I}, {263.894, 0. - 42784. I}, {270.177,
0. - 44550.2 I}, {276.46, 0. - 46380.4 I}, {282.743,
0. - 48285.6 I}, {289.027, 0. - 50280.5 I}, {295.31,
0. - 52384.7 I}, {301.593, 0. - 54625.7 I}, {307.876,
0. - 57043.8 I}, {314.159, 0. - 59702.4 I}, {320.442,
0. - 62708.3 I}, {326.726, 0. - 66259.5 I}, {333,009,
0. - 70775.6 I}, {339.292, 0. - 77341.1}, {345,575,
0. - 89935.4 I}, {351.858, 0. - 144924. I}, {358.142,
0. - 6836. I}, {364.425, 0. - 45792.9 I}, {370.708,
0. - 58601.2 I}, {376.991, 0. - 65744.9 I}, {383.274,
0. - 71094.9 I}, {389.557, 0. - 75723.8 I}, {395.841,
0. - 80058. I}, {402.124, 0. - 84308.7}, {408.407,
0. - 88601.8 I}, {414.69, 0. - 93024.6 I}, {420.973,
0. - 97647.3 I}, {427.257, 0. - 102534. I}, {433.54,
0. - 107748. I}, {439.823, 0. - 113359. I}, {446.106,
0. - 119443. I}, {452.389, 0. - 126094.I}, {458.673,
0. - 133420. I}, {464.956, 0. - 141558. I}, {471.239,
0. - 150676. I}, {477.522, 0. - 160994. I}, {483.805,
0. - 172796. I}, {490.088, 0. - 186461. I}, {496.372,
0. - 202511. I}, {502.655, 0. - 221672. I}, {508.938,
0. - 245002. I}, {515.221, 0. - 274097. I}, {521.504,
0. - 311482. I}, {527.788, 0. - 361408.I}, {534.071,
0. - 431627. I}, {540.354, 0. - 537933. I}, {546.637,
0. - 718244. I}, {552.92, 0. - 1.09223 * 10 ^ 6 I}, {559.203,
0. - 2,3339 * 10 ^ 6 I}, {565,487, 0. - 1,36441 * 10 ^ 7 I}, {571,77,
0. - 1.69973 * 10 ^ 6 I}, {578.053, 0. - 893437. I}, {584,336,
0. - 599544. I}, {590.619, 0. - 447162. I}, {596.903,
0. - 353773. I}, {603.186, 0. - 290575. I}, {609.469,
0. - 244891. I}, {615.752, 0. - 210271. I}, {622.035,
0. - 183083. I}, {628.319, 0. - 161131. I}, {634.602,
0. - 143004. I}, {640.885, 0. - 127758. I}, {647.168,
0. - 114734. I}, {653.451, 0. - 103462. I}, {659.734,
0. - 93593.8 I}, {666.018, 0. - 84868.6 I}, {672.301,
0. - 77085.7 I}, {678.584, 0. - 70089. I}, {684.867,
0. - 63755.6 I}, {691.15, 0. - 57986.1 I}, {697.434,
0. - 52700.3 I}, {703.717, 0. - 47832.3 I}, {710.,
0. - 43327.5 °, {716.283, 0. - 39140.8}, {722.566,
0. - 35233.6 I}, {728.849, 0. - 31573.8 I}, {735.133,
0. - 28133.6 I}, {741.416, 0. - 24889.3 I}, {747.699,
0. - 21820.4 I}, {753.982, 0. - 18909.2 I}, {760.265,
0. - 16140.1 I}, {766.549, 0. - 13499.5 I}, {772.832,
0. - 10975.5 I}, {779.115, 0. - 8557.52 I}, {785.398,
0. - 6236.11 I}, {791.681, 0. - 4002.95 I}, {797.965,
0. - 1850.57 I}, {804.248, 0. - 227.748 I}, {810.531,
0. - 2238.03 I}, {816.814, 0. - 4185.72 I}, {823.097,
0. - 6075.74 I}, {829.38, 0. - 7912.58 I}, {835.664,
0. - 9700.34 I}, {841.947, 0. - 11442.6 I}, {848.23,
0. - 13143. I}, {854.513, 0. - 14804.4 I}, {860.796,
0. - 16429.9 I}, {867.08, 0. - 18022. I}, {873.363,
0. - 19583.3 I}, {879.646, 0. - 21115.8 I}, {885.929,
0. - 22621.9 I}, {892.212, 0. - 24103.4 I}, {898.495,
0. - 25562.2 I}, {904.779, 0. - 26999.9 I}, {911.062,
0. - 28418.3 I}, {917.345, 0. - 29818.8 I}, {923.628,
0. - 31202.8 I}, {929.911, 0. - 32571.6 I}, {936.195,
0. - 33926.6 I}, {942.478, 0. - 35269. I}, {948.761,
0. - 36599.9 I}, {955.044, 0. - 37920.4 I}, {961.327,
0. - 39231.5 I}, {967.611, 0. - 40534.4 I}, {973.894,
0. - 41830. I}, {980.177, 0. - 43119.1 I}, {986.46,
0. - 44402.8 I}, {992.743, 0. - 45681.9 I}, {999.026,
0. - 46957.3 I}, {1005.31, 0. - 48229.9 I}, {1011.59,
0. - 49500.5 I}, {1017.88, 0. - 50769.9 I}, {1024.16,
0. - 52038.9 I}, {1030.44, 0. - 53308.3}, {1036.73,
0. - 54579.4 I}, {1043.01, 0. - 55852.2}, {1049.29,
0. - 57127.8 I}, {1055.58, 0. - 58407.4 I}, {1061.86,
0. - 59691.8 I}, {1068.14, 0. - 60981.5 I}, {1074.42,
0. - 62277.5 I}, {1080.71, 0. - 63580.5 I}, {1086.99,
0. - 64892.2 I}, {1093.27, 0. - 66212.8 I}, {1099.56,
0. - 67543.8 I}, {1105.84, 0. - 68885.6 I}, {1112.12,
0. - 70240.2 I}, {1118.41, 0. - 71607.6 I}, {1124.69,
0. - 72990.5 I}, {1130.97, 0. - 74388.9 I}, {1137.26,
0. - 75805.1 I}, {1143.54, 0. - 77239.8 I}, {1149.82,
0. - 78695.1 I}, {1156.11, 0. - 80172.4 I}, {1162.39,
0. - 81674. I}, {1168.67, 0. - 83201.7 I}, {1174.96,
0. - 84757.9 I}, {1181.24, 0. - 86344. I}, {1187.52,
0. - 87963.9 I}, {1193.81, 0. - 89620.1 I}, {1200.09,
0. - 91315.8 I}, {1206.37, 0. - 93054.8 I}, {1212.65,
0. - 94841.1 I}, {1218.94, 0. - 96679.4 I}, {1225.22,
0. - 98575. I}, {1231.5, 0. - 100534. I}, {1237.79,
0. - 102563. I}, {1244.07, 0. - 104670. I}, {1250.35,
0. - 106864. I}, {1256.64, 0. - 109156. I}}
ListPlot[{Re[#], I am[#]} & / @ data, PlotRange -> All]
``````

## Question about the imaginary number in solution of equation

I want to solve the equation below:

``````Solve[2*t^3 + t^2 - [Theta]* t - 2 *[Theta] == 0, t]
``````

I get three roots of this equation and I guess two are imaginary and a real value.
I trace the true value of this equation.

``````- (1/6) - (-1 - 6 *)[Theta]) / (6 * (- 1 + 99 * [Theta] + 3 * Sqrt[3]* Sqrt[-8*[-8*[-8*[-8*[Theta] + 359 *[Theta]^ 2 - 8 *[Theta]^ 3]) ^ (1/3)) + (1/6) * (- 1 + 99 * [Theta] + 3 * Sqrt[3]* Sqrt[-8*[-8*[-8*[-8*[Theta] + 359 *[Theta]^ 2 - 8 *[Theta]^ 3]) (1/3)

Ground[%{[%{[%{[%{[Theta], 1100}]
``````

To evaluate whether this root includes an imaginary part or not, I trace separately the real part and the imaginary part.

``````Ground[Re[expr]], {[Theta], 1100}]Ground[Im[expr], {[Theta], 1100}]
``````

Both graphs show that the real positive root of the equation includes an imaginary part.
Now, I'm trying to evaluate it again numerically.
First, I define a function with respect to theta.

``````F[[[[[Theta]_]: = - (1/6) - (-1 - 6 *[Theta]) /
(6 * (- 1 + 99 * [Theta] +
3 * Sqrt[3]* Sqrt[-8*[-8*[-8*[-8*[Theta] + 359 *[Theta]^ 2 - 8 *[Theta]^ 3]) ^
(1/3)) + (1/6) * (- 1 + 99 * [Theta] + 3 * Sqrt[3]*
sqrt[-8*[-8*[-8*[-8*[Theta] + 359 *[Theta]^ 2 - 8 *[Theta]^ 3]) (1/3)
``````

Then, plug in 50 that looks like an imaginary part of the graph.

``````            F[50]
``````

Clearly, this includes the imaginary number i

``````- (1/6) + 301 / (6 * (4949 + 630 * I * Sqrt)[7]) ^ (1/3)) + (1/6) * (4949 + 630 * I * Sqrt[7]) (1/3)
``````

However, if I solve it differently

``````    Solve[2*t^3 + t^2 - [Theta]* t - 2 *[Theta] == 0, t]/. [Theta] ->
50 // FullSimplify
``````

This gives three true valued roots.

``````{{t -> 1 + Sqrt[21]}, {t -> 1 - Sqrt[21]}, {t -> - (5/2)}}
``````

Here are my questions.

1) If the solutions of an equation include the imaginary number i, does this really mean that the solutions include an imaginary part?

2) In the case above, we can clearly verify that the solution I have traced includes an imaginary part in certain ranges of theta. However, if I give the specific value of theta in the range and solve it, that gives a real value.
I do not know why this happens.
In addition, I mathematically proved that the equation above had only a positive real value root, but it seems that we can not verify it using the graph.