kill(all)$

maima:appendix:fvm:lineintegral (2D)conversion surface integral (2D)  ,version 1.0
peter.vlasschaert@gmail.com,26/11/2022

load(lrats)$

rem : Green's theorem in the plane

line integral (2D) = suface integral(2D)
---------------------------------------------------

p11:diff(Q(x,y),x)-diff(P(x,y),y);

stop :evaluation

simp:false;

p1:'integrate(P(x,y),x)+'integrate(Q(x,y),y)=integrate(integrate(p11,x),y);

lhs(p1) : line integral representation
rhs(p1) : 2D surface integral

p1a:[Q(x,y) =x,P(x,y)=-y];
p1b:args(args(rhs(p1))[1])[1];

p1c1:subst(p1a,p1b);

→ evaluation : differential (inside "double  integral :rhs(p1)")

p1c2:ev(p1c1,nouns);

p1d:[p1b=p1c2];

p1e:flatten([p1a,p1d]);

p2:subst(p1a,p1);

p2a:lhs(p2) = ev(rhs(p2),diff);

p2a1:args(rhs(p2a))[1];

p2a11:args(p2a1)[1];

p2a12:ev(p2a11,nouns,simp:true);

p2a13:[p2a11=p2a12];

p3:lratsubst(p2a13,p2a);

line integral (computation:2D suface) = 2 *(2D surface)

simp;

start : evaluation. (surface :ellipse)
----------------------

simp:true;

vb: surface ellipse,circle

1e) step : parametric equation. (evaluation:lhs)
-------------------------------------------------------------
→   ellipse : x=a*cos(t), y=b*sin(t)

assume(a>0,b>0);

p4:[x=a*cos(t), y=b*sin(t)];

rem : path of line integral parametric representation

2e) step : find integrand
--------------------------------

p4a:p1a;

p4b:rhs(p4a[1])*diff(y)+rhs(p4a[2])*diff(x);

3e) step : input path of line integral
----------------------------------------------

declare([a,b],constant)$

p4c:subst(p4,p4b);

4e) step : evaluation differential
------------------------------------------

p4d:ev(p4c,nouns);

5e) step  : set → del(t) =1
----------------------------------

p4e:subst([del(t)=1],p4d);

ellipse : t : 0 → 2*pi

p4e1:listofvars(p4e);

6e) step : integration interval parametric path
------------------------------------------------------------

p4f:2*surface = integrate(p4e,p4e1[1],0,2*%pi);

→ surface :ellipse
-----------------------------------
semi-axes. a≠ b,then a > b
-----------------------------------
a = major-axes
b = minor-axes
----------------------------------

p4f1:solve(p4f,listofvars(lhs(p4f)))[1];

rem :

simp:false;

p5:integrate(Q(x(t),y(t))*del(x,t)+P(x(t),y(t))*del(y,t),t);

p5a:args(p5);

simp:true;

p5b:p5;

rem :del(x,t) ='diff(x,t),del(y,t) ='diff(y,t)

p5c:[del(x,t) ='diff(x,t),del(y,t) ='diff(y,t)];

parametric representation :  line integral (2D)
-----------------------------------------------------------

p5c1:subst(p5c,p5b);

------------------------------------------------------------------------

vec(N) = P*e1+Q*e2
vec(M) =del(x,t)*e1+del(y,t)*e2
dot(vec(N),vec(M)) = P*del(x,t)+Q*del(y,t)
-----------------------------------------------------------------------
dot(ei,ej) = delta(i,j) , i=j → del(i,i) =1 ,i≠j → del(i,j) =0
-----------------------------------------------------------------------

---------------------------------------------------------------------------------