Now we know that the bond price formula is :
\begin{equation} \label{eq1} P = \frac{c}{(1+y)^1} + \frac{c}{(1+y)^2}+\cdots + \frac{c+P_p}{(1+y)^T} \end{equation}
or equivalently :
\begin{equation} P= \frac cy \left[1-(1+y)^{-T}\right] + P_p(1+y)^{-T} \end{equation}
where is $c$ is the coupon of the bond and $P_p$ is the present value.
Using the first equation for pricing of a zero coupon bond we obtain: $$P = \frac{P_p}{(1+y)^{T}}.$$
The convexity is defined as : \begin{equation} \label{eq5} C_{onvexity} = \frac{1}{P} \frac{\partial^2 P}{\partial y^2}. \end{equation} Taking the first derivative now with respect to yield in
\begin{equation} D = - \frac{(1+y)}{P} \frac{dP}{dy} \end{equation}
\begin{align*} \frac{\partial P}{\partial y} &= P_p(−T)(y+1)^{-T-1} \frac{\partial}{\partial y}[y+1]\\ &= -P_p(1+y)^{-T-1}T(1+0)\\ &= -P_p(1+y)^{-T-1}T\\ &= \frac{-T P_p}{(1+y)^{T+1} } \end{align*}
now calculating the second derivative (the derivative of the derivative) we obtain : $$\frac{\partial^2 P}{\partial y^2} = PT(T+1)(1+y)^{-T-2}$$ Binding them togetherin the convexity formula i have : \begin{align*} C_{onvexity} &= \frac{1}{P}\frac{\partial^2 P}{\partial y^2} \\ &= \frac{1}{P}\left[PT(T+1)(1+y)^{-T-2}\right]\\ &= \frac{1}{P}\frac{PT(T+1)}{(1+y)^{T+2}}\\ &= \frac{T(T+1)}{(1+y)^{T+2}} \end{align*}
But Carol Alexander in her book Market Risk Analysis Pricing, Hedging and Trading Financial Instruments, states "A zero coupon bond of maturity $T$ has convexity $T(T+1)(1+y)^{-2}.$This can be proved by differentiating $P=(1+y)^{-T}$ twice and then dividing by $T$."
Even if i divide by $T$ my result (probably to some wrong calculations) is wrong.
What is my mistake ? How i can prove the correct one ? Any help ?
As you mentioned, the convexity formula is
$$C_{\textrm{convexity}} = \frac{1}{P} \frac{\partial^2 P}{\partial y^2}$$
Assuming $c=0$ the bond price is $P=\frac{P_p}{(1+y)^T}$. Then the second derivative w.r.t. is $\frac{d^2P}{d y^2}=\frac{P_p\cdot T(T+1)}{(1+y)^{T+2}}$. So far so good. But it is important not to mix up $P$ and $P_p$. For the convexity formula we have to divide the second derivative by $P=\frac{P_p}{(1+y)^T}$. This gives
$$\frac{1}{P} \frac{\partial^2 P}{\partial y^2}=\frac{{P_p}\cdot T(T+1)}{(1+y)^{T+2}}\cdot \frac{(1+y)^T}{P_p}=\frac{T(T+1)}{(1+y)^{2}}$$
This is a typo. It should be P.