JEE Main 2024 — 4 April, Morning Shift. Previous Year Question.
Problem
A square is inscribed in the circle $x^2+y^2-10x-6y+30=0$. One side of this square is parallel to $y=x+3$. If $(x_i,y_i)$ are the vertices of the square, then $\displaystyle\sum(x_i^2+y_i^2)$ is equal to:
Key insight. If a square’s sides are at $45°$ to the axes, its diagonals must be perfectly horizontal and vertical — so the four vertices sit exactly one radius away from the centre, straight up, down, left, and right. No trigonometric parametrisation is needed at all; the vertices can be written down directly.
Watch this explained step by step → · More on the Shiwam’s Classes channel
Approach
Find the circle’s centre and radius from its equation. Since one side of the inscribed square is parallel to a line of slope $1$ (i.e. at $45°$), the square’s diagonals — which bisect the $90°$ angle between adjacent sides — must lie along the horizontal and vertical directions through the centre. Write down the four vertices directly as the centre plus/minus the radius along each axis, then sum $x_i^2+y_i^2$ over all four.
Solution
Step 1 — Find the centre and radius of the circle
$$x^2+y^2-10x-6y+30=0$$
Comparing with $x^2+y^2+2gx+2fy+c=0$: $2g=-10\implies g=-5$; $2f=-6\implies f=-3$; $c=30$.
Centre $=(-g,-f)=(5,3)$
$$\text{Radius} = \sqrt{g^2+f^2-c} = \sqrt{25+9-30} = \sqrt4 = 2$$
Step 2 — Determine the diagonal directions
Since one side is parallel to $y=x+3$ (slope $1$, i.e. $45°$), the adjacent side (perpendicular, since it’s a square) has slope $-1$ ($135°$). The diagonal at each vertex bisects the $90°$ angle between these two sides — bisecting $45°$ and $135°$ gives a diagonal direction of exactly $90°$ (vertical), with the other diagonal perpendicular to it (horizontal).
Step 3 — Write down the four vertices directly
Since the diagonals are horizontal and vertical through the centre $(5,3)$, with half-diagonal length equal to the radius $2$:
$$(5+2,3)=(7,3), \quad (5-2,3)=(3,3), \quad (5,3+2)=(5,5), \quad (5,3-2)=(5,1)$$
Step 4 — Verify one side has slope 1 (sanity check)
Side from $(5,5)$ to $(3,3)$: slope $=\dfrac{3-5}{3-5}=\dfrac{-2}{-2}=1$ ✓ — matches the given condition.
Step 5 — Compute xᵢ² + yᵢ² for each vertex
$$(7,3):\ 49+9=58 \qquad (3,3):\ 9+9=18$$
$$(5,5):\ 25+25=50 \qquad (5,1):\ 25+1=26$$
Step 6 — Sum all four
$$58+18+50+26 = 152$$
Answer
$$152$$
Common mistakes
- Trying to parametrise the vertices using angles and trigonometric functions. Since the square’s orientation is pinned down exactly by the “parallel to a $45°$ line” condition, the diagonals align perfectly with the axes — the vertices can be read off directly as centre $\pm$ radius along each axis, with no need for $\cos\theta,\sin\theta$ at all.
- Getting the diagonal direction backwards (horizontal instead of vertical, or vice versa). The diagonal bisects the angle between the two perpendicular sides (at $45°$ and $135°$) — carefully working out that this bisector sits at $90°$ (not $0°$) is what determines which pair of vertices is directly above/below versus left/right of the centre.
Practise next
- A square is inscribed in the circle $x^2+y^2-6x-8y+21=0$, with one side parallel to $y=x-1$. Find $\displaystyle\sum(x_i^2+y_i^2)$ over its four vertices, using the same diagonal-direction approach.
Show answer
$116$ — and the side direction turns out not to matter. The circle has centre $C=(3,4)$ and radius $2$, so each vertex is $C+\vec v_k$ with $|\vec v_k|=2$.
For a square the four $\vec v_k$ are at right angles in turn, so they sum to $\vec 0$. Then
$$\sum|C+\vec v_k|^2=4|C|^2+2\,C\cdot\sum\vec v_k+\sum|\vec v_k|^2=4(25)+0+4(4)=116.$$
The condition about $y=x-1$ fixes which square it is, but the sum is the same for every inscribed square — a useful thing to notice before computing any vertex.

Doubts are answered by Shiwam, usually within a day. Ask about this question specifically — a general question about the chapter is better asked in class.