12.5.18 problem 15

Internal problem ID [1642]
Book : Elementary differential equations with boundary value problems. William F. Trench. Brooks/Cole 2001
Section : Chapter 2, First order equations. Transformation of Nonlinear Equations into Separable Equations. Section 2.4 Page 68
Problem number : 15
Date solved : Saturday, March 29, 2025 at 11:09:14 PM
CAS classification : [_linear]

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

Maple. Time used: 0.001 (sec). Leaf size: 10
ode:=diff(y(x),x) = (x+y(x))/x; 
dsolve(ode,y(x), singsol=all);
 
\[ y = \left (\ln \left (x \right )+c_1 \right ) x \]
Mathematica. Time used: 0.024 (sec). Leaf size: 12
ode=D[y[x],x]==(y[x]+x)/x; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ y(x)\to x (\log (x)+c_1) \]
Sympy. Time used: 0.148 (sec). Leaf size: 8
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(Derivative(y(x), x) - (x + y(x))/x,0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = x \left (C_{1} + \log {\left (x \right )}\right ) \]