LawSymbol:D

From DocR21

Jump to: navigation, search


Contents

Action

Makes a law that takes one or more derivatives of a given law with respect to a given variable.

Derivation

derivative_law

Syntax

D (my_law, my_variable, n)

Description

my_law specifies which law to take the derivative of. my_variable specifies what to take the derivative with respect to. n specifies how many derivatives to take. Only use this law symbol for derivatives that do not have exact derivatives. This returns the numerical derivative of the my_law.

When D is followed by a parenthesis, it means the derivative. When it is followed by an integer n, it implies an input argument and not the derivative. D() <> Dn !!!

T=U=X=A1=B1=...=D1=...=T1=U1=V1=W1=X1=Y1=Z1

V=Y=A2=B2=...=D2=...=T2=U2=V2=W2=X2=Y2=Z2

Z=A3=B3=...=D3=...=T3=U3=V3=W3=X3=Y3=Z3

An=Bn=...=Dn=...=Zn

Example

; law "D( law1), x, 1)"
; Create a simple law.
(define my_law (law "d(cos(x), x, 1)"))
;; my_law
; => #[law "D(COS(X),X,1)"]
(law:eval my_law 2)
;; -0.909297426824329
(law:eval my_law 3)
;; -0.141120008059955
Personal tools
Live