[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: In search of cool Scheme

From: Hans O. Lowe
Subject: Re: In search of cool Scheme
Date: Wed, 23 May 2001 22:06:46 -0500

Sometime on Wednesday, Harvey J. Stein wrote:

> Don't forget to add in a macro to do:
>    (let ((x 3) (u 4)) (eval (differentiate '(* x (sin u)))))

I didn't mean for it to be evaluation. The intent was to demonstrate
simple symbolic manipulation--returning symbols as results, much like
what Alejo shared. It would be nice, however, to collect terms:

(differentiate '(+ 4 x (sin u)))
 ---> (+ 0 1 (* (cos u) (differentiate u)))

(collect-terms (differentiate '(+ 4 x (sin u))))
 --> (+ 1 (* (cos u) (differentiate u)))

Note that 'u' is, in general, a function of 'x'.

  d/dx[ sin (u) ] = cos (u) * d/dx [u]


reply via email to

[Prev in Thread] Current Thread [Next in Thread]