85.18.11 problem 2

Internal problem ID [22557]
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 52
Problem number : 2
Date solved : Thursday, October 02, 2025 at 08:50:41 PM
CAS classification : [_linear]

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

With initial conditions

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