ASKSAGE: Sage Q&A Forum - Individual question feedhttp://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Wed, 12 Apr 2017 12:34:23 -0500Intercept theorem in sagehttp://ask.sagemath.org/question/33330/intercept-theorem-in-sage/ Hi,
I'm working on Grobner bases and Buchberger algorithm and begginning in Sage. I would like to find a way to prove that if we have $B, C, D$ three points, then the point $C$ is in the circle of diameter $BD$ if and only if the triangle $BCD$ is an $C$-shaped right-angled triangle.
I'm thinking about using the Intercept theorem but I would like to prove it using Sage.
Thank you
Fri, 06 May 2016 11:48:30 -0500http://ask.sagemath.org/question/33330/intercept-theorem-in-sage/Answer by dan_fulea for <p>Hi,</p>
<p>I'm working on Grobner bases and Buchberger algorithm and begginning in Sage. I would like to find a way to prove that if we have $B, C, D$ three points, then the point $C$ is in the circle of diameter $BD$ if and only if the triangle $BCD$ is an $C$-shaped right-angled triangle.</p>
<p>I'm thinking about using the Intercept theorem but I would like to prove it using Sage.</p>
<p>Thank you</p>
http://ask.sagemath.org/question/33330/intercept-theorem-in-sage/?answer=37271#post-id-37271There is a first phase of translating the synthetic geometry into analytic / algebraic geometry.
Let us suppose that $B,D$ are located in the points with coordinates $(-1,0)$, and respectively $(1,0)$.
Then $C=C(x,y)$ is on the circle with diameter $BD$, iff its distance to the origin $(0,0)$ is one. We get thus the condition:
$$ x^2+y^2-1 =0\ . $$
The perpendicularity condition $BC\perp CD$ is written equivalently as the fact, that the slopes product is minus one:
$$ \frac{y-0}{x-(-1)}\cdot \frac{y-0}{x-(-1)} = -1\ .$$
The two conditions are obviously equivalent. It is hard to find something in sage that checks that an element is in an ideal. We may of course force the situation and type:
sage: R.<x,y> = QQ[]
sage: J = R.ideal( x^2 + y^2 - 1 )
sage: mBC = (y-0) / ( x-(-1) )
sage: mCD = (y-0) / ( x-(+1) )
sage: ( mBC*mCD + 1 ).numerator() in J
True
This is very convincing, and may make us think sage did very quickly a hard job, but after...
sage: ( mBC*mCD + 1 ).numerator()
x^2 + y^2 - 1
we can only sell the code as a joke!
Wed, 12 Apr 2017 12:34:23 -0500http://ask.sagemath.org/question/33330/intercept-theorem-in-sage/?answer=37271#post-id-37271