85.33.5 problem 5

Internal problem ID [22628]
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. A Exercises at page 65
Problem number : 5
Date solved : Thursday, October 02, 2025 at 08:56:53 PM
CAS classification : [_separable]

\begin{align*} 3-y+2 x y^{\prime }&=0 \end{align*}

With initial conditions

\begin{align*} y \left (1\right )&=1 \\ \end{align*}
Maple. Time used: 0.012 (sec). Leaf size: 11
ode:=3-y(x)+2*x*diff(y(x),x) = 0; 
ic:=[y(1) = 1]; 
dsolve([ode,op(ic)],y(x), singsol=all);
 
\[ y = -2 \sqrt {x}+3 \]
Mathematica. Time used: 0.017 (sec). Leaf size: 14
ode=(3-y[x])+2*x*D[y[x],x]==0; 
ic={y[1]==1}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)&\to 3-2 \sqrt {x} \end{align*}
Sympy. Time used: 0.151 (sec). Leaf size: 10
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(2*x*Derivative(y(x), x) - y(x) + 3,0) 
ics = {y(1): 1} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = 3 - 2 \sqrt {x} \]