determine the point y=x^2+1 are closeet to (0,2) using diffrentiation

Easiest way is to use the fact that, at the point P closest to Q(0,2) , the line

PQ is normal to the tangent at P, that is, their slopes are
negative reciprocals

let the point P be (a,b)
slope of PQ = (b-2)/a
for the parabola, dy/dx = 2x, which at point P would be 2a

so (b-2)/a = -1/(2a)
but b = a^2 + 1, since P lies on the curve

(a^2 + 1 - 2)/a = -1/(2a) , multiply both sides by a
a^2 - 1 = -1/2
2a^2 - 2 = -1
2a^2 = 1
a^2 = 1/2
a = √(1/2) or √2/2 after rationalizing.
then b = a^1 + 1 = 1/2 + 1 = 3/2

the point is (√2/2 , 3/2)