A circle \(S\) passing through origin cuts another circle
\[
x^2+y^2-6x+8y+16=0
\]
orthogonally and makes a chord of maximum length on line
\[
x-y-2=0
\]
then one diameter of circle \(S\) is
Show Hint
Maximum chord of a circle along a line occurs when that line passes through the center.
Step 3: Maximum chord condition.
Chord maximum when line passes through center.
Center of circle
\[
(-g,-f)
\]
Must lie on
\[
x-y-2=0
\]
So
\[
-g+f-2=0
\]
\[
f-g=2
\]
Solve equations.
\[
g=-1,\qquad f=1
\]
Diameter line through center and origin:
\[
x+y=2
\]
Thus
\[
\boxed{x+y=2}
\]