# FILE phi2Bndmpl.txt
phi2 := z-> arctan(1/sqrt(z))/sqrt(z);
plot([phi2(z), 1/(z+1)], z = .125 .. 8, color = [red, green])
#
# Is 1/sqrt(phi2) concave?
tmp:=factor(diff(1/sqrt(phi2(z)),z$2));
plot(tmp,z=0 .. 10,view=[0 .. 10, -10 .. 5]);
plot(tmp,z=0 .. 10,view=[0 .. 10, -1 .. 1]);
# arctan(X)<X arctan(X)> X/(1+X^2)
ntmp := numer(tmp);
simplify(subs(arctan(1/sqrt(z))=1/sqrt(z),ntmp));
tmp1:=factor(diff(1/phi2(z),z$2));
plot(tmp1,z=0 .. 10,view=[0 .. 10, -1 .. 1]);
ntmp1 := numer(tmp1);
simplify(subs(arctan(1/sqrt(z)) = 1/sqrt(z), ntmp1))
tmp2:=factor(diff(1/phi2(z)^2,z$2));
plot(tmp2,z=0 .. 10,view=[0 .. 10, -1 .. 1]);
# tmp2 is positive
tmp3o2:=factor(diff(1/phi2(z)^(3/2),z$2));
plot(tmp3o2,z=0 .. 10,view=[0 .. 10, -1 .. 1]);
# tmp3o2 changes sign around z=0.1, and is positive for large x