Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Is there a way to convert "erfc" into normal?

31 views
Skip to first unread message

huhua

unread,
Jun 10, 2008, 5:32:05 PM6/10/08
to
Hi all,

In Maple, I am integrating a function involving the "erfc" function,

the final integral result has no explicit form, but should be able to
representted as a "\Phi(.)" function, where the "\Phi(.)" is the Gaussian
distribution function (cumulative).

Is there a way to force the following integral to output in the form of
"\Phi(.)" in Maple?

Thanks

int(exp(a*m)*(sqrt(T)*sqrt(Pi)*erf((1/2)*sqrt(2)*(m+a*T)/sqrt(T))*exp(a*m)*a-sqrt(T)*sqrt(Pi)*exp(a*m)*a+sqrt(2)*exp(-(1/2)*(m^2+a^2*T^2)/T)),
m = 0 .. K)


Robert Israel

unread,
Jun 11, 2008, 9:59:25 PM6/11/08
to

> Hi all,
>
> In Maple, I am integrating a function involving the "erfc" function,
>
> the final integral result has no explicit form, but should be able to
> representted as a "\Phi(.)" function, where the "\Phi(.)" is the Gaussian
> distribution function (cumulative).
>
> Is there a way to force the following integral to output in the form of
> "\Phi(.)" in Maple?

>int(exp(a*m)*(sqrt(T)*sqrt(Pi)*erf((1/2)*sqrt(2)*(m+a*T)/sqrt(T))*exp(a*m)*a-


>sqrt(T)*sqrt(Pi)*exp(a*m)*a+sqrt(2)*exp(-(1/2)*(m^2+a^2*T^2)/T)),
> m = 0 .. K)

Like this:

> f:= expand(exp(a*m)*(sqrt(T)*sqrt(Pi)*erf((1/2)*sqrt(2)*(m+a*T)/sqrt(T))
*exp(a*m)*a-sqrt(T)*sqrt(Pi)*exp(a*m)*a
+sqrt(2)*exp(-(1/2)*(m^2+a^2*T^2)/T)));


1/2 1/2 1/2
1/2 1/2 2 m a 2 T 2
f := T Pi erf(------ + -----------) exp(a m) a
1/2 2
2 T

1/2 1/2 2
- T Pi exp(a m) a

2 2
1/2 m T a
+ exp(a m) 2 exp(- ---) exp(- ----)
2 T 2


> F:= map(int,f,m);

/ 1/2 1/2 1/2
| 1/2 1/2 2 m a 2 T 2
F := | T Pi erf(------ + -----------) exp(a m) a dm
| 1/2 2
/ 2 T

1/2 1/2 2
- 1/2 T Pi exp(a m)

1/2 1/2 1/2
1/2 1/2 2 m a 2 T
- Pi T erf(- ------ + -----------)
1/2 2
2 T

> F := IntegrationTools[Parts](F,
erf(1/2*2^(1/2)/T^(1/2)*m+1/2*a*2^(1/2)*T^(1/2)));

1/2 1/2 1/2
1/2 1/2 2 2 m a 2 T
F := 1/2 T Pi exp(a m) erf(------ + -----------)
1/2 2
2 T

1/2 1/2 1/2
1/2 1/2 2 m a 2 T
- 1/2 Pi T erf(- ------ + -----------)
1/2 2
2 T

1/2 1/2 2
- 1/2 T Pi exp(a m)

> J := eval(F, m=K) - eval(F, m=0);

1/2 1/2 1/2
1/2 1/2 2 2 K a 2 T
J := 1/2 T Pi exp(a K) erf(------ + -----------)
1/2 2
2 T

1/2 1/2 1/2
1/2 1/2 2 K a 2 T
+ 1/2 Pi T erf(------ - -----------)
1/2 2
2 T

1/2 1/2
1/2 1/2 2 T Pi
- 1/2 T Pi exp(a K) + ----------
2

> simplify(eval(J,erf=(x -> 2*Phi(x*sqrt(2))-1)));


1/2 1/2 / K + a T K - a T \
Pi T |exp(2 a K) Phi(-------) - exp(2 a K) + Phi(-------)|
| 1/2 1/2 |
\ T T /
--
Robert Israel isr...@math.MyUniversitysInitials.ca
Department of Mathematics http://www.math.ubc.ca/~israel
University of British Columbia Vancouver, BC, Canada

hh

unread,
Jun 12, 2008, 2:38:36 AM6/12/08
to
Wow! That's very smart of you!

Could you please explain the first 3 commands you used. They are so
mysterious to me!

Thanks a lot Robert!

"Robert Israel" <isr...@math.MyUniversitysInitials.ca> wrote in message
news:rbisrael.20080612003642$04...@news.acm.uiuc.edu...

isr...@math.ubc.ca

unread,
Jun 12, 2008, 4:15:47 PM6/12/08
to
On Jun 11, 11:38 pm, "hh" <xd...@stanford.edu> wrote:
> Wow! That's very smart of you!

Please don't top-post.

> Could you please explain the first 3 commands you used. They are so
> mysterious to me!
>
> Thanks a lot Robert!
>
> "Robert Israel" <isr...@math.MyUniversitysInitials.ca> wrote in message
>
> news:rbisrael.20080612003642$04...@news.acm.uiuc.edu...
>
>
>
> >> Hi all,
>
> >> In Maple, I am integrating a function involving the "erfc" function,
>
> >> the final integral result has no explicit form, but should be able to
> >> representted as a "\Phi(.)" function, where the "\Phi(.)" is the Gaussian
> >> distribution function (cumulative).
>
> >> Is there a way to force the following integral to output in the form of
> >> "\Phi(.)" in Maple?
>
> >>int(exp(a*m)*(sqrt(T)*sqrt(Pi)*erf((1/2)*sqrt(2)*(m+a*T)/sqrt(T))*exp(a*m)*a-
> >>sqrt(T)*sqrt(Pi)*exp(a*m)*a+sqrt(2)*exp(-(1/2)*(m^2+a^2*T^2)/T)),
> >> m = 0 .. K)
>
> > Like this:
>
> >> f:= expand(exp(a*m)*(sqrt(T)*sqrt(Pi)*erf((1/2)*sqrt(2)*(m+a*T)/sqrt(T))
> > *exp(a*m)*a-sqrt(T)*sqrt(Pi)*exp(a*m)*a
> > +sqrt(2)*exp(-(1/2)*(m^2+a^2*T^2)/T)));

f is the integrand. I'm just expanding it to make it a sum of three
terms.

> > 1/2 1/2 1/2
> > 1/2 1/2 2 m a 2 T 2
> > f := T Pi erf(------ + -----------) exp(a m) a
> > 1/2 2
> > 2 T
>
> > 1/2 1/2 2
> > - T Pi exp(a m) a
>
> > 2 2
> > 1/2 m T a
> > + exp(a m) 2 exp(- ---) exp(- ----)
> > 2 T 2
>
> >> F:= map(int,f,m);

Integrating each term with respect to m.

> > / 1/2 1/2 1/2
> > | 1/2 1/2 2 m a 2 T 2
> > F := | T Pi erf(------ + -----------) exp(a m) a dm
> > | 1/2 2
> > / 2 T
>
> > 1/2 1/2 2
> > - 1/2 T Pi exp(a m)
>
> > 1/2 1/2 1/2
> > 1/2 1/2 2 m a 2 T
> > - Pi T erf(- ------ + -----------)
> > 1/2 2
> > 2 T
>
> >> F := IntegrationTools[Parts](F,
> > erf(1/2*2^(1/2)/T^(1/2)*m+1/2*a*2^(1/2)*T^(1/2)));

Integrate by parts the term that hasn't been integrated.

0 new messages