Question: I am reading a proof from my professor (proof of convergence of Secant Method in Numerical Analysis), and she makes use of Taylor series. We have a function $f \in C^2(a, b)$, and a point $z \in (a, b)$. She writes 
$$f(z+h) = f(z) + f'(z)h + \dfrac {f''(z)}{2}h^2 + O(h^3).$$

However, I don't understand how we get this result.

I thought that Taylor's Theorem said: Let $f \in C^{k+1}(a, b)$. Then for every $z \in (a, b)$ and for every $h$ satsifying $z+h \in (a, b)$, we have
$$f(z+h) = f(z) + f'(z)h + \cdots + \dfrac {f^{(k)}(z)}{k!}h^k + \dfrac {f^{(k+1)}(\xi\_h)}{(k+1)!} h^{k+1}$$
for some $\xi\_h$ between $z$ and $z+h$. 

Thus, if $f \in C^2(a, b)$, I could see us writing
$$f(z+h) = f(z) + f'(z)h + \dfrac {f''(\xi\_h)}{2}h^2$$
and (I guess assuming the second derivative is bounded) we could write
$$f(z+h) = f(z) + f'(z)h + O(h^2)$$

However, I don't understand how to get what my professor wrote.

Thanks for the help.

Answer: 
I am not too sure what the problem actually is.

I guess that it is about proving that $0=0^2$, $1=1^2$, ..., $k^2$ are distinct modulo $p$ if $k$ is the greatest integer less than $\frac12p$.

So let $0\leq r<s<\frac12p$ two integers and assume that $r^2\equiv s^2\bmod p$.
This happens exactly when $p\mid s^2-r^2$.

But $p$ is prime so $p\mid s^2-r^2=(s+r)(s-r)$ implies that either $p$ divides $s-r$ or $s+r$.

I leave to you the task of proving that given the range of $r$ and $s$ both this possibilities are excluded, reaching a contradiction.
The problem is poorly stated but is probably asking you to show that no two members of $R$ are congruent modulo $p$. I suggest a proof by contradiction: suppose that $0\le r<s<\frac{p}2$ and $r^2\equiv s^2\pmod p$, and try to get a contradiction. Recall that the assumption that $r^2\equiv s^2\pmod p$ just means that $p\mid s^2-r^2$. You may find it useful to factor $s^2-r^2$, and you will definitely need the hypothesis that $p$ is prime.