Step 1: Assume endpoints of rod.
Let the ends of rod be at \(A(a,0)\) on \(x\)-axis and \(B(0,b)\) on \(y\)-axis. Step 2: Use length condition.
Distance \(AB=l\):
\[
AB^2=a^2+b^2=l^2
\]
Step 3: Midpoint coordinates.
Midpoint \(M(x,y)\) is:
\[
x=\frac{a}{2},\quad y=\frac{b}{2}
\]
So:
\[
a=2x,\quad b=2y
\]
Step 4: Substitute into length equation.
\[
(2x)^2+(2y)^2=l^2
\Rightarrow 4x^2+4y^2=l^2
\Rightarrow x^2+y^2=\frac{l^2}{4}
\]
Final Answer:
\[
\boxed{x^2+y^2=\frac{l^2}{4}}
\]