mathematical expressions - Mathematica wrongly produces complex number instead of real -
i have next code in mathematica 9.0
in[8]:= funkcja[a_] =integrate[sqrt[z]*1/sqrt[2*pi] exp[-((z - a)^2/2)], {z, 0,infinity}] out[8]= (e^(-(a^2/4)) sqrt[\[pi]/2] (-a^2 besseli[-(1/4), a^2/4] + (2 + a^2) besseli[ 1/4, a^2/4] + a^2 (-besseli[3/4, a^2/4] + besseli[5/4, a^2/4])))/(4 sqrt[-a]) in[9]:= assuming[element[a, reals], simplify[funkcja[a]]] out[9]= (e^(-(a^2/4)) sqrt[\[pi]/2] (-a^2 besseli[-(1/4), a^2/4] + (2 + a^2) besseli[ 1/4, a^2/4] + a^2 (-besseli[3/4, a^2/4] + besseli[5/4, a^2/4])))/(4 sqrt[-a]) in[11]:= funkcja[1.0] out[11]= 0. - 0.104154
could explain me why formula produce complex number? integration on real domain , demand real.
mathematical-expressions
No comments:
Post a Comment