LoginSignup
0
0

More than 1 year has passed since last update.

放物線と円 「22年 北海道教大 2」をsympyでやってみた。

Last updated at Posted at 2022-09-04

y=√3/2*x^2に接する円
オリジナルが2つあります。

上と同じです。大学入試数学問題集成>

公式サイト

解答もあり(pdf)

sympyで

以下は,kamelink様を参考にしています。

from sympy import *
var('x y')
C1=sqrt(3)/2*x**2
Px,Py=1,sqrt(3)/2
l=(-1/diff(C1).subs({x:Px})*(x-Px)+Py).expand()
print("#(1)",l)
Cy=0
Cx=solve(Eq(l,Cy),x)[0]
R=sqrt((Cx-Px)**2+(Cy-Py)**2)
print("#(2)",Cx,Cy,R)
S1=Rational(1,2)*(Cx-Px)*Py
S2=acos((Cx-Px)/R)/(2*pi)*pi*R**2
print("#(3)",integrate(C1,(x,0,Px))+S1-S2)
#(1) -sqrt(3)*x/3 + 5*sqrt(3)/6
#(2) 5/2 0 sqrt(3)
#(3) -pi/4 + 13*sqrt(3)/24
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