Solve y=y'x+y'-y'^2
Solve $y=y'x+y'-y'^2$.
Explanation of Method
Recognize the standard Clairaut form $y=xp+f(p)$ with $f(p)=p-p^2$; the general solution is $y=cx+f(c)$ (verified trivially, since $y'\equiv c$). The singular solution comes from $x+f'(p)=0$; substitute and simplify independently with \texttt{sympy}, then confirm by differentiating the resulting closed form and checking the original equation identically.
Step 1: Identify Clairaut form and general solution
$y=xp+f(p)$ with $f(p)=p-p^2$, so $f'(p)=1-2p$. For any constant $c$, $y=cx+c-c^2$ has $y'\equiv c$; \texttt{sympy} confirms \[y-(xy'+y'-y'^2)\] simplifies to exactly $0$ when $y=cx+c-c^2$, $y'=c$ — the general (line) family is confirmed.
Step 2: Singular-solution condition
From $x+f'(p)=0$: $x+1-2p=0\Rightarrow p=\dfrac{x+1}{2}$, matching the source.
Step 3: Substitute and simplify (checked symbolically)
Substituting $p=\dfrac{x+1}{2}$ into $y=xp+p-p^2$, \texttt{sympy.simplify} of the resulting expression gives exactly \[y=\frac{x^2}{4}+\frac{x}{2}+\frac14=\frac{(x+1)^2}{4},\] matching the source's claim.
Step 4: Direct-derivative verification
Differentiating $y=\dfrac{(x+1)^2}{4}$ directly gives $y'=\dfrac{x+1}{2}$, matching $p$ from Step 2 exactly. \texttt{sympy} confirms \[y-\left(xy'+y'-y'^2\right)\] simplifies to exactly $0$ — the singular solution satisfies the original equation identically.
Result
Final answer:
Source's derivation confirmed correct at every step by independent \texttt{sympy} verification. General solution (family of lines): \[y=cx+c-c^2,\] singular solution (envelope): \[\boxed{\,y=\frac{(x+1)^2}{4}\,}\] both verified by direct substitution into $y=xy'+y'-y'^2$.