62.6.4 problem Ex 4

Internal problem ID [12743]
Book : An elementary treatise on differential equations by Abraham Cohen. DC heath publishers. 1906
Section : Chapter 2, differential equations of the first order and the first degree. Article 13. Linear equations of first order. Page 19
Problem number : Ex 4
Date solved : Wednesday, March 05, 2025 at 08:23:40 PM
CAS classification : [_linear]

\begin{align*} \left (x^{3}+x \right ) y^{\prime }+4 x^{2} y&=2 \end{align*}

Maple. Time used: 0.001 (sec). Leaf size: 21
ode:=(x^3+x)*diff(y(x),x)+4*x^2*y(x) = 2; 
dsolve(ode,y(x), singsol=all);
 
\[ y = \frac {x^{2}+2 \ln \left (x \right )+c_{1}}{\left (x^{2}+1\right )^{2}} \]
Mathematica. Time used: 0.042 (sec). Leaf size: 23
ode=(x+x^3)*D[y[x],x]+4*x^2*y[x]==2; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ y(x)\to \frac {x^2+2 \log (x)+c_1}{\left (x^2+1\right )^2} \]
Sympy. Time used: 0.304 (sec). Leaf size: 22
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(4*x**2*y(x) + (x**3 + x)*Derivative(y(x), x) - 2,0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = \frac {C_{1} + x^{2} + 2 \log {\left (x \right )}}{x^{4} + 2 x^{2} + 1} \]