If $q(x)\le 0$ on an interval $I$, then no non-trivial solution $y''+q(x)y=0$ an have two zeros on $I$.
here what my problem is when i trying to understanding this problem the author says that
Suppose if possible, that a non-trivial solution $y$ has at least two zeroes on $I$. WLOG let $x_1 < x_2$ be two consecutive zeroes of $y,$ and that $y > 0 $ on $(x_1, x_2)$
This implies that $$ y'(x_1)>0$$ and $$y'(x_2)<0$$
how we conclude that the last statement can some one tell me please
If $q$ is strictly negative, this problem is relatively easy. But the trouble comes when $q$ can be zero. I don't think my solution is optimal, but well, it solves the problem.
First, we claim that, if there exists $a\in I$ such that $y(a)=0$ and $y'(a)=0$, then $y$ is the trivial solution. To prove this, note that $y$ is continuous. Without loss of generality, we assume that there exists $b\in I$ such that $b>a$. (Otherwise replace $y:I\to\Bbb R$ by $\tilde{y}:(-I)\to\Bbb R$, where $\tilde{y}(x)=y(-x)$ for all $x\in I$.)
Fix $\epsilon>0$ such that $[a,a+\epsilon]\subset I$. Then, there exists $L_\epsilon>0$ such that $\big|y(x)\big|\leq L_\epsilon$ for all $x\in [a,a+\epsilon]$. Since $q$ is continuous, there exists $M_\epsilon$ such that $\big|q(x)\big|\leq M_\epsilon$ for all $x\in[a,a+\epsilon]$. By the differential equation $y''+qy=0$, we have $$\big|y'(a+s)\big|=\left|\int_a^{a+s} y''(t)\ dt\right|\leq \int_a^{a+s}\big|q(t)\big|\big|y(t)\big|\ dt\leq L_\epsilon M_\epsilon s.\tag{1}$$ Thus, $$\big|y(a+s)\big|=\left|\int_a^{a+s}y'(t)\ dt\right|\leq \int_a^{a+s}\big|y'(t)\big|\ dt\leq \int_0^{s} L_\epsilon M_\epsilon t\ dt=\frac{L_\epsilon M_\epsilon s^2}{2}.\tag{2}$$
We can plug in (2) into (1), and then improve the bound of (1), which then leads to an improved bound for (2). By doing this many times over, we get $$\big|y'(a+s)\big|\leq \frac{L_\epsilon M_\epsilon^n s^{2n-1}}{(2n-1)!}$$ and $$\big|y(a+s)\big|\leq \frac{L_\epsilon M_\epsilon^n s^{2n}}{(2n)!}$$ for every natural number $n$. Letting $n\to\infty$, we get $y'(a+s)=y(a+s)=0$ for all $s$ with $0\leq s\leq \epsilon$.
We can repeat the process until we show that $y(x)=0$ for all $x\in I$ with $x\geq a$. If $\inf I\neq a$, we can reverse the direction and prove in the same manner that $y(x)=0$ for all $x\in I$ with $x\leq a$. Hence, $y$ is trivial on the whole $I$.
If $y(x_1)=0$ and $y(x_2)=0$ for some $x_1,x_2\in I$ with $x_1<x_2$, and $y$ is non-trivial, then by the result above, $y$ is not identically zero on $[x_1,x_2]$. Following LutzL's hint, the continuous function $y$ is both maximized and minimized in the compact interval $[x_1,x_2]$. Either the maximum value or the minimum value of $y$ in $[x_1,x_2]$ is nonzero. WLOG, the maximum value is nonzero, and achieved when $x=c$.
That is, $y''(c)\leq 0$. As $y''(c)=\big(-q(c)\big)y(c)\geq 0$ because $q\leq 0$ on $I$, we must have $q(c)=0$. Let $u$ denote the infimum of $t\in[x_1,c]$ such that $q$ vanishes on $[t,c]$, and $v$ the supremum of $t\in[c,x_2]$ such that $q$ vanishes on $[c,t]$. Either $u>x_1$ or $v<x_2$ must hold, otherwise, $q=0$ on $[x_1,x_2]$, and $y$ is linear there. If $y$ is non-trivial and linear on $[x_1,x_2]$, it cannot have two zeros on $[x_1,x_2]$.
We will only deal with the case $u>x_1$ here, but the case $v<x_2$ can be proven similarly. First, if $u=c$, we see that, for a sufficiently small $\epsilon>0$, we have $c-s>x_1$, $y(c-s)>0$, and $q(c-s)<0$ if $0<s<\epsilon$. We get that $$y''(c-s)=-q(c-s)y(c-s)>0.$$ Consequently, $$y'(u-s)=-\int_{u-s}^uy''(t)\ dt<0.$$ That is, $y$ is decreasing in $[u-\epsilon,u]$, so $y(u-\epsilon)>y(u)=y(c)$, contradicting the assumption that $x=c$ maximizes $y$ on $[x_1,x_2]$.
If $u<c$, then it is easy to prove that either $y'=0$ on $[u,v]$ with $v>c$, or $y'\geq 0$ on $[u,v]$ with $v=c$. In the case $y'=0$ on $[u,v]$, $y$ is a positive constant on $[u,v]$. For a sufficiently small $\epsilon>0$, we have $u-s>x_1$, $y(u-s)>0$, and $q(u-s)<0$ if $0<s<\epsilon$. We get that $$y''(u-s)=-q(u-s)y(u-s)>0.$$ Consequently, $$y'(c-s)=-\int_{c-s}^cy''(t)\ dt<0.$$ That is, $y$ is decreasing in $[c-\epsilon,c]$, so $y(c-\epsilon)>y(c)$, contradicting the assumption that $x=c$ maximizes $y$ on $[x_1,x_2]$.
Hence, for $u<c$, we are left with the case $y'\geq 0$ and $v=c$. Therefore, for a small $\epsilon>0$, we have $c+s<x_2$, $y(c+s)>0$, and $q(c+s)<0$ if $0<s<\epsilon$. That is, $y''(c+s)=-q(c+s)y(c+s)>0$ and $$y'(c+s)=\int_c^{c+s}y''(t)\ dt>0.$$ That is, $y$ is increasing on $[c,c+\epsilon]$, so $y(c+\epsilon)>y(c)$, contradicting the assumption that $x=c$ maximizes $y$ on $[x_1,x_2]$.