kill(all)$

maxima :how construct pde(p,q) :eliminating arbitrary (a,b),version1,part 2.
peter.vlasschaert@gmail.com,26/04/2021

load package , option
=================

load(lrats)$ ratprint:false$

ref :
maxima :intro how construct pde from geometrical shape (p,q),version1,part 1.

only p,q
-----------
number of arbitrary constants ≤ number of independent variable .

find :pde → 1e)
============

declare(a,constant)$
declare(b,constant)$

example 1:two arbitrary constants. {a,b}

p1:z=a*(x+y)+b;

p1a:expand(p1);

rem : a,b are arbitrary constants

depends(z,[x,y]);

→construct : p & q

p2:p = diff(z,x);
p2a:q = diff(z,y);

p3:subst([p1a],p2);
p3a:subst([p1a],p2a);

p4:ev(p3,diff);
p4a:ev(p3a,diff);
p4b:rhs(p4a)=lhs(p4a);

result :example 

p5:p=q;

p5a:lratsubst([p2,p2a],p5);

check : p5a
-----------------

p6:subst(p1,p5a);

p6a:ev(p6,diff);

p6b:is(p6a);

example 2:two arbitrary constants. {a,b}

declare(n,integer)$

p1b: z=a*x^n+b*y^n;

use :{p2,p2a}

p2b1:subst([p1b],p2);
p2b2:subst([p1b],p2a);

p3b1:ev(p2b1,diff);
p3b2:ev(p2b2,diff);

solve :{a,b}

p4b1:solve(p3b1,a);
p4b2:solve(p3b2,b);

p4b3:flatten([p4b1,p4b2]);

use :p1b

p5b1:(lratsubst(p4b3,p1b))*n;

example 3:two arbitrary constants. {a,b}

p1c: z=(x+a)^3+(y-b)^3;

p2c1:subst([p1c],p2);
p2c2:subst([p1c],p2a);

p3c1:ev(p2c1,diff);
p3c2:ev(p2c2,diff);

solve :{a,b}

p4d1:x+a = v;
p4d1a:rhs(p4d1)=lhs(p4d1);
p4d2:y-b = w;
p4d2a:rhs(p4d2)=lhs(p4d2);

p4d3:[p4d1,p4d2];

p4c1:lratsubst(p4d3,p3c1);
p4c2:lratsubst(p4d3,p3c2);

p5c1:solve(p4c1,rhs(p4d1))[2];
p5c2:solve(p4c2,rhs(p4d2))[2];

p6c1:lhs(p1c)=(rhs(p5c1))^3+(rhs(p5c2))^3;

example 4 : center(0,0,c),radius = r, sphere lies z-axis

declare(c,constant)$
declare(r,constant)$

p1e1:x^2+y^2+(z-c)^2 = r^2;

→ f(x,y,z) =0

p1e1a:lhs(p1e1)-rhs(p1e1)=0;

→ {df/dx,df/dy}

p2e1:diff(p1e1,x);
p2e2:diff(p1e1,y);

→ {p,q}

p2f1:rhs(p2)=lhs(p2);
p2f2:rhs(p2a)=lhs(p2a);

p2g1:[p2f1,p2f2];

→ p2g1 into {p2e1,p2e2}

p2g1a:subst(p2g1,p2e1);
p2g1b:subst(p2g1,p2e2);

p2g1aa:solve(p2g1a,p);
p2g1bb:solve(p2g1b,q);

p2g2:p2g1aa/p2g1bb;

p2g3:(p2g2[1])*y*q;

example 5:plane =intercept  a along x-axis,b and y-axis,c and z-axis.
                 when  a=b

p6:x/a+y/b+z/c = 1;
p6a:lhs(p6)-rhs(p6)=0;

→ b=a

→ f(x,y,z) =0

p6b:subst([b=a],p6a);

→ {df/dx,df/dy}

p6b1:diff(p6b,x);
p6b2:diff(p6b,y);

→ use p2g1

p6c1:subst([p2g1],p6b1);
p6c2:subst([p2g1],p6b2);

p6c1a:solve(p6c1,p);
p6c2b:solve(p6c2,q);

p6c3c:p6c1a/p6c2b;
p6da:p6c3c*q;
p6db:p6da[1];