Let $X_1,X_2,X_3....X_n$ be a sample from PMF
$P(X=x)=P_X(x)=\dfrac{1}{N} \ \ \ \ ;x=1,2,...N$
$X_n=$max($X_1,X_2,X_3....X_n$)
I calculated P.M.F of $X_n$ from this formula $n(F_X(x))^{n-1}f_X(x)$
$F_X(x)=\dfrac{x}{N}$
$f_{X_n}(x)=n\bigg(\dfrac{x^{n-1}}{N^{n}}\bigg)$
But in my textbook it is written as $\dfrac{x^n}{N^n}-\dfrac{(x-1)^{n}}{N^n}$
Where did I do it wrong ?
The formula that you used is derived from differentiating $(F_X(x))^n$, that is it is a formula meant for continuous random variable.
For discrete uniform, we have
\begin{align} Pr(X_n = x) &= Pr(X_n \le x) - Pr(X_n \le x-1) \\ &= \left(\frac{x}{N} \right)^n - \left(\frac{x-1}{N} \right)^n \end{align}