kill(all)$

fluid : diff construction ,'cylindrical coordinates',radial,version 1.0
peter.vlasschaert@gmail.com,12/06/2019

load packages:

load(lrats);

depends([ur],r);

question : depends

dependencies;

typical : cylindrical coordinates 'p1'

p1:1/r*'diff(r*'diff(ur,r),r);

evaluation

p1a:expand(ev(p1,nouns));

p1b:p1=p1a;

p1c:rhs(p1b) = lhs(p1b);

  =>  ? 

p1d:2/r*'diff(ur,r) + 2*'diff(ur,r,2) =  rhs(p1c) + rhs(p1b);

  => ?

typical :cylindrical coordinates to independent term without diff

p2:'diff(1/r*'diff(r*ur,r),r);

evaluation

p2a:p2=expand(ev(p2,nouns));

p2b:lratsubst([p1c],p2a);

p2c:expand(p2b);

p2d:expand(p2c);

part from rhs 'p2d'
==============

p2c1:part(p2d,2,1);

p2c2:part(p2d,2,2);

p2c3:part(p2d,2,2,1);

p2c4:part(p2d,2,2,0);

p3a:p2d+p2c3;

p3b:rhs(p3a) = lhs(p3a);

combine :' p1d ' and 'p3b'
===================

p4:subst(p3b,p1d);

combine :' p4 ' and 'p1c'
===================

p5:lhs(p4) = lratsubst(p1c,rhs(p4));

p5a:expand(p5);

index notation :

p6:[ur=u[r]];

p6a:subst(p6,p5a);

what about mixed derivative : ?
========================

example : derivative of function with respect to var1 and var2
                   var1 : x
                   var2 : y

p7:diff(f(x,y),x,1,y,1);

dependencies;

remove(ur,dependency);

dependencies;

depends([ur,uθ],[r,θ]);

p7:'diff(1/r*'diff(uθ,θ),r);

p7a:p7=ev(p7,nouns);

p8::1/r*'diff('diff(uθ,θ),r);

p8a:p8=ev(p8,nouns);

inside differentation
===============

rem :  r      :typical cylindrical coordinates.
           r^2 : typical spherical  coordinates.