A square with each side equal to a lies above the x-axis and has one vertex at the origin. One of the sides passing through the origin makes an angle α(0<α<π4) with the positive direction of the x-axis. Equation of a diagonal of the square is
y(cos α−sin α)=x(sin α+cos α)
y(sin α+cos α)+x(cos α−sin α)=a
Let the side OA make an angle α with the x-axis. Then the coordinates of A are (a cos α, a sin α). Also, the diagonal OB makes an angle α+π4 with the x-axis, so that its equation is
y=tan(α+π4)x or y(cos α−sin α)=x(sin α+cos α)
Since AC is perpendicular to OB, its slope is −cot (α+π4), and as it passes through A(a cos α, a sin α), its equation is
y−a sin α=−cot(π4+α)(x−a cos α) or y(sin α+cos α)+x(cos α−sin α)=a