40.3.36 problem 27

Internal problem ID [6640]
Book : Schaums Outline. Theory and problems of Differential Equations, 1st edition. Frank Ayres. McGraw Hill 1952
Section : Chapter 5. Equations of first order and first degree (Exact equations). Supplemetary problems. Page 33
Problem number : 27
Date solved : Sunday, March 30, 2025 at 11:13:08 AM
CAS classification : [_separable]

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

Maple. Time used: 0.002 (sec). Leaf size: 7
ode:=-y(x)+x*diff(y(x),x) = 0; 
dsolve(ode,y(x), singsol=all);
 
\[ y = c_1 x \]
Mathematica. Time used: 0.026 (sec). Leaf size: 14
ode=-y[x]+x*D[y[x],x]==0; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)\to c_1 x \\ y(x)\to 0 \\ \end{align*}
Sympy. Time used: 0.121 (sec). Leaf size: 5
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(x*Derivative(y(x), x) - y(x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = C_{1} x \]