内容 2.3 Symbolic Data · 139
练习 自检推理
Exercise 2.56: Show how to extend the basic
differentiator to handle more kinds of expressions. For instance, implement
the differentiation rule
d
(
u
n
)
d
x
=
n
u
n
−
1
d
u
d
x
by adding a new clause to the deriv program and defining appropriate
procedures exponentiation?, base, exponent, and
make-exponentiation. (You may use the symbol ** to denote
exponentiation.) Build in the rules that anything raised to the power 0 is 1
and anything raised to the power 1 is the thing itself.
练习 2.56:说明如何扩展基本微分器以处理更多种类的表达式。例如,通过向 deriv 程序添加新的子句并定义适当的过程 exponentiation?、base、exponent 和 make-exponentiation,实现微分规则
d(u^n)/dx = n·u^(n-1)·(du/dx)。(可以用符号 ** 表示乘幂。)内置如下规则:任何数的 0 次幂为 1,任何数的 1 次幂为其本身。
我的笔记 自动保存