3. On the line of the hypotenuse $AB$ of the isosceles right $\triangle ABC$, there is a point $P$ satisfying $S=AP^2+BP^2$, then ( ).
(A) There are infinitely many positions of $P$ such that $S<2CP^2$
(B) There are finitely many positions of $P$ such that $S<2CP^2$
(C) If and only if $P$ is the midpoint of $AB$, or $P$ coincides with one of the vertices $A, B$, then $S=2CP^2$
(D) For all points $P$ on the line $AB$, it always holds that $S=2CP^2$
3. (D)

If $P$ coincides with $A$ or $B$, by the Pythagorean theorem, we get $A P^{2} + B P^{2} = 2 C P^{2}$.
If $P$ is on $A B$,

draw $P D \perp A C$ at $D$,
$P E \perp B C$ at $E$.
Then, by $A P^{2} = 2 D P^{2}, B P^{2} = 2 P E^{2} = 2 O D^{2}$, we have $A P^{2} + B P^{2} = 2 D P^{2} + 2 C D^{2} = \angle C P^{P}$.
If $P$ is on the extension of $A B$ or $B A$, still draw $P D \perp A C$ at $D, P E \mid$ line $B C$ at $E$, we can similarly get $S = 2 C P^{2}$