29.2.18 problem 43

Internal problem ID [4651]
Book : Ordinary differential equations and their solutions. By George Moseley Murphy. 1960
Section : Various 2
Problem number : 43
Date solved : Monday, January 27, 2025 at 09:29:27 AM
CAS classification : [[_homogeneous, `class C`], _Riccati]

\begin{align*} y^{\prime }&=\left (x -y\right )^{2} \end{align*}

Solution by Maple

Time used: 0.032 (sec). Leaf size: 31

dsolve(diff(y(x),x) = (x-y(x))^2,y(x), singsol=all)
 
\[ y \left (x \right ) = \frac {\left (1-x \right ) {\mathrm e}^{2 x}+\left (x +1\right ) c_{1}}{-{\mathrm e}^{2 x}+c_{1}} \]

Solution by Mathematica

Time used: 0.149 (sec). Leaf size: 29

DSolve[D[y[x],x]==(x-y[x])^2,y[x],x,IncludeSingularSolutions -> True]
 
\begin{align*} y(x)\to x+\frac {1}{\frac {1}{2}+c_1 e^{2 x}}-1 \\ y(x)\to x-1 \\ \end{align*}