85.34.5 problem 5

Internal problem ID [22713]
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. B Exercises at page 67
Problem number : 5
Date solved : Sunday, October 12, 2025 at 05:55:00 AM
CAS classification : [[_1st_order, `_with_symmetry_[F(x),G(y)]`]]

\begin{align*} y^{\prime }&=\sqrt {y+\sin \left (x \right )}-\cos \left (x \right ) \end{align*}
Maple. Time used: 0.187 (sec). Leaf size: 17
ode:=diff(y(x),x) = (sin(x)+y(x))^(1/2)-cos(x); 
dsolve(ode,y(x), singsol=all);
 
\[ c_{1} +\frac {x}{2}-\sqrt {y+\sin \left (x \right )} = 0 \]
Mathematica. Time used: 0.185 (sec). Leaf size: 20
ode=D[y[x],x]==Sqrt[y[x]+Sin[x]]-Cos[x]; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)&\to \frac {1}{4} \left (-4 \sin (x)+(x+c_1){}^2\right ) \end{align*}
Sympy. Time used: 4.125 (sec). Leaf size: 12
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(-sqrt(y(x) + sin(x)) + cos(x) + Derivative(y(x), x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = \frac {\left (C_{1} + x\right )^{2}}{4} - \sin {\left (x \right )} \]