3.62 Exercise 3.62
Dividing a series S1 by series S
2 is equivalent to multiplying
S1 by the inverse of S2.
This can be expressed succinctly with the definitions
mul-series and invert-unit-series:
(define (div-series s1 s2) | (if (= (stream-car s2) 0) | (error "Cannot divide by 0") | (mul-series s1 (invert-unit-series s2)))) |
|
We can use div-series to define the series for
tan, which is equivalent to the series for cosine
divided by the series for sine:
(define tangent-series (div-series sine-series cosine-series)) |