kill(all)$

maxima : example load(vect),combination (triple product),∇ operation;
peter.vlasschaert@gmail.com,02/09/2021

ref: (1) schaum's outline seies : vector analysis
see : website : "chemical engineering reaction"

load packages , option
==================

load(lrats)$ ratprint:false$

load application :vector analysis (1)
==========================

load(vect)$

we will use cartesian coordinates:(set  scalefactors)

1e) step : declare
==============

declare(a,nonscalar);
declare(f,scalar);
depends(f,[x,y,z]);

scalefactors([[x,y,z],x,y,z]);

rem :other coordinate systems: see website 

2e) step :problem 
==============

→ vector:a  ":∇.(∇xa) and ∇x(∇xA)"

a)  ∇.(∇xA) =div(curl(A))

q1:"∇.(∇xa) "=express(div(curl(a)));

b) ∇x(∇xA)=curl(curl(A))

→  1e) step

q2:"∇x(∇xa) "=vectorsimp(curl(curl(a)));

→ 2e) step :simplification

q2a:"∇x(∇xa) "=ev(vectorsimp(rhs(q2)),expandall);

:→ scalar function :∇.(∇f) & ∇x(∇f) 

a)  ∇.(∇f) :laplacian

method 1:

q3:"∇.(∇f) "=express(div(grad(f)));

method 2:

q3a:"∇.(∇f) "=express(laplacian(f));

b) ∇x(∇f) 

q4:"∇x(∇f) "=express(curl(grad(f)));

rem:

→ ∇.(f*a)=div(f*a)

q5:"∇.(f*a)"=express(div(f*a));

q5a:lhs(q5)=ev(rhs(q5),diff);

→ ∇x(f*a)=curl(f*a)

q6:"∇x(f*a)"=express(curl(f*a));

method 1;

q6a:lhs(q6)=ev(rhs(q6),diff);

method 2:

q6b:lhs(q6)=ev(rhs(q6),nouns);

rem :dependencies must be changed for f: 'below'

laplacian :cylindrical:(r,θ,z)=∇^2(f)

assume(r>0)$

s1:[r,θ,z];

forget(f);
depends(f,s1);

s2:[r*cos(θ),r*sin(θ),z];

scalefactors([s2,s1[1],s1[2],s1[3]])$

s3:"∇.(∇f) "=express(laplacian(f));

s4:lhs(s3)=ev(rhs(s3),expand);

s5:lhs(s3)=expand(ev(rhs(s4),nouns));