29.27.21 problem 787

Internal problem ID [5371]
Book : Ordinary differential equations and their solutions. By George Moseley Murphy. 1960
Section : Various 27
Problem number : 787
Date solved : Tuesday, March 04, 2025 at 09:32:17 PM
CAS classification : [[_1st_order, _with_linear_symmetries], _Clairaut]

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

Maple. Time used: 0.042 (sec). Leaf size: 24
ode:=diff(y(x),x)^2-(2-x)*diff(y(x),x)+1-y(x) = 0; 
dsolve(ode,y(x), singsol=all);
 
\begin{align*} y \left (x \right ) &= x -\frac {1}{4} x^{2} \\ y \left (x \right ) &= 1+c_{1}^{2}+c_{1} \left (x -2\right ) \\ \end{align*}
Mathematica. Time used: 0.008 (sec). Leaf size: 29
ode=(D[y[x],x])^2-(2-x)*D[y[x],x]+1-y[x]==0; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)\to c_1 (x-2)+1+c_1{}^2 \\ y(x)\to -\frac {1}{4} (x-4) x \\ \end{align*}
Sympy. Time used: 1.604 (sec). Leaf size: 14
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq((x - 2)*Derivative(y(x), x) - y(x) + Derivative(y(x), x)**2 + 1,0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = \frac {C_{1}^{2}}{4} + \frac {C_{1} x}{2} + x \]