Directional Derivative
05-15-2015, 08:26 PM (This post was last modified: 05-15-2015 08:28 PM by salvomic.)
Post: #1
 salvomic Senior Member Posts: 1,394 Joined: Jan 2015
Directional Derivative
hi all,
my proposal for a function to calculate directional derivative ( $$\bigtriangledown f \cdot \overrightarrow{v}$$ ).
It's a CAS program. Use: derivdir(f,v), where f is a function and v a vector.
I would like to thank Han for his hints in making this program.

Enjoy!
Salvo

Code:
 #cas // Directional derivative: dot(grad(f0), normalize(v)) derivdir(f,v):= BEGIN local g:=grad(f,[x,y,z]); // gradient local w:=normalize(v); // versor m:=dot(g,w); // dot product return m; END; #end

∫aL√0mic (IT9CLU) :: HP Prime 50g 41CX 71b 42s 39s 35s 12C 15C - DM42, DM41X - WP34s Prime Soft. Lib
05-11-2019, 11:21 AM
Post: #2
 Tonig00 Junior Member Posts: 48 Joined: May 2016
RE: Directional Derivative
Nice program.
It works.
Curious that DOT product should be written in lowercase letters. Also "local" seems to be necessary in lowercase.
Thanks
 « Next Oldest | Next Newest »

User(s) browsing this thread: 1 Guest(s)