49.3.7 problem 3

Internal problem ID [7607]
Book : An introduction to Ordinary Differential Equations. Earl A. Coddington. Dover. NY 1961
Section : Chapter 1. Introduction– Linear equations of First Order. Page 45
Problem number : 3
Date solved : Wednesday, March 05, 2025 at 04:47:49 AM
CAS classification : [_linear]

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

Maple. Time used: 0.002 (sec). Leaf size: 11
ode:=x^2*diff(y(x),x)+2*x*y(x) = 1; 
dsolve(ode,y(x), singsol=all);
 
\[ y = \frac {x +c_{1}}{x^{2}} \]
Mathematica. Time used: 0.029 (sec). Leaf size: 13
ode=x^2*D[y[x],x]+2*x*y[x]==1; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ y(x)\to \frac {x+c_1}{x^2} \]
Sympy. Time used: 0.231 (sec). Leaf size: 8
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(x**2*Derivative(y(x), x) + 2*x*y(x) - 1,0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = \frac {C_{1} + x}{x^{2}} \]