Timeline for 1D Integral always evaluates to 0 and Replace All
Current License: CC BY-SA 4.0
10 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Sep 8, 2021 at 7:59 | vote | accept | Ruslan Mushkaev | ||
Sep 7, 2021 at 14:08 | comment | added | Michael E2 |
@RuslanMushkaev Try Indexed[o[k.2.2], {1, 1}] instead of Part . NIntegrate inspects the integrand symbolically to determine which method to choose. Good thing you didn’t have o[k, 2, 2][[1]] , because that evaluates to k , which would give you strange results and no error.
|
|
Sep 7, 2021 at 9:26 | comment | added | Ruslan Mushkaev | Update: so making all the functions from hMf down numerical with ?NumericQ gives a non-zero integral, however now I get error messages like so: "Part specification o[k,2,2][[1,1]] is longer than depth of object" which I guess arise from Part being evaluated prematurely. I am a bit confused by this message because since we are using NIntegrate, shouldnt k always have a numerical value? | |
Sep 7, 2021 at 8:48 | comment | added | Ruslan Mushkaev | Thanks for this. Concerning your remark on normalization (last bit of code in your answer), I think that its the ordering of the vectors that's causing the sign change, as the structure of the matrix $o$ ( $o = u^{\dagger} \begin{pmatrix} 0 & 0 \\ 1 & 0 \end{pmatrix} u $) implies that its diagonal elements are invariant under the change in sign of any of the eigenvectors $v_1,v_2$ making up $u = (v_1,v_2)$. Also, now I understand why the plots of the integrand are different but I am still not sure why the integral f[1,1] is zero since a plot of the integrand suggests otherwise. | |
Sep 7, 2021 at 1:25 | history | edited | thorimur | CC BY-SA 4.0 |
added 42 characters in body
|
Sep 7, 2021 at 0:25 | history | edited | thorimur | CC BY-SA 4.0 |
added 223 characters in body
|
Sep 6, 2021 at 23:45 | history | edited | thorimur | CC BY-SA 4.0 |
deleted 220 characters in body
|
Sep 6, 2021 at 23:37 | history | edited | thorimur | CC BY-SA 4.0 |
added 520 characters in body
|
Sep 6, 2021 at 23:05 | history | edited | thorimur | CC BY-SA 4.0 |
added 568 characters in body
|
Sep 6, 2021 at 23:00 | history | answered | thorimur | CC BY-SA 4.0 |