85.14.2 problem 1 (b)

Internal problem ID [22518]
Book : Applied Differential Equations. By Murray R. Spiegel. 3rd edition. 1980. Pearson. ISBN 978-0130400970
Section : Chapter two. First order and simple higher order ordinary differential equations. C Exercises at page 41
Problem number : 1 (b)
Date solved : Thursday, October 02, 2025 at 08:45:18 PM
CAS classification : [[_homogeneous, `class C`], _dAlembert]

\begin{align*} y^{\prime }&=\frac {1+\sqrt {x -y}}{1-\sqrt {x -y}} \end{align*}
Maple. Time used: 0.010 (sec). Leaf size: 22
ode:=diff(y(x),x) = (1+(x-y(x))^(1/2))/(1-(x-y(x))^(1/2)); 
dsolve(ode,y(x), singsol=all);
 
\[ \frac {x}{2}+\frac {y}{2}+\sqrt {x -y}-c_1 = 0 \]
Mathematica. Time used: 0.214 (sec). Leaf size: 54
ode=D[y[x],x]==  ( 1+Sqrt[x-y[x]]  )/( 1 - Sqrt[x-y[x]] ) ; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)&\to -x-2 \left (1+\sqrt {2 x+1-c_1}\right )+c_1\\ y(x)&\to -x+2 \sqrt {2 x+1-c_1}-2+c_1 \end{align*}
Sympy. Time used: 0.994 (sec). Leaf size: 39
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(Derivative(y(x), x) - (sqrt(x - y(x)) + 1)/(1 - sqrt(x - y(x))),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ \left [ y{\left (x \right )} = - C_{1} - x - 2 \sqrt {C_{1} + 2 x + 1} - 2, \ y{\left (x \right )} = - C_{1} - x + 2 \sqrt {C_{1} + 2 x + 1} - 2\right ] \]