A question on $p$-groups, and order of its commutator subgroup. $\textbf{QUESTION-}$
Let $P$ be a p-group with $|P:Z(P)|\leq p^n$. Show that $|P'| \leq p^{n(n-1)/2}$.
If $P=Z(P)$ it is true. Now let $n > 1$, then
If I see $P$ as a nilpotent group and construct its upper central series, it will end , so let it be,
$e=Z_0<Z_1<Z_2<......<Z_r=P$ 
Now as $Z_{i+1}/Z_i=Z(P/Z_i)$, so if if I take some $x\in Z_2$\ $Z_1$ then $N$={$[x,y]|y\in P$} $\leq Z_1(P)$ and $N \triangleleft P $, so $P/N$ is a group with order $\leq p^{n-1}$.
Now if I let $H=P/N$ then obviously |$H/Z(H)$|$\leq p^{n-1}$.
Now $H'\cong P'N/N \cong P'/(P' \cap N)$ so from here I could finally bring $P'$ atleast into the picture, now |$P'$|=$|H'|.|P'\cap N|$ so $|P'|\leq |H'||N|$. 
This is where I am $\textbf{STUCK}$
Now , from here how can I calculate or find some power $p$ bounds on $|H'|$ and $|N|$ so i could get my result.

For $n=0,1$, as you observe, there is nothing to prove.
Suppose now that the proposition is true for $n-1$, $n \geq 2 $
The first observation is that if $n \geq 2 $, $Z < Z_{2}$, so we can choose $x \in Z_{2} \setminus Z$.
Consider now the function $\alpha: P \rightarrow P$, $y \mapsto \left[ x,y \right]$. Since $x \in Z_{2}$ we have that  $ \alpha\left( y \right)= \left[ x,y \right] \in Z$ which is abelian so that $\alpha$ is a group morphism. Let $N := \operatorname{Im}\left( \alpha \right)$. We have that $\operatorname{Ker}\left( \alpha \right)= C_{G}\left( x \right)$ (the centraliser of $x$) and that $Z < C_{G}\left( x \right) $ since $x \in C_{G}\left( x \right) \setminus Z$. From this it follows 
$$
\left| N \right| = \left| \dfrac{P}{C_{G}\left( x \right)} \right| < \left| \dfrac{P}{Z} \right| \leq p^n
$$
i.e. 
$$\tag{1}\label{1}
\left| N \right| \leq p^{n-1}
$$
$N$ is normal in $P$ because it is central and we can construct $H = P/N$. We have that $ \dfrac{Z}{N} < Z\left( H \right) $ because $xN \in Z\left( H \right) \setminus \dfrac{Z}{N} $ so that 
$$
\left| \dfrac{H}{Z\left( H \right)} \right| < \left| \dfrac{H}{\dfrac{Z}{N}} \right| = \left| \dfrac{P}{Z} \right| \leq p^n$$
we can that deduce that $\left| H / Z\left( H \right)  \right|  \leq p^{n-1}$ and, by induction hypothesis,
$$\tag{2}\label{2} \left| H^\prime \right| \leq p^{\frac{\left( n-1 \right) \left( n-2 \right)}{2}}$$.
The final observation is that $N \leq P^\prime$ and 
$$\tag{3}\label{3} P^\prime / N \leq H^\prime$$ and putting all together we have:
$$ \left| P^\prime \right| \stackrel{\eqref{3}}\leq \left| H^\prime \right| \left| N \right| \stackrel{\eqref{1}\eqref{2}}\leq p^{\frac{\left( n-1 \right) \left( n-2 \right)}{2}} p^{n-1} = p^{\frac{n \left( n-1 \right)}{2}} $$
