Question: Strange subs problem

Dear experts, I have problems about "subs", see below
> restart:
> assume(A>0): interface(showassumed=0):
> f:= A^2-2*sqrt(A^2+1)+1;
Now I want to replace A^2+1 to M^2, so idealy, what I want to see is
M^2 + M
 
When I do:
> f2:= subs(A^2+1 = M^2,  f);
Maple shows 
A^2-2*sqrt(M^2)+1
Maple cannot replace A^2+1
 
Please help, thank you.
Kyle
Please Wait...