Application – HP 15c User Manual

Page 51

Advertising
background image

Section 2: Working with

f

51

01

.

0

/

a

c

r

However, this integral is nearly improper because q and r are both so nearly zero. But by
using an integral in closed form that sufficiently resembles the troublesome part of V, the
difficulty can be avoided. Try

.

10

8

4018188070

.

8

))

/(

)

1

1

ln((

)

ln(

/

6

2

1

2

1

2

q

r

r

q

p

q

u

u

p

q

u

du

p

W

r

r

Then

.

)

1

1

(

1

/

)

/

1

)

/(

)

1

(

(

1

2

2

2

1

2

2

2

du

q

u

u

u

r

p

W

p

du

q

u

q

u

u

p

W

V

r

r



The HP-15C readily handles this integral. Don't worry about

2

1 u

as u approaches 1

because the figures lost to roundoff aren't needed.

Application

The following program calculates the values of four special functions for any argument x:

dt

e

x

t

2

/

2

2

1

)

(

P

(normal distribution function)

 

x

t

dt

e

x

P

x

2

/

2

2

1

)

(

1

)

(

Q

(complementary normal distribution function)

x

t

dt

e

x

0

2

2

)

(

erf

(error function)

 

x

t

dt

e

x

x

2

2

)

(

erf

1

)

(

erfc

(complementary error function)

The program calculates these functions using the transformation

2

t

e

u

whenever |x| > 1.6.

The function value is returned in the X-register, and the uncertainty of the integral is returned
in the Y-register. (The uncertainty of the function value is approximately the same order of
magnitude as the number in the Y-register.) The original argument is available in register R

0

.

Advertising