9.1.21 problem 21

Internal problem ID [2861]
Book : Differential Equations by Alfred L. Nelson, Karl W. Folley, Max Coral. 3rd ed. DC heath. Boston. 1964
Section : Exercise 5, page 21
Problem number : 21
Date solved : Tuesday, September 30, 2025 at 05:55:23 AM
CAS classification : [_separable]

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

With initial conditions

\begin{align*} y \left (1\right )&=3 \\ \end{align*}
Maple. Time used: 0.004 (sec). Leaf size: 7
ode:=diff(y(x),x) = y(x)/x; 
ic:=[y(1) = 3]; 
dsolve([ode,op(ic)],y(x), singsol=all);
 
\[ y = 3 x \]
Mathematica. Time used: 0.013 (sec). Leaf size: 8
ode=D[y[x],x]==y[x]/x; 
ic=y[1]==3; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)&\to 3 x \end{align*}
Sympy. Time used: 0.058 (sec). Leaf size: 5
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(Derivative(y(x), x) - y(x)/x,0) 
ics = {y(1): 3} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = 3 x \]