^{Sir, }To find the value of cot^{-1}(-x)

I proceeded like this,

Let Cot^{-1}(-x) = y

-x = Cot y

x = - Cot y = Cot ( –y)

Cot^{-1}x = - y = Cot^{-1}(-x) .

is Cot^{-1}x = Cot^{-1}(-x).

To find the value of cot^{-1}(-x)

My friend said as follow :

Let Cot^{-1}(-x) = y

-x = Cot y

x = - Cot y = Cot ( π–y)

Cot^{-1}x = π - y = π - Cot^{-1}(-x)

Cot^{-1}x = π - Cot^{-1}(-x).

Whether both the results are correct?

Which one I have to adopt and why?

Kindly enlighten me.

with warm regards,

Aranga