FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups 
 ProfileProfile   PreferencesPreferences   Log in to check your private messagesLog in to check your private messages   Log inLog in 
Forum index » Science and Technology » Math » num-analysis
Integrate erf type expression
Post new topic   Reply to topic Page 1 of 1 [5 Posts] View previous topic :: View next topic
Author Message
Badger
science forum beginner


Joined: 07 May 2006
Posts: 38

PostPosted: Tue Jul 18, 2006 1:49 pm    Post subject: Re: Integrate erf type expression Reply with quote

On Mon, 17 Jul 2006 18:20:54 EDT, Pratim Vakish
<pratim_usc@hotmail.com> wrote:

Quote:
Thank you very much for your answer Badger.

Just an additional question to be sure I have fully understood.

Let me consider this expression:

I = Int[-oo...z] e^-1/2*((x-y)/0.1)^2 dx

= sqrt(pi)/2 *
Erf(x/(sqrt(2)*0.1) - y/((sqrt(2)*0.1))) | [-oo...z]


Not correct. Because of the constants you introduced into the
problem, there will be a new constant factor in the antiderivative.

To see this, let's say you want to evaluate

Int e^-( a (x-y) )^2 dx

where a is a real constant > 0 (this form is sufficient to do your new
integral).

Make the substitution

t = a (x-y)

Then dt = a dx, or dx = dt / a

The integral becomes

Int (1/a) e^-t^2 dt = sqrt(pi)/2 (1/a) Erf(t)

Notice the constant factor 1/a, and remember that the sqrt(pi)/2 is
present because of the way Mathematica defines the Erf function.

Now, substitute for t, and we have the antiderivative

sqrt(pi)/2 (1/a) Erf( a (x-y) )


For your new problem, you want to evaluate

I = Int[-oo...z] e^-1/2*((x-y)/0.1)^2 dx

which, if I'm reading it correctly, can be written

I = Int[-oo...z] e^-( (x-y) / (0.1 sqrt(2)) )^2 dx

= Int[-oo...z] e^-( 5 sqrt(2) (x-y) )^2 dx


So, using our result above, with a = 5 sqrt(2), we have

I = sqrt(pi)/2 1/(5 sqrt(2)) Erf( 5 sqrt(2) (x-y) ) | [-oo...z]

= sqrt(pi)/2 1/(5 sqrt(2)) [ Erf( 5 sqrt(2) (z-y) ) - Erf(-oo) ]

= sqrt(pi)/2 1/(5 sqrt(2)) [ -Erf( 5 sqrt(2) (y-z) ) + 1 ]

= sqrt(pi)/2 1/(5 sqrt(2)) [ 1 - Erf( 5 sqrt(2) (y-z) ) ]

I = sqrt(pi)/2 1/(5 sqrt(2)) Erfc( 5 sqrt(2) (y-z) )

Quote:

= sqrt(pi)/2 [Erf(z/(sqrt(2)*0.1) - y/(sqrt(2)*0.1))
- Erf(-oo-y/(sqrt(2)*0.1)) ]

Now, Erf is an odd function and Erf(oo) = 1, so

I = sqrt(pi)/2 [ -Erf(y / (sqrt(2)*0.1) - z (sqrt(2)*0.1)) + Erf(oo) ]

= sqrt(pi)/2 [ 1 - Erf(y/(sqrt(2)*0.1)-z/(sqrt(2)*0.1))]

Now if I take the derivative of the expression above with respect to y, is it correct to say that it is equal to:

= - sqrt(pi)/2*2/sqrt(pi) * 1/(sqrt(2)*0.1) *
e^[(y/(sqrt(2)*0.1)-z/(sqrt(2)*0.1))]

= -1/(sqrt(2)*0.1) *
e^[(y/(sqrt(2)*0.1)-z/(sqrt(2)*0.1))]

Is it correct?
Is ther simplication I can do beforehand?

Not correct. You say that you want the derivative with respect to y?
Why not with respect to z? I'll do it with respect to z.


I' = d/dz sqrt(pi)/2 1/(5 sqrt(2)) Erfc( 5 sqrt(2) (y-z) )

First, I have it that

d/dz Erfc( 5 sqrt(2) (y-z) )

= 2/sqrt(pi) [ e^-( 5 sqrt(2) (y-z) )^2 ] (5 sqrt(2))

and so

I' = e^-( 5 sqrt(2) (y-z) )^2

which is equivalent to the original integrand.


Now, you should do all the work yourself and see if you agree with
these results.
Back to top
Pratim Vakish
science forum beginner


Joined: 17 Jul 2006
Posts: 2

PostPosted: Mon Jul 17, 2006 10:20 pm    Post subject: Re: Integrate erf type expression Reply with quote

Thank you very much for your answer Badger.

Just an additional question to be sure I have fully understood.

Let me consider this expression:

I = Int[-oo...z] e^-1/2*((x-y)/0.1)^2 dx

= sqrt(pi)/2 *
Erf(x/(sqrt(2)*0.1) - y/((sqrt(2)*0.1))) | [-oo...z]

= sqrt(pi)/2 [Erf(z/(sqrt(2)*0.1) - y/(sqrt(2)*0.1))
- Erf(-oo-y/(sqrt(2)*0.1)) ]

Now, Erf is an odd function and Erf(oo) = 1, so

I = sqrt(pi)/2 [ -Erf(y / (sqrt(2)*0.1) - z (sqrt(2)*0.1)) + Erf(oo) ]

= sqrt(pi)/2 [ 1 - Erf(y/(sqrt(2)*0.1)-z/(sqrt(2)*0.1))]

Now if I take the derivative of the expression above with respect to y, is it correct to say that it is equal to:

= - sqrt(pi)/2*2/sqrt(pi) * 1/(sqrt(2)*0.1) *
e^[(y/(sqrt(2)*0.1)-z/(sqrt(2)*0.1))]

= -1/(sqrt(2)*0.1) *
e^[(y/(sqrt(2)*0.1)-z/(sqrt(2)*0.1))]

Is it correct?
Is ther simplication I can do beforehand?
Back to top
Badger
science forum beginner


Joined: 07 May 2006
Posts: 38

PostPosted: Mon Jul 17, 2006 4:16 pm    Post subject: Re: Integrate erf type expression Reply with quote

On Mon, 17 Jul 2006 10:27:35 EDT, Pratim Vakish
<pratim_usc@hotmail.com> wrote:

Quote:
My question is probably very basic. I am a novice in the field.

I would like to compute/simplify the following expression:

Integrale [from -infinity to z] of [e^-(x-y)^2]dx

Could you please help?

Best

In what follows, I have used Mathematica's definitions of Erf and Erfc
as given here:
<http://mathworld.wolfram.com/Erf.html>
<http://mathworld.wolfram.com/Erfc.html>

Some authors define these functions without the factor 2/sqrt(pi).

Given
I = Int[-oo...z] e^-(x-y)^2 dx

= sqrt(pi)/2 Erf(x-y) | [-oo...z]

= sqrt(pi)/2 [ Erf(z-y) - Erf(-oo-y) ]

Now, Erf is an odd function and Erf(oo) = 1, so

I = sqrt(pi)/2 [ -Erf(y-z) + Erf(oo) ]

= sqrt(pi)/2 [ 1 - Erf(y-z) ]

I = sqrt(pi)/2 Erfc(y-z)


The 'erf' functions can be evaluated numerically using Mathematica
here:
<http://functions.wolfram.com/GammaBetaErf/>

Click on Erfc, then 'Evaluation'.

HTH
Back to top
Peter Spellucci
science forum Guru


Joined: 29 Apr 2005
Posts: 702

PostPosted: Mon Jul 17, 2006 3:37 pm    Post subject: Re: Integrate erf type expression Reply with quote

In article <13642928.1153146486183.JavaMail.jakarta@nitrogen.mathforum.org>,
Pratim Vakish <pratim_usc@hotmail.com> writes:
Quote:
My question is probably very basic. I am a novice in the field.

I would like to compute/simplify the following expression:

Integrale [from -infinity to z] of [e^-(x-y)^2]dx

Could you please help?

Best

what about a little substitution to get it into
const* integral_{-infinity to somewhere} exp(-t^2/2) dt
then using the normal distribution function?
hth
peter
Back to top
Pratim Vakish
science forum beginner


Joined: 17 Jul 2006
Posts: 2

PostPosted: Mon Jul 17, 2006 2:27 pm    Post subject: Integrate erf type expression Reply with quote

My question is probably very basic. I am a novice in the field.

I would like to compute/simplify the following expression:

Integrale [from -infinity to z] of [e^-(x-y)^2]dx

Could you please help?

Best
Back to top
Google

Back to top
Display posts from previous:   
Post new topic   Reply to topic Page 1 of 1 [5 Posts] View previous topic :: View next topic
The time now is Wed Jun 28, 2017 7:07 pm | All times are GMT
Forum index » Science and Technology » Math » num-analysis
Jump to:  

Similar Topics
Topic Author Forum Replies Last Post
No new posts randomized Donsker-type results gasparuk Math 1 Tue Jul 18, 2006 1:46 pm
No new posts How to get the analytical PDF of this expression? glare22@gmail.com num-analysis 3 Thu Jul 13, 2006 9:08 am
No new posts Simplifying Algebraic expression Jeffrey Spoon Math 4 Wed Jul 12, 2006 3:04 pm
No new posts ? LS expression for A*x = b Cheng Cosine num-analysis 4 Tue Jul 11, 2006 11:27 pm
No new posts Large deviations principles of Non-Freidlin-Wentzell type. jaykov1 Research 0 Sat Jul 08, 2006 11:31 pm

Copyright © 2004-2005 DeniX Solutions SRL
Other DeniX Solutions sites: Electronics forum |  Medicine forum |  Unix/Linux blog |  Unix/Linux documentation |  Unix/Linux forums  |  send newsletters
 


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.0207s ][ Queries: 20 (0.0036s) ][ GZIP on - Debug on ]