23.1.307 problem 297

Internal problem ID [4914]
Book : Ordinary differential equations and their solutions. By George Moseley Murphy. 1960
Section : Part II. Chapter 1. THE DIFFERENTIAL EQUATION IS OF FIRST ORDER AND OF FIRST DEGREE, page 223
Problem number : 297
Date solved : Tuesday, September 30, 2025 at 08:56:28 AM
CAS classification : [_separable]

\begin{align*} \left (x^{2}+1\right ) y^{\prime }&=\left (2 b x +a \right ) y \end{align*}
Maple. Time used: 0.003 (sec). Leaf size: 18
ode:=(x^2+1)*diff(y(x),x) = (2*b*x+a)*y(x); 
dsolve(ode,y(x), singsol=all);
 
\[ y = c_1 \left (x^{2}+1\right )^{b} {\mathrm e}^{a \arctan \left (x \right )} \]
Mathematica. Time used: 0.031 (sec). Leaf size: 38
ode=(1+x^2)*D[y[x],x]==(a+2*b*x)*y[x]; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)&\to c_1 \exp \left (\int _1^x\frac {a+2 b K[1]}{K[1]^2+1}dK[1]\right )\\ y(x)&\to 0 \end{align*}
Sympy. Time used: 0.334 (sec). Leaf size: 39
from sympy import * 
x = symbols("x") 
a = symbols("a") 
b = symbols("b") 
y = Function("y") 
ode = Eq((-a - 2*b*x)*y(x) + (x**2 + 1)*Derivative(y(x), x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = C_{1} e^{- \frac {i a \log {\left (x - i \right )}}{2} + \frac {i a \log {\left (x + i \right )}}{2} + b \log {\left (x - i \right )} + b \log {\left (x + i \right )}} \]