3.61 Exercise 3.61
To find the inverse X of the unit power series S, we can simply translate the equality X = S0 - SR*X (where S0 is the constant term of S and SR is the coefficients of S after the constant) into a procedure:
(define (invert-unit-series s) (cons-stream (stream-car s) (scale-stream (mul-series (stream-cdr s) (invert-unit-series s)) -1)))
If we take the inverse of a power series (say, the series representing ex) and multiply it by the original series, we should get a constant result of 1. We can verify that this is the case:
> (define exp-series (cons-stream 1 (integrate-series exp-series))) > (display-stream (take-stream (mul-series exp-series (invert-unit-series exp-series)) 5))
1
0
0
0
0
'done