We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
- Prepare
- Python
- Math
- Find Angle MBC
- Discussions
Find Angle MBC
Find Angle MBC
Sort by
recency
|
871 Discussions
|
Please Login in order to post a comment
Place coordinates:
𝐵 ( 0 , 0 ) , 𝐴 ( 𝑎 , 0 ) , 𝐶 ( 0 , 𝑏 ) B(0,0),A(a,0),C(0,b).
Midpoint
𝑀
( 𝑎 / 2 , 𝑏 / 2 ) M=(a/2,b/2).
Form vectors:
𝐵 𝑀
⃗
( 𝑎 / 2 , 𝑏 / 2 ) BM =(a/2,b/2)
𝐵 𝐶
⃗
( 0 , 𝑏 ) BC =(0,b)
Dot product formula:
cos
𝜃
𝐵 𝑀 ⃗ ⋅ 𝐵 𝐶 ⃗ ∣ 𝐵 𝑀 ⃗ ∣ ∣ 𝐵 𝐶 ⃗ ∣ cosθ= ∣ BM ∣∣ BC ∣ BM ⋅ BC
Simplify:
cos
𝜃
𝑏 𝑎 2 + 𝑏 2 cosθ= a 2 +b 2
b
Find angle:
𝜃
cos − 1 ( 𝐵 𝐶 𝐴 𝐵 2 + 𝐵 𝐶 2 ) θ=cos −1 ( AB 2 +BC 2
BC
)
Round to nearest integer if needed.
A different solution without tangent.
This is how you find angle MBC with degree sign: Syntax:
import math ab=int(input()) bc=int(input()) print(f"{str(round(math.degrees(math.atan2(ab,bc))))}\u00B0")
import math
a,b= int(input()), int(input())
print(str(round(math.degrees(math.atan2(a,b))))+chr(176))
Being well versed in the math class helps the most: