7.2.14 problem 16

Internal problem ID [32]
Book : Elementary Differential Equations. By C. Henry Edwards, David E. Penney and David Calvis. 6th edition. 2008
Section : Chapter 1. First order differential equations. Section 1.3. Problems at page 27
Problem number : 16
Date solved : Thursday, March 13, 2025 at 03:15:23 PM
CAS classification : [[_homogeneous, `class C`], _dAlembert]

\begin{align*} y^{\prime }&=\sqrt {x -y} \end{align*}

With initial conditions

\begin{align*} y \left (2\right )&=1 \end{align*}

Maple. Time used: 0.012 (sec). Leaf size: 7
ode:=diff(y(x),x) = (x-y(x))^(1/2); 
ic:=y(2) = 1; 
dsolve([ode,ic],y(x), singsol=all);
 
\[ y = x -1 \]
Mathematica. Time used: 0.249 (sec). Leaf size: 8
ode=D[y[x],x]==Sqrt[x-y[x]]; 
ic={y[2]==1}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ y(x)\to x-1 \]
Sympy
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(-sqrt(x - y(x)) + Derivative(y(x), x),0) 
ics = {y(2): 1} 
dsolve(ode,func=y(x),ics=ics)
 
ValueError : Couldnt solve for initial conditions