# 2.9 Some special functions

```#
#                                           WORKSHEET#20
#
#
#                                         Some special functions
#
#
--------------------------------------------------------------------------------
> ?GAMMA
#
#
--------------------------------------------------------------------------------
> GAMMA(s):=int(exp(-t)*t^(s-1),t=0..infinity);

infinity
/
|                (s - 1)
GAMMA(s) :=    |      exp(- t) t        dt
|
/
0
> GAMMA(0);
Error, (in GAMMA) singularity encountered

--------------------------------------------------------------------------------
> for n from 1 to 10 do GAMMA(n) od;

1

1

2

6

24

120

720

5040

40320

362880
--------------------------------------------------------------------------------
> n:='n':
--------------------------------------------------------------------------------
> for n from 1 to 10 do A[n]:=GAMMA(n+1)/GAMMA(n) od;

A[1] := 1

A[2] := 2

A[3] := 3

A[4] := 4

A[5] := 5

A[6] := 6

A[7] := 7

A[8] := 8

A[9] := 9

A[10] := 10
--------------------------------------------------------------------------------
> GAMMA(1/2);

1/2
Pi
--------------------------------------------------------------------------------
> n:='n': A[n]:='A[n]': for n from 1 to 10 do \
A[n]:=GAMMA(n+(1/2))/GAMMA(n-(1/2)) od;

A[1] := 1/2

A[2] := 3/2

A[3] := 5/2

A[4] := 7/2

A[5] := 9/2

A[6] := 11/2

A[7] := 13/2

A[8] := 15/2

A[9] := 17/2

A[10] := 19/2
--------------------------------------------------------------------------------
> simplify(GAMMA(s+1)/GAMMA(s)-s);\

0
> n:='n': A[n]:='A[n]':
> ?Si;
--------------------------------------------------------------------------------
> Si(x):=Int((sin(t))/t,t=0..x);

x
/
|  sin(t)
Si(x) :=  |  ------ dt
|     t
/
0
--------------------------------------------------------------------------------
> Si(0);

0
--------------------------------------------------------------------------------
> Si(infinity);

1/2 Pi
--------------------------------------------------------------------------------
> plot(sin(t)/t,t=0..100);
--------------------------------------------------------------------------------
#

** Maple V Graphics **

--------------------------------------------------------------------------------
>  for k from 1 to 10 do X[k]:= evalf(Int(sin(t)/t,t=(k-1)*Pi..k*Pi)) od;\

X[1] := 1.851937052

X[2] := -.4337854758

X[3] := .2566102228

X[4] := -.1826005734

X[5] := .1418036205

X[6] := -.1159308846

X[7] := .09805155598

X[8] := -.08495423246

X[9] := .07494560683

X[10] := -.06704781224
--------------------------------------------------------------------------------
> sum('X[k]','k=1..10');

1.539029081
--------------------------------------------------------------------------------
> evalf(Pi/2);

1.570796327
--------------------------------------------------------------------------------

```