15.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 : Sunday, March 30, 2025 at 12:34:54 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.016 (sec). Leaf size: 7
ode:=diff(y(x),x) = y(x)/x; 
ic:=y(1) = 3; 
dsolve([ode,ic],y(x), singsol=all);
 
\[ y = 3 x \]
Mathematica. Time used: 0.024 (sec). Leaf size: 8
ode=D[y[x],x]==y[x]/x; 
ic=y[1]==3; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ y(x)\to 3 x \]
Sympy. Time used: 0.110 (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 \]