To add insult to injury, trying to re-enable system’s giac (make giac-clean && configure failed. Somehow,./configurefinds no *suitable* systemgiacversion, and re-builds Sage's giac. It seems that I should also cleanpari` and consorts and re-re-build…
Sigh… Le vendredi 28 janvier 2022 à 23:10:23 UTC+1, dmo...@deductivepress.ca a écrit : > I confirm the problem so please open a ticket. > > I tried 9.5rc4 on MacOS 11.5.2, I tried 9.4 and 9.5rc4 on Ubuntu 20.04 > (CoCalc), and I tried 9.5rc3 on a 32-bit Debian virtual machine. Maybe > something would have happened eventually, but none of them gave an answer > within 20 minutes. The giac version seems to be 1.6.0 in all cases. > > On Friday, January 28, 2022 at 1:23:08 PM UTC-7 emanuel.c...@gmail.com > wrote: > >> Can’t reproduce on Sage 9.5.rc1 running in Debian testing. First thing >> after session start : >> >> sage: integrate(e^x/(x^2+1), x, -pi, pi) >> // Giac share root-directory:/usr/share/giac/ >> // Giac share root-directory:/usr/share/giac/ >> Added 0 synonyms >> 1/2*(imag_part(Ei(pi + I))*tan(1/2)^2 - imag_part(Ei(pi - I))*tan(1/2)^2 + >> 2*real_part(Ei(pi + I))*tan(1/2) + 2*real_part(Ei(pi - I))*tan(1/2) - >> imag_part(Ei(pi + I)) + imag_part(Ei(pi - I)))/(tan(1/2)^2 + 1) - >> 1/2*(imag_part(Ei(-pi + I))*tan(1/2)^2 - imag_part(Ei(-pi - I))*tan(1/2)^2 + >> 2*real_part(Ei(-pi + I))*tan(1/2) + 2*real_part(Ei(-pi - I))*tan(1/2) - >> imag_part(Ei(-pi + I)) + imag_part(Ei(-pi - I)))/(tan(1/2)^2 + 1) >> >> BTW: >> >> sage: integrate(e^x/(x^2+1), x).simplify_full() >> 1/2*(2*I*cos(1/2)^2 + 2*cos(1/2)*sin(1/2) - I)*Ei(x + I) + >> 1/2*(-2*I*cos(1/2)^2 + 2*cos(1/2)*sin(1/2) + I)*Ei(x - I) >> sage: integrate(e^x/(x^2+1), x, algorithm="fricas").simplify_full() >> 1/2*(-I*Ei(x - I)*e^(2*I) + I*Ei(x + I))*e^(-I) >> >> And these expressions are equal : >> >> sage: integrate(e^x/(x^2+1), x).trig_reduce().exponentialize().factor() >> -1/2*I*(Ei(x - I)*e^(2*I) - Ei(x + I))*e^(-I) >> sage: integrate(e^x/(x^2+1), x, algorithm="fricas") >> -1/2*I*(Ei(x - I)*e^(2*I) - Ei(x + I))*e^(-I) >> >> Mathematica gives the same (mathematical) result (but this can’t be >> backtranslated to Sage now, for lack of ExpIntegralEi in the translation >> dictionary) : >> >> sage: mathematica.Integrate(e^x/(x^2+1), x) >> ((-I/2)*(E^(2*I)*ExpIntegralEi[-I + x] - ExpIntegralEi[I + x]))/E^I >> >> HTH, >> >> Le vendredi 28 janvier 2022 à 11:56:14 UTC+1, Emmanuel Briand a écrit : >> >>> Using Sage 9.4 installed with conda on Mac OS X 10.13.6, I observe an >>> erratic behaviour of "integrate" for a very specific integral. >>> >>> The following command runs forever: >>> >>> sage: integrate(e^x/(x^2+1), x, -pi, pi) >>> >>> (The problem does not show up with another interval of integration, e.g. >>> 0, pi or -pi, 0 instead of -pi, pi). >>> >>> After interrupting, the following message is shown: >>> >>> ^CInterrupting Giac... >>> >>> integrate(e^x/(x^2 + 1), x, -pi, pi) >>> >>> Running a second time the command returns the question, which is ok. >>> >>> sage: integrate(e^x/(x^2+1), x, -pi, pi) >>> integrate(e^x/(x^2 + 1), x, -pi, pi) >>> >>> But running a third time (or fourth o more) the command returns a wrong >>> result: >>> >>> sage: integrate(e^x/(x^2+1), x, -pi, pi) >>> -pi*e^x/(x^2 + 1) - x*e^x/(x^2 + 1) >>> >>> Actually, after that, no integral of th same function can be calculated: >>> >>> sage: integrate(e^x/(x^2+1), x,0, 1) >>> -x*e^x/(x^2 + 1) >>> >>> Intgrls of other functions are ok. >>> >>> >>> >>> The problem does not show up when avoiding giac: >>> >>> sage: integrate(e^x/(x^2+1), x, -pi, pi, algorithm='maxima') >>> integrate(e^x/(x^2 + 1), x, -pi, pi) >>> >>> Asking for the giac version gives no clue: >>> >>> sage: giac.version() >>> "Done" >>> >>> Should I open a ticket for this? >>> >>> Emmanuel Briand >>> >>> >>> >>> -- You received this message because you are subscribed to the Google Groups "sage-devel" group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-devel+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/sage-devel/7a3256a6-43b1-412e-a4d8-cf030cec76abn%40googlegroups.com.