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?

More than 1 year has passed since last update.

余弦定理「22年 東北学院大 文系 A 1(4)」をsympyでやってみた。

Last updated at Posted at 2022-08-28

△ABCにおいて、∠BAC=60°.....

オリジナル

大学入試数学問題集成>
未掲載

sympyで(余弦定理・正弦定理)

from sympy import *
BC    =Symbol('BC'    ,real=True,positive=True)
sinABC=Symbol('sinABC',real=True,positive=True)
AB=7
AC=5
BAC=60
BC=solve(Eq(BC**2,AB**2+AC**2-2*AB*AC*cos(BAC*pi/180)),BC)[0]
print("#",solve(Eq(AC/sinABC,BC/sin(BAC*pi/180)),sinABC)[0])
# 5*sqrt(13)/26

sympyで(三平方の定理)

点Cから辺ABへの垂線の足を点Hとする。

from sympy import *
BC=Symbol('BC',real=True,positive=True)
AH=Rational(5,2)
CH=AH*sqrt(3)
# BC=sqrt((7-AH)**2+CH**2)
BC=solve(Eq((7-AH)**2+CH**2,BC**2),BC)[0]
print("#",CH/BC)
# 5*sqrt(13)/26
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?