Solve (y')^2+x=2y for y' , i.e. y'=±√(2y-x) , and integrate…
Solve $(y')^2+x=2y$ for $y'$, i.e. $y'=\pm\sqrt{2y-x}$, and integrate both branches.
Explanation of Method
Substitute $u=2y-x$ to get a separable ODE in $u$, then $v=\sqrt{u}$ to reduce each branch to a rational integral in $v$; verify by implicit differentiation and run the $p$-discriminant test.
Step 1: Solve for $y'$ and substitute
$(y')^2=2y-x\ \Rightarrow\ y'=\pm\sqrt{2y-x}$. Let $u=2y-x$, so $\dfrac{du}{dx}=2y'-1$.
Step 2: Branch $y'=+\sqrt{2y-x}$
$\dfrac{du}{dx}=2\sqrt{u}-1$. With $v=\sqrt u$ ($u=v^2,\ du=2v\,dv$): $dx=\dfrac{2v\,dv}{2v-1}$. Since \[\int \frac{2v}{2v-1}\,dv = v+\tfrac12\ln|2v-1|+C\] (confirmed with sympy), integrating gives \[x+C_1=\sqrt{2y-x}+\tfrac12\ln\bigl|2\sqrt{2y-x}-1\bigr|.\]
Step 3: Branch $y'=-\sqrt{2y-x}$
$\dfrac{du}{dx}=-2\sqrt u-1$, so $dx=\dfrac{-2v\,dv}{2v+1}$, and \[\int \frac{-2v}{2v+1}\,dv=-v+\tfrac12\ln|2v+1|+C\] (confirmed with sympy), giving \[x+C_2=-\sqrt{2y-x}+\tfrac12\ln\bigl|2\sqrt{2y-x}+1\bigr|.\]
Step 4: Verify both relations by implicit differentiation
Differentiating each implicit relation with respect to $x$ and solving for $y'$ reproduces $y'=+\sqrt{2y-x}$ and $y'=-\sqrt{2y-x}$ respectively; squaring either recovers exactly the original equation $(y')^2=2y-x$ (confirmed symbolically with sympy).
Step 5: $p$-discriminant test
With $F=p^2+x-2y$: $F_p=2p=0\Rightarrow p=0$; substituting gives $y=x/2$. But plugging $y=x/2$ (so $y'=1/2$) back into the original equation gives $\tfrac14+x-2\cdot\tfrac{x}{2}=\tfrac14\ne0$ — a flat contradiction, so $y=x/2$ is not a solution at all.
Result
Final answer:
\[\boxed{\,\sqrt{2y-x}+\tfrac12\ln\bigl|2\sqrt{2y-x}-1\bigr|=x+C_1\ \ \text{or}\ \ -\sqrt{2y-x}+\tfrac12\ln\bigl|2\sqrt{2y-x}+1\bigr|=x+C_2\,}\]
No singular solution exists ($y=x/2$ leads to $1/4=0$).
Editor's note: both integrations $\int 2v/(2v-1)\,dv$ and $\int -2v/(2v+1)\,dv$, and both implicit-differentiation checks, were independently confirmed with sympy; the source's work is correct.