yesterday I asked this question
the solution of this problem says that since $y^2$ is an even function and so is $cosx-1$ therefore $y'$ is an even function which implies $y$ is odd function and from there on the solution builds up
I can not understand how is $y(x)^2$ even??
here is the full solution https://www.youtube.com/watch?v=WI3UBYJ21iw&t=98s
and people here on stackexchange told he that the solution is wrong, which is what I was thinking too but today I encounter the same approach again and both the times the answer though this approach is correct which made me confused, how is $y^2$ even?
I am getting more confused now here is one more example where $y^2$ is taken to be even
this is the solution https://www.youtube.com/watch?v=vnqOCpqUebQ

what's going on???
I am also looking for the correct solution of the second problem, the first problem I was able to solve myself

As far as I know, there is no way to tell that $y^2$ is an even function a priori. Perhaps whoever presented solution confused polynomials in $x$ with even powers with this case and jumped to conclusion that $y^2$ is always even. This is obviously false for a function like $y(x) = x^2 + x$.
A way to solve the first problem that I can see immediately is to use higher derivative test for extrema. We have
$$y' = y^2 - 1 + \cos x \implies y'(0) = y(0)^2-1+\cos 0\stackrel{y(0)=0}{=} 0$$ $$y''= 2yy'-\sin x \implies y''(0) = 2y(0)y'(0)-\sin 0 = 0 $$ $$y''' = 2(y')^2 + 2yy'' - \cos x \implies y'''(0) = 2y'(0)^2+2y(0)y''(0) - \cos 0 = -1$$
We conclude that $y$ has inflection point at the origin, so A and B are false. Furthermore, since $y$ is infinitely times differentiable, in particular $y'''$ is continuous, so there exists $\delta > 0$ such that $y''' < 0$ on $(-\delta,\delta)$. Therefore, $y''$ is strictly decreasing on $(-\delta,\delta)$, so $y'' > 0$ on $(-\delta,0)$ and $y''<0$ on $(0,\delta)$. That means that $y'$ is strictly increasing on $(-\delta,0)$ and strictly decreasing on $(0,\delta)$. Thus, $y' < 0$ on $(-\delta,\delta)\setminus\{0\}$. Therefore, the correct answer is D.
Visualizing this argument:
\begin{array}{c| l c c c r} & -\delta && 0 && \delta\\ \hline y''' && - && -\\ \hline y'' && \searrow && \searrow \\ && + && - \\ \hline y' && \nearrow && \searrow \\ && - && - \\ \hline y && \searrow && \searrow \end{array}