0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

メネラウスの定理。大人用「2024 青森公立大学前期【4】」(その3/3)をAI先生へ。sympyのいつもの方法で。

Last updated at Posted at 2025-11-06

(その1/3)
(その2/3)
(その3/3) 本ページ

・自力で?

(再出)オリジナル

(再出)web

数学入試問題 様へ。いつもお世話になっております。
https://kamelink.com/blog/2024/04/18/4-6-24-aomorikoritsudai-4/

sympyで(webオリジナル 様の方法を参考に)

ver2.0

・>△ABC でチェバの定理を用いると... 
・>△AFC と直線 PE でメネラウスの定理を用いると...

# ver2.0
from sympy import *
var('BF_FC,AP_PF')
var('S,SA,SB,SC')
AB,CA=8,5
AD,CE=3,2
EA   =CA-CE
DB   =AB-AD
BF_FC=solve(Eq(BF_FC*CE/EA*AD/DB                                   ,1),BF_FC)[0]              #;print(BF_FC)
AP_PF=solve(Eq(AP_PF*numer(BF_FC)/(numer(BF_FC)+denom(BF_FC))*CE/EA,1),AP_PF)[0]               ;print("#",AP_PF)
DEF  =(S-(SA+SB+SC)).subs({SA:Rational(AD,AB)*Rational(AD,CA)                         *S, \
                           SB:Rational(CA,AB)*numer(BF_FC)/(numer(BF_FC)+denom(BF_FC))*S, \
                           SC:Rational(denom(BF_FC),denom(BF_FC)+numer(BF_FC))*Rational(CE,CA)                         *S  \
                          })                                                                
print("#",DEF.subs({S:Rational(1,2)*AB*CA*sin(60*pi/180)}))
# 21/10
# 15*sqrt(3)/7

sympyで(いつもの方法で)

ver3.0

・trABCのBCを水平になるように回転して、trBCAを再定義しています。

# ver3.0
from sympy import *
AB,CA=8,5
AD,CE=3,2
trABC=Triangle(sas=(CA,60,AB))                   #;print(trABC)
BC   =trABC.args[1].distance(trABC.args[2])      #;print(BC)
trBCA=Triangle(sss=(BC,CA,AB))                   #;print(trBCA)
A,B,C=trBCA.args[2],trBCA.args[0],trBCA.args[1]
D    =A+AD*(B-A).unit
E    =C+CE*(A-C).unit
P    =Line(B,E).intersection(Line(C,D))[0]       #;print(P)
F    =Line(A,P).intersection(Line(B,C))[0]       #;print(F)
print("#",A.distance(P)/P.distance(F))
print("#",abs(Triangle(D,E,F).area))
# 21/10
# 15*sqrt(3)/7

(いつもの)FreeCADのマクロで作図

(作成中)

いつもの? sympyの実行環境と 参考のおすすめです。

(テンプレート)

いつもと違うおすすめです。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?