in my text book [burden faires]
ODE inital value problem $ y' = f(t,y) , a \leq t \leq b, y(a)= \alpha $
and the difference method $ w_0=\alpha, w_{i+1} = w_i + h\phi(t_i,w_i)$
then local truncation error $\tau_{i+1}(h)= \frac{y_{i+1}-y_i}{h} - f(t_i,y_i)$
is my text book definiton, which $ w_i $ is approximation root and $y_i$ is exact.
but other book or wiki say that local truncation error is $y_{i+1}-y_i-h\phi(t_i,y_i)$ . what is difference?
and so runge kutta method of midpoint method and modified Euler methood have a local truncation error order $O(h^2)$ and Runge kutta order four has local truncatin error order $O(h^4)$ but other people say that midpoint method has a local truncation error order $O(h^3)$ I am very confused
There are two common definitions of local truncation error, which end up differing by an order. I'll work with an example method.
Let's consider the problem $$\begin{cases} u'(t)&=f(u(t)),\\ u(0)&=\eta\end{cases}$$ and approximate the solution via the midpoint/leapfrog method $$\frac{U^{n+1}-U^{n-1}}{2k}=f(U^n),$$ which can also be written as $$U^{n+1}=U^{n-1}+2kf(U^n).$$ The definition of local truncation error boils down to which of the above formulas you want to directly work with.
Definition One: This seems to be the convention that you use. Here, we plug the true solution into the finite difference formula (i.e. plug it into the formula that actually models the derivative and somewhat preserves that structure). Here, the local truncation error is $$\tau^n=\frac{u(t_{n+1})-u(t_{n-1})}{2k}-f(u(t_n))=\mathcal{O}(k^2),$$ which we get from Taylor expanding.
Definition Two: This is sometimes referred to as the one-step error. It is the error incurred from taking one step forward, assuming that the previous iterations were correct. This error is $$\mathcal{L}^n=u(t_{n+1})-U^{n+1}.$$ Here, we appeal to the second way that we wrote our ODE method. That is, if we consider the midpoint/leapfrog method $$U^{n+1}=U^{n-1}+2kf(U^n),$$ then $$\mathcal{L}^n=u(t_{n+1})-u(t_{n-1})-2ku'(t_n)=\mathcal{O}(k^3),$$ which also comes from Taylor expanding. It makes sense to get one less order of $k$ here, since we didn't divide by $k$ at the start.
Either definition is fine, and the convention that you follow is up to you. It's usually pretty easy to tell from context which one people are using. I believe that the second definition is the most common.