LoginSignup
0
0

平面ベクトル「22年 茨城大 後 工 2(5)」をsympyでやってみた。

Last updated at Posted at 2022-12-13

作図はありません

...座標平面上の2つのベクトル...
オリジナル

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

sympyで(positiveで)

from sympy import *
x=Symbol('x', positive=True)
a,b=map(Point,([3,-1],[x,2]))
print("#",solve((a+2*b).dot((a-b)),x)[0])
# 3/2

sympyで(varで)

from sympy import *
var('x')
a,b=map(Point,([3,-1],[x,2]))
print("#",solve((a+2*b).dot((a-b)),x))
# [0, 3/2]
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