kill(all)$

maxima :family of lines trough the intersection of two lines,version 1.0
peter.vlasschaert@gmail.com,24/05/2022

load(lrats)$

C:\Users\science\Desktop\studie\acuteanglebetween.png

construct :geogebra classic.

acute angle : α - β = γ
→ γ + δ = π

ordergreat(α,β,x,y,λ);

rem : z = A+%i*B ,complex number, %i =sqrt(-1)

1e step : tan(γ) = tan(α-β).
-----------------------------------
?    tan(α-β) =G(tan(α),tan(β))

a) Euler equation :

→ Menu → Simplify → Trignometric Simplification → Canonical Form

p1:exp(%i*θ) = trigrat(exp(%i*θ));

acute angle : α-β

b) { θ →α,θ → β}

p2a:subst([θ = α],p1);
p2b:subst([θ = - β],p1);

→ θ = α-β

assume(α>β);

p2c:expand(subst([θ=α-β],lhs(p1))) =subst([θ=α-β],rhs(p1));

p2d:factor(lhs(p2a*p2b))=trigexpand(rhs(p2c));

is(lhs(p2c)=lhs(p2d));

→ follows , rhs

p2e:rhs(p2c) = rhs(p2d);

→ {sin(α-β),cos(α-β)}, imagpart,realpart

p2f1: realpart(p2e);
p2f2:imagpart(p2e);

→ tan(θ)  = sin(θ)/cos(θ);

p2fa1: cos(α)*cos(β);
p2fa2a:tan(θ) =trigsimp(tan(θ));
p2fa2b:reverse(tan(θ) =trigsimp(tan(θ)));

p2fa2c:makelist(subst([θ=η],p2fa2b),η,[α,β]);

→ denom ,num

> sin(α-β)

p2f1b:expand(rhs(p2f2)/p2fa1);

p2f1bb:subst(p2fa2c,p2f1b);

> cos(α-β)

p2f1c:expand(rhs(p2f1)/p2fa1);

p2f1cc:lratsubst(p2fa2c,p2f1c);

→ result : tan(α-β)

p2g:tan(α-β) = p2f1bb/p2f1cc;

2e step : slope m of line (or line segment)
-------------------------------

p3a:tan(α) =m[2];
p3b:tan(β) =m[1];

use : p2g & see : fig "above"

p3c1:tan(γ) =lhs(p2g);
p3c2:lhs(p3c1) =subst([p3a,p3b],rhs(p2g));

default :

triginverses;

set :

triginverses:all;

p3c2a:atan((p3c2));

definition : type
---------------------

acute angle :γ

p3c2aa:lhs(p3c2a)=(atan(abs(p3c2)));

obtuse angle :δ, see :fig

p3c2b:δ =π-γ;

p3c2bb:tan(p3c2b);

when angle between(α,β)  = π/2 =γ, perpendicular lines
--------------------------------------------------------------------------

p3c3 :'limit(lhs(p3c2),γ,π/2) =limit(lhs(p3c2),γ,π/2) ;

result : denom(rhs) =0

p3c3a:denom(rhs(p3c2)) =0;

p3c3b:p3c3a-1;

definition : lines  "with slope :m[i]"

→ first line : m[1]

p4a: y=m[1]*x+n[1];

→ second line : m[2]

p4b: y=m[2]*x+n[2];

general representation of line:

→ see : ordergreat "above"

p4c:a*x+b*y+c=0;

p4c1:expand(solve(p4c,y))[1];

→ slope : m

p4c2:m = ratcoeff(rhs(p4c1),x);

p4c2a:reverse(p4c2);

→ n ( = constant)

p4c3: n = subst([x=0],rhs(p4c1));

p4c3a:reverse(p4c3);

what about perpendicular lines: L1 perpendicular L2
---------------------------------------------------------------------

L1→

p4c4a:y=lratsubst([p4c2a,p4c3a],rhs(p4c1));

p4c4a:subst([n=n[1]],p4c4a);

p4c4a1:reverse(p4c4a-y);

L2→ {m→ -1/m},see : p3c3

p4c4b:lhs(p4c4a)=expand(lratsubst([m=-1/m,n[1]=n[2]],rhs(p4c4a)));

p4c4b1:expand(p4c4b*m);

p4c4b2:rhs(p4c4b1)-lhs(p4c4b1) =0;

check =0

ratcoef(lhs(p4c4a1),x)*ratcoef(lhs(p4c4b2),x)+ratcoef(lhs(p4c4a1),y)*ratcoef(lhs(p4c4b2),y);

two lines (are line segment) : parallel
-------------------------------------------------

p5:'limit(lhs(p3c2),γ,0) =limit(lhs(p3c2),γ,0) ;

result : num(rhs) =0

p5a:num(rhs(p3c2)) =0;

p5b:p5a+m[1];

line : trough two points :p1(x[1],y[1]), p2(x[2],y[2])

use : p4c4a

p6a:subst([n[1]=n],p4c4a);

→:p1(x[1],y[1]),

p6a1:subst([x=x[1],y=y[1]],p6a);

→:p2(x[2],y[2]),

p6a2:subst([x=x[2],y=y[2]],p6a);

→ find : m,n

p6b:p6a2-p6a1;

p6b1:solve([p6b],[m])[1];

→ n

p6b2:subst([p6b1],p6a1);

p6b3:solve(p6b2,n)[1];

Family of lines passing trough intersection of two lines
-------------------------------------------------------------------------

step a: given two lines
------------------------------

→ L1 : a[1]*x+b[1]*y+c[1] =0

p7a1:a[1]*x+b[1]*y+c[1] =0;

→ L2 : a[2]*x+b[2]*y+c[2] =0

p7a2:a[2]*x+b[2]*y+c[2] =0;

step b:two lines aren't parallel
----------------------------------------

p7b :lhs(p7a1)+λ*lhs(p7a2) =0;

step c:intersection (L1,L2) → p(h,k)
----------------------------------------------

p7c:subst([x=h,y=k],p7b);

step c: L straight line passing through (h,k)
--------------------------------------------------------

use p4c

p7d:p4c;

m : slope & p (h,k)

p7d1:y-k =m*(x-h);

use : {p7a1,p7a2}

→ L1

p7d1a:subst([x=h,y=k],p7a1);

→ L2

p7d2a:subst([x=h,y=k],p7a2);

p7ds:solve([p7d1a,p7d2a],[h,k])[1];

step d: find λ
------------------

use :p7d1

p8a:subst(p7ds,p7d1);

use:p7b

p8b:p7b;

→ solve :λ

p8a1:(ratsimp(p8a));

p8a2:ratsimp(lhs(p8a1)-rhs(p8a1))=0;

→ num(lhs)

p8a3:num(lhs(p8a2))=0;

p8a4:expand(lhs(p8a3))=0;

p8a5:p8a4*(-1);

p8a6:collectterms(lhs(p8a5),c[1],c[2],x,y)=0;

factor :c[1],c[2]

p8a61:ratcoef(lhs(p8a6),c[1]);
p8a62:factor(ratcoef(lhs(p8a6),c[2]));

c[1] comes from L1
c[2] comes from L2

p8a63:expand((a[1]*x+b[1]*y)*p8a61);
p8a64:expand((a[2]*x+b[2]*y)*p8a62);

p8a65:collectterms(p8a63+p8a64,x,y);

check : p8a6 with c[i]=0, i=1,2  & p8a65
----------------------------------------------------

is(subst([c[1]=0,c[2]=0],lhs(p8a6))=p8a65);

final result :λ
----------------

p9a:p8b;

use :{p7a1,p7a2}

p9b:p7a1*p8a61+p7a2*p8a62;

p9b1:multthru(lhs(p9b)/p8a61)=0;

use:p9a , p9b1

p10:factor(lhs(p9a)-lhs(p9b1))=0;

p10a:solve(p10,λ);

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