Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Function defined with an integral

Dear all, I'm puzzled by this answer from Sage:

sage: def f(x): ....: return integral(exp(t^2)/sqrt(t),t,1,x^2) sage: f(4).numerical_approx() 1.18428615262607e109 - 1.28184667602042*I

Why the answer is a complex number? How can I define f as a real function? Thanks.

click to hide/show revision 2
None

Function defined with an integral

Dear all, I'm puzzled by this answer from Sage:

sage: def f(x):
....:     return integral(exp(t^2)/sqrt(t),t,1,x^2)
sage: f(4).numerical_approx()
1.18428615262607e109 - 1.28184667602042*I

1.28184667602042*I

Why the answer is a complex number? How can I define f as a real function? Thanks.