12.7.6 problem 6

Internal problem ID [1716]
Book : Elementary differential equations with boundary value problems. William F. Trench. Brooks/Cole 2001
Section : Chapter 2, First order equations. Exact equations. Integrating factors. Section 2.6 Page 91
Problem number : 6
Date solved : Tuesday, March 04, 2025 at 01:38:00 PM
CAS classification : [_linear]

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

Maple. Time used: 0.001 (sec). Leaf size: 16
ode:=5*x*y(x)+2*y(x)+5+2*x*diff(y(x),x) = 0; 
dsolve(ode,y(x), singsol=all);
 
\[ y = \frac {{\mathrm e}^{-\frac {5 x}{2}} c_1 -1}{x} \]
Mathematica. Time used: 0.04 (sec). Leaf size: 21
ode=(5*x*y[x]+2*y[x]+5)+(2*x)*D[y[x],x]==0; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ y(x)\to \frac {-1+c_1 e^{-5 x/2}}{x} \]
Sympy. Time used: 0.277 (sec). Leaf size: 14
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(5*x*y(x) + 2*x*Derivative(y(x), x) + 2*y(x) + 5,0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = \frac {C_{1} e^{- \frac {5 x}{2}} - 1}{x} \]