maxima : real (line,circle) to complex(line,circle),version 1.0
peter.vlasschaert@gmail.com, 22/11/2021

ref: web
======
https://maxima.sourceforge.io/docs
/manual/maxima_49.html#Item_003a-MathFunctions_002fdeffn_002fcarg
ref : book
=======
→ Complex Variables Theory and Applications,Second Edition
→ H.S.Kansa
→ PHI (Eastern Economy Edition)

load packages,option
__________________

load(lrats)$ ratprint:false$

1e) step : complex value  & complex conjugate value.
___________________________________________

ordergreat(a,b,c,d)$

a)complex value ( = complex number)
--------------------------------------------------

p1:za = a+%i*b;

→ polar form : complex number.

p2:lhs(p1)=polarform(a+%i*b);

atan2 : take sign in account of tan for the values a,b

b)complex conjugate value ( = conjugate complex number)
------------------------------------------------------------------------------

p1a:zb=a-%i*b;

p1b: lhs(p1a)=conjugate(rhs(p1));

rem : complex abs value. (cabs)
__________________________

→ zc=cabs(za)

p1c:zc=cabs(rhs(p1));

p1ca:reverse(p1c);

rem: {a,b} are real numbers

see above: p2 & cabs

→ analysis of the polar form

first : step "radius"  → cabs

p3:subst([p1ca],p2);

second: step  "angle" → carg

p3a:carg(rhs(p3));

p3a1:part(p3a,1);

p3a2:args(p3a1);/*list structure */

def : angle in the complex plane (see above:p2)
==================================

p3a3:atan2(p3a2[1]*rhs(p1c),p3a2[2]*rhs(p1c));

rem : remove cabs from : p3a1
rem : sign atan2 from values {a,b}

====================================

rem : we don`t use declare : {a,b,c,d},see : ref above.

third: step  "rectform",see above.

p3b:lhs(p1)=rectform(rhs(p2));

?   real part(za),imaginaire part(za)
==========================

→ real part(za)

p4a:realpart(rhs(p3b));

→imaginaire part(za)

p4b:imagpart(rhs(p3b));

general rem: Menu→Simplify → Complex Simplification

General Equation Real Plane for Circle  ( cartesian coordinates)
============================

elements of the circle.
-----------------------------

R  : radius of the circle
cx : center of circle (x : coordinate)
cy : center of circle (y : coordinate)

declare(cx,real,cy,real);

definition : circle " xy plane "
=====================

declare(R,real);

p5:(x-xc)^2+(y-yc)^2 = R^2;

p51:sqrt(p5);

p5a:expand(p5);

p5a1:lhs(p5a)-rhs(p5a)=0;

p5b:A*x^2+B*y^2+C*x*y+D*x+E*y+F=0;

p5c1:A=ratcoeff(lhs(p5a1),x^2)$
p5c2:B=ratcoeff(lhs(p5a1),y^2)$
p5c3:C=ratcoeff(lhs(p5a1),x*y)$
p5c4:D=ratcoeff(lhs(p5a1),x)$
p5c5:E=ratcoeff(lhs(p5a1),y)$
p5c6:F=subst([x=0,y=0],lhs(p5a1))$

other element of circle: General equation of circle in the plane
---------------------------------------------------------------------------------

p6:[p5c1,p5c2,p5c3,p5c4,p5c5,p5c6];

rem:

→ string representation: first element of "p6"

concat(lhs(p5c1),"=",rhs(p5c1));

→ equation representation: first element of "p6"

p6a:p6[1];

General Equation Complex Plane for Circle  (complex coordinates)
================================

first step : define two points in the Complex Plane (= Gauss Plane)
--------------------------------------------------------------------------------------

declare();

→ both numbers or complex numbers {z,z0}

z=x+i*y, z0=cx+i*cy (see: circle "Real Plane")

z:x+%i*y;/*general point in the complex plane */
z0:cx+%i*cy;/* fixed point in the complex plane*/

second step :distance between two points (cabs)
_______________________________________

pc1:cabs(z-z0)=rhs(p51);

see above elements : Real Plane

pc1a:lhs(pc1)=abs(R);

difference between use : cabs & abs
==========================

→ How to remove absolute values  sign ||

assume(R>=0);

pc1b:ev(pc1a,nouns);

rem : R=0, reduce to point in the Complex plane

pc1c:subst([R=0],pc1b);

pc1ca:(pc1c)^2;

pc1caa:expand((pc1c)^2);

pc1cb:subst([x=cx,y=cy],pc1ca);

result : center of the circle ( x=cx,y=cy)

Equation Line General
___________________

first step: general equation from circle "p5b"

pc2a:p5b;

second step : A=B=C=0 → Line of the equation

pc2b:subst([A=0,B=0,C=0],pc2a);

pc2b:solve(pc2b,y)[1];

pc2bb:expand(%);

from elementary calculus : equation of line "y=m*x+n"

pc2c:y=m*x+n;

pc2cc:rhs(pc2bb)=rhs(pc2c);

find : m,n
========

pc2d1:reverse(ratcoeff(pc2cc,x));/*rico*/

pc2d2:reverse(subst([x=0],pc2cc));

otherway to show circle in complex plane: polarform
=======================================

z =z0+R*%e^(%i*θ)
==============
θ:    0≤θ≤2*π

pc3a1:z=z0+R*%e^(%i*θ);

pc3a2a:z-z0=R*%e^(%i*θ);

→  cabs

pc3a2b:cabs(pc3a2a);/*use :cabs*/

→  trignometric simplification

pc3a2c:trigsimp(pc3a2b);

→   rearange the above equations

pc3a2d:lhs(pc3a2b)=rhs(pc3a2c);

same equation : pc1b, " see above "

first step : complex conjugate of z

cz:conjugate(z);

second step : multiplication (z,cz) → real number and positive

cc: z*cz;

cc1:expand(cc);

third step : representation

→ (cabs(z))^2=z*cz

simp : false;

dd: (cabs(z))^2=z*cz;

→  evaluation is blocked

simp:true;

dd1:expand(dd);

→  evaluation is unblocked

simple circle : x^2+y^2 = R^2; CIRCLE with center in the origin.
===============================================

dd2:z*cz=R^2;

dd3:expand(dd2);

dd4:reverse(dd3);

general equation: circle 
--------------------------------

==============================================
z: z         → cz , complex conjugate of  z   = cz
z0: z0      → cz0 , complex conjugate of z0 = cz0
===============================================
a1*z*cz +b1*z0*cz+c1*cz0*z+d1=0, a1 ≥ 0 ,c1,b1 ∈ real number (1)
===============================================


equation of a line → a1 =0, "see above : why", put a1=0 into (1)
===============================================
b1*z0*cz+c1*cz0*z+d1=0                                                         (2)
===============================================