\( \DeclareMathOperator{\abs}{abs} \newcommand{\ensuremath}[1]{\mbox{$#1$}} \)

show that this equation 'ellipse'
[email protected],28/03/2017
ref:
http://staff.argyll.epsb.ca/jreed/math30p/conics/general.htm

(%i1) kill(all)$
load(eigen)$

given : parametric  x=x(t)
                   y=y(t),k=constant

(%i3) p1:X=k*cos(t);
p2:Y=-(k*sin(t)+k*cos(t))/2;
\[\tag{p1}\label{p1}X=k\,\cos{(t)}\] \[\tag{p2}\label{p2}Y=\frac{-k\,\sin{(t)}-k\,\cos{(t)}}{2}\]
(%i4) p3:linsolve([p1, p2], [cos(t),sin(t)]);
\[\tag{p3}\label{p3}[\cos{(t)}=\frac{X}{k},\sin{(t)}=-\frac{2Y+X}{k}]\]
(%i6) p4:p3[1];
p5:p3[2];
\[\tag{p4}\label{p4}\cos{(t)}=\frac{X}{k}\] \[\tag{p5}\label{p5}\sin{(t)}=-\frac{2Y+X}{k}\]
(%i8) p6:(p3[1])^2;
p7:(p3[2])^2;
\[\tag{p6}\label{p6}{{\cos{(t)}}^{2}}=\frac{{{X}^{2}}}{{{k}^{2}}}\] \[\tag{p7}\label{p7}{{\sin{(t)}}^{2}}=\frac{{{\left( 2Y+X\right) }^{2}}}{{{k}^{2}}}\]
(%i9) p8:(p6+p7);
\[\tag{p8}\label{p8}{{\sin{(t)}}^{2}}+{{\cos{(t)}}^{2}}=\frac{{{\left( 2Y+X\right) }^{2}}}{{{k}^{2}}}+\frac{{{X}^{2}}}{{{k}^{2}}}\]

geometry: identity '(cos(theta))^2+(sin(theta))^2 = 1'

(%i10) p9:trigrat(sin(t)^2+cos(t)^2=(2*Y+X)^2/k^2+X^2/k^2)*k^2;
\[\tag{p9}\label{p9}{{k}^{2}}=4{{Y}^{2}}+4XY+2{{X}^{2}}\]

ref : A*x^2+B*X*Y+C*y^2+D*x+E*x+F = 0 (1)

(%i11) p10:rhs(p9)-lhs(p9)=0;
\[\tag{p10}\label{p10}-{{k}^{2}}+4{{Y}^{2}}+4XY+2{{X}^{2}}=0\]
(%i18) p11:A=coeff(part(p10,1),X^2);
p111:ratsubst(v,X*Y, part(p10,1)=0)$
p12:B=coeff(part(p111,1),v);
p13:C=coeff(part(p10,1),Y^2);
p14:D=ev(coeff(part(p10,1),X),Y=0);
p15:E=ev(coeff(part(p10,1),Y),X=0);
p16:F=ev(part(p10,1),X=0,Y=0);
\[\tag{p11}\label{p11}A=2\] \[\tag{p12}\label{p12}B=4\] \[\tag{p13}\label{p13}C=4\] \[\tag{p14}\label{p14}D=0\] \[\tag{p15}\label{p15}E=0\] \[\tag{p16}\label{p16}F=-{{k}^{2}}\]

X*Y : rotation of the conic section.
-----------------------------------
see:ref = ' det =  B^2-4*A*C ' (2)
-----------------------------------
see ' above (1) '
-----------------------------------
circle   : A=C<>0 , det < 0
ellipse  : A<>C   , det < 0
parabola :        , det = 0
hyperbola:        , det > 0
-----------------------------------
-----------------------------------

(%i19) p17:det=(part(p12,2))^2-4*(part(p11,2))*(part(p13,2));
\[\tag{p17}\label{p17}\mathit{det}=-16\]

programming : Maxima

rem : construction ' simple if '

(%i22) if part(p17,2)<0 and part(p11,2)=part(p13,2) then
disp("circle")
else
disp("ellipse")$
if part(p17,2)> 0 then
disp("hyperbola")$
if part(p17,2)= 0 then
disp("parabola")$
\[\mbox{}\\ellipse\]

# = not equal to
other :>,=,<,≥,≤

(%i23) if part(p12,2) # 0 then
disp ("rotated conic ")$
\[\mbox{}\\rotated\,conic\,\]

rem : construction: if 'with elseif'
     if ' condition ' then
        output
     elseif ' condition ' then output
     elseif ' condition ' then output
     else output

(%i24) s:3;
\[\tag{s}\label{s}3\]
(%i25) if s < 0 then
"minus"
elseif
s < 5 then "small"
elseif
s < 10 then "medium"
else
"large";
\[\tag{\%{}o25}\label{o25} small\]

appendix:  statement 'trigrat'


Created with wxMaxima.