Derivative f’ of function f(x)=x^n is: f’(x) = n x^(n-1). We are going to show this result, using the definition of derivative and studying the different cases of n and the domain of function f.

We will study three case

## Proof/demonstration for $n=0$

$f(x)=1 => f'(x)=0$

## Proof/demonstration for $n\geq 0$

Suppose $\forall n\in \mathbb{N}^{*}, f(x)=x^n$. We have:

\begin{aligned} f^{\prime}(x) & =\lim _{h \rightarrow 0} \frac{f(x+h)-f(x)}{h} \\ & =\lim _{h \rightarrow 0} \frac{(x+h)^n-x^n}{h} \\ & =\lim _{h \rightarrow 0} \frac{x^n+\left(\begin{array}{l} n \\ 1 \end{array}\right) x^{n-1} h+\left(\begin{array}{l} n \\ 2 \end{array}\right) x^{n-2} h^2+\cdots+h^n-x^n}{h} \\ & =\lim _{h \rightarrow 0} \frac{n x^{n-1} h+\left(\begin{array}{l} n \\ 2 \end{array}\right) x^{n-2} h^2+\cdots+h^n}{h} \\ & =\lim _{h \rightarrow 0}\left(n x^{n-1}+\left(\begin{array}{c} n \\ 2 \end{array}\right) x^{n-2} h+\cdots+h^{n-1}\right) \\ & =n x^{n-1} \end{aligned}

We have:

$\forall n\in \mathbb{N}^{*}, f'(x) =n x^{n-1}$

and since it is true for $n=0$:

$\forall n\in \mathbb{N}, f'(x) =n x^{n-1}$

## Proof/demonstration for $n\lt 0$

Now Suppose $\forall n\in \mathbb{N}^{*}, f(x)=x^{-n}$. We have $\forall x\neq 0$

$f(x)\cdot x^{-n}=x^n \cdot x^{-n} =1$

Deriving this equality

\begin{aligned} \left(x^n \cdot x^{-n}\right)' & =\left(1\right)' \\ x^n \left(x^{-n}\right)'+x^{-n} \left(x^n\right)' & =0 &\text{Using derivative product} \\ x^n \left(x^{-n}\right)'+x^{-n}\cdot n x^{n-1} & =0 &\text{Using above result} \\ x^n \left(x^{-n}\right)'+n x^{-1} & =0 \\ x^n \left(x^{-n}\right)' & =-n x^{-1} \\ \left(x^{-n}\right)' & =-n x^{-n-1}& \text{Using }x\neq 0\\ f'(x) & =-n x^{-n-1} \end{aligned}

We have:

$\forall n\in \mathbb{N}^{*},\forall x\neq 0, f'(x) =-n x^{-n-1}$

Then:

$\forall m\in \mathbb{N}^{-*},\forall x\neq 0, f'(x) =m x^{m-1}$

## Conclusion

$\begin{equation*} \forall n\in \mathbb{Z}, f'(x) = nx^{n-1} : \left\{ \begin{array}{ll} D_f=\mathbb{R} & \quad n \geq 0 \\ D_f=\mathbb{R}^{*} & \quad n \lt 0 \end{array} \right\} \end{equation*}$