<s>[INST] Finite Derivative of $\frac{x^3-1}{x+1}$ I have the following qeustion:
 
Evaluating the front, back and central derivative I just need to plug it into the corresponding:
$$D_{+}(x)=\frac{f(x+h)-f(x)}{h},D_{-}(x)=\frac{f(x)-f(x-h)}{h},D_{c}(x)=\frac{f(x+h)-f(x-h)}{2h}?$$
Without choosing some point or value for $h$?
For the least square: I first find data points $$(0,-1),(1,0),(2,2.33),(3,6.5),(4,12.6),(5,20.66),(6,30.71)$$
And find $ax^3+bx^2+cx+d$ using least square and then derive it using front/back/central derivative?
 [/INST] You do the calculations indicated, as tedious as they might be!
Since $f(x)= \frac{x^3- 1}{x+ 1}$, $f(x+ h)= \frac{(x+ h)^3- 1}{x+ h+ 1}= \frac{x^3+ 3x^2h+ 3xh^2+ h^3- 1}{x+ h+ 1}$.
So $f(x+ h)- f(x)= \frac{(x+ h)^3- 1}{x+ h+ 1}- \frac{x^3- 1}{x+ 1}= \frac{x^3+ 3x^2h+ 3xh^2+ h^3- 1}{x+ h+ 1}- \frac{x^3- 1}{x+ 1}$.
To do that subtraction, we need to get the "common denominator", $(x+ h+ 1)(x+ 1)$.  Multiply both numerator and denominator of the first fraction by $x+ 1$ and multiply both numerator and denominator of the second fraction by $x+ h+ 1$:
\begin{align}
&\frac{(x^3+ 3x^2h+ 3xh^2+ h^3- 1)(x+ 1)}{(x+ h+ 1)(x+ 1)}- \frac{(x^3- 1)(x+ h+ 1)}{(x+ h+ 1)(x+ 1)}
\\
&= \frac{x^4+ 3x^3h+ 3x^2h^2+ xh^3- x+ x^3+ 3x^2h+3xh^2+ h^3- 1 }{(x+ h+ 1)(x- 1)}- \frac{(x^4+hx^3+x^3- x- h- 1)}{(x+ h+ 1)(x+ 1)}
\\
&= \frac{2x^3h+ 3x^2h+h+ 3x^2h^2+ 3xh^2+ xh^3+ h^3}{(x+ h- 1)(x- 1)}
\end{align}
Notice that every term in the numerator has an "h" factor so dividing by h cancels:
$$\frac{f(x+h)- f(x)}{h}= \frac{2x^3+ 3x^2+1+ 3x^2h+ 3xh+ xh^2+ h^2}{(x+ h+ 1)(x- 1)}$$
And now we can take the limit as goes to $0$ by just setting $h$ equal to $0$: $$\frac{2x^3+ 3x^2+1}{(x+ 1)^2}=2x+\frac{-x^2-2x+1}{(x+ 1)^2}=2x-1+\frac2{(x+ 1)^2}.$$
Test this with the alternative form $f(x)=\frac{(x^3+1)-2}{x+1}=x^2-x+1-\frac2{x+1}$, so that $f'(x)=2x-1+\frac{2}{(x+1)^2}$
</s>