Given a straight line which passes through a given point (x0, y0) such that this point bisects the line segment in two equal line segments. The task is to find the equation of this straight line. Examples:
Let PQ be the line and AB be the line segment between the axes. The x-intercept and y-intercept are a & b respectively. Now, as C(x0, y0) bisects AB so, x0 = (a + 0) / 2 i.e. a = 2x0 Similarly, y0 = (0 + b) / 2 i.e. b = 2y0 We know that the equation of a straight line in intercept form is,
x / a + y / b = 1 Here, a = 2x0 & b = 2y0 So, x / 2x0 + y / 2y0 = 1 or, x / x0 + y / y0 = 2 Therefore, x * y0 + y * x0 = 2 * x0 * y0
Below is the implementation of the above approach:
Please Login to comment...