The side length of square ABCD is 2, AE = EB, Mn = 1, the two ends of line Mn are on BC and CD, if △ AED is similar to triangle with m, N and C as vertex Find the length of CM

The side length of square ABCD is 2, AE = EB, Mn = 1, the two ends of line Mn are on BC and CD, if △ AED is similar to triangle with m, N and C as vertex Find the length of CM

Because the triangle AED is similar to the triangle MNC
So ad / NC = AE / MC = de / Mn or ad / MC = AE / NC = de / Mn
(1) If AD / NC = AE / MC = de / Mn
Because the side length of square ABCD is 2, AE = EB
So de = root 5
So 1 / MC = radical 5 / 1
MC = (radical 5) / 5
(2) If AD / MC = AE / NC = de / Mn
Then 2 / MC = radical 5 / 1
MC = (2 radical 5) / 5