You can
put this solution on YOUR website!I think it's not a absolute value problem but i will try to help. Ok?
If n is negative

will be negative. Change n for a negative number for test, like -3:
If n is negative 2*n will be negative, like:
if n is negative and

( square root right?). Any number with exponent even is positive so,

will be the positive n:

will be negative.

will be negative.
Cheers.