# Revision history [back]

you may try:

fr(x)=(e^(i*x*z+x^3/3)).subs(z==1).real_part()
fi(x)=(e^(i*x*z+x^3/3)).subs(z==1).imag_part()
ir=numerical_integral(fr(x),0,1)
ii=numerical_integral(fi(x),0,1)
Res=tuple([ir[0]+I*ii[0], ir[1]+I*ii[1]])


Would your grace accept Res=(0.904174612747833 + 0.5253056923680366I, 1.0038354733541787e-14 + 5.832064746336536e-15I) as an approximate answer ?

you may try:

fr(x)=(e^(i*x*z+x^3/3)).subs(z==1).real_part()
fi(x)=(e^(i*x*z+x^3/3)).subs(z==1).imag_part()
ir=numerical_integral(fr(x),0,1)
ii=numerical_integral(fi(x),0,1)
Res=tuple([ir[0]+I*ii[0], ir[1]+I*ii[1]])


Would your grace Your Grace accept Res=(0.904174612747833 + 0.5253056923680366I, 0.5253056923680366*I, 1.0038354733541787e-14 + 5.832064746336536e-15I) 5.832064746336536e-15*I) as an approximate answer ?

you may try:

fr(x)=(e^(i*x*z+x^3/3)).subs(z==1).real_part()
fi(x)=(e^(i*x*z+x^3/3)).subs(z==1).imag_part()
ir=numerical_integral(fr(x),0,1)
ii=numerical_integral(fi(x),0,1)
Res=tuple([ir[0]+I*ii[0], ir[1]+I*ii[1]])


Would Your Grace accept Res=(0.904174612747833 + 0.5253056923680366*I, 1.0038354733541787e-14 + 5.832064746336536e-15*I) as an approximate answer ?

*Later : Wups, wrong function (forgot a pair of parentheses).

fr(x)=(e^(i*(x*z+x^3/3))).subs(z==1).real_part()
fi(x)=(e^(i*(x*z+x^3/3))).subs(z==1).imag_part()
ir=numerical_integral(fr(x),0,1)
ii=numerical_integral(fi(x),0,1)
Res=tuple([ir[0]+I*ii[0], ir[1]+I*ii[1]])
Res
(0.777890693451008 + 0.5105422937539419*I, 8.636321585109385e-15 + 5.668158095705665e-15*I)