Solution: Find the equation of the perpendicular bisector of the line joining (2,4) and (6,8).
Find the equation of the perpendicular bisector of the line joining (2,4) and (6,8).
Calculations Finished
Code:
import sympy
x1, y1 = 2, 4
x2, y2 = 6, 8
midpoint_x = (x1 + x2) / 2
midpoint_y = (y1 + y2) / 2
slope_ab = (y2 - y1) / (x2 - x1)
perp_slope = -1 / slope_ab
x, y = sympy.symbols('x y')
line_eq = sympy.Eq(y - midpoint_y, perp_slope * (x - midpoint_x))
simplified_eq = sympy.simplify(line_eq)
print(f"Midpoint: ({midpoint_x}, {midpoint_y})")
print(f"Slope AB: {slope_ab}")
print(f"Perpendicular Slope: {perp_slope}")
print(f"Equation: {simplified_eq}")
Output:
Midpoint: (4.0, 6.0) Slope AB: 1.0 Perpendicular Slope: -1.0 Equation: Eq(1.0*x + 1.0*y, 10.0)
STEP 1 • VERIFIED
Solution for (22+6,24+8)
VIEW STEPS
STEP 2 • VERIFIED
Solution for 6−28−4
VIEW STEPS
STEP 3 • VERIFIED
Solution for −11
VIEW STEPS
STEP 4 • VERIFIED
Solution for y−6=−1⋅(x−4)
VIEW STEPS
Have a Math Question?
Ask your own question to get a step-by-step verified solution instantly.
Ask a Question