Given polynomial , we wish to evaluate integral

When ,

.

Since

and

It follows that

.

That is

By the fact (see “Every dog has its day“) that

,

we have

or,

Hence,

i.e.,

Let us now consider the case when :

where

, a polynomial of order .

What emerges from the two cases of is a recursive algorithm for evaluating (1):

Given polynomial ,

*Exercise-1* Optimize the above recursive algorithm (*hint*: examine how it handles the case when )