20.4.45 problem Problem 63

Internal problem ID [3680]
Book : Differential equations and linear algebra, Stephen W. Goode and Scott A Annin. Fourth edition, 2015
Section : Chapter 1, First-Order Differential Equations. Section 1.8, Change of Variables. page 79
Problem number : Problem 63
Date solved : Tuesday, March 04, 2025 at 05:06:57 PM
CAS classification : [[_homogeneous, `class G`], _rational, _Riccati]

\begin{align*} y^{\prime }+\frac {7 y}{x}-3 y^{2}&=\frac {3}{x^{2}} \end{align*}

Maple. Time used: 0.001 (sec). Leaf size: 26
ode:=diff(y(x),x)+7*y(x)/x-3*y(x)^2 = 3/x^2; 
dsolve(ode,y(x), singsol=all);
 
\[ y \left (x \right ) = \frac {3 \ln \left (x \right )-3 c_{1} -1}{3 x \left (\ln \left (x \right )-c_{1} \right )} \]
Mathematica. Time used: 0.156 (sec). Leaf size: 15
ode=D[y[x],x]+7/x*y[x]-3*y[x]^2==3/x^2; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)\to \frac {1}{x} \\ y(x)\to \frac {1}{x} \\ \end{align*}
Sympy. Time used: 0.181 (sec). Leaf size: 5
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(-3*y(x)**2 + Derivative(y(x), x) + 7*y(x)/x - 3/x**2,0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = \frac {1}{x} \]