Help with int(x), getting erf in answer

I am trying to take the definite integral of e^(-x^2)*sin(x) from 0 to inf and keep getting a weird answer. Here is my code and the result:
>> syms x real
>> int(exp(-x^2)*sin(x),x,0,inf)
ans =
-(pi^(1/2)*erf(1i/2)*exp(-1/4)*1i)/2
Any help on what I am doing wrong would be much appreciated. Thanks.

1 comentario

John D'Errico
John D'Errico el 14 de Ag. de 2015
Editada: John D'Errico el 14 de Ag. de 2015
And, why do you think there is a problem? erf is well defined.
vpa(erf(sym('1i/2')))
ans =
0.61495209469651098083968118562364i

Iniciar sesión para comentar.

Respuestas (1)

Star Strider
Star Strider el 14 de Ag. de 2015

0 votos

You’re not doing anything wrong. See the definition of erf and the reason should be straightforward.

Etiquetas

Preguntada:

el 13 de Ag. de 2015

Editada:

el 14 de Ag. de 2015

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by