85.9.1 problem 1 (a)

Internal problem ID [22475]
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 37
Problem number : 1 (a)
Date solved : Thursday, October 02, 2025 at 08:40:33 PM
CAS classification : [_separable]

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

With initial conditions

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