30.5.25 problem 25

Internal problem ID [7524]
Book : Fundamentals of Differential Equations. By Nagle, Saff and Snider. 9th edition. Boston. Pearson 2018.
Section : Chapter 2, First order differential equations. Section 2.6, Substitutions and Transformations. Exercises. page 76
Problem number : 25
Date solved : Tuesday, September 30, 2025 at 04:41:58 PM
CAS classification : [[_homogeneous, `class G`], _rational, _Bernoulli]

\begin{align*} x^{\prime }+t x^{3}+\frac {x}{t}&=0 \end{align*}
Maple. Time used: 0.003 (sec). Leaf size: 32
ode:=diff(x(t),t)+t*x(t)^3+x(t)/t = 0; 
dsolve(ode,x(t), singsol=all);
 
\begin{align*} x &= \frac {1}{\sqrt {2 \ln \left (t \right )+c_1}\, t} \\ x &= -\frac {1}{\sqrt {2 \ln \left (t \right )+c_1}\, t} \\ \end{align*}
Mathematica. Time used: 0.298 (sec). Leaf size: 46
ode=D[x[t],t]+t*x[t]^3+x[t]/t==0; 
ic={}; 
DSolve[{ode,ic},x[t],t,IncludeSingularSolutions->True]
 
\begin{align*} x(t)&\to -\frac {1}{\sqrt {t^2 (2 \log (t)+c_1)}}\\ x(t)&\to \frac {1}{\sqrt {t^2 (2 \log (t)+c_1)}}\\ x(t)&\to 0 \end{align*}
Sympy. Time used: 0.275 (sec). Leaf size: 32
from sympy import * 
t = symbols("t") 
x = Function("x") 
ode = Eq(t*x(t)**3 + Derivative(x(t), t) + x(t)/t,0) 
ics = {} 
dsolve(ode,func=x(t),ics=ics)
 
\[ \left [ x{\left (t \right )} = - \frac {\sqrt {\frac {1}{C_{1} + 2 \log {\left (t \right )}}}}{t}, \ x{\left (t \right )} = \frac {\sqrt {\frac {1}{C_{1} + 2 \log {\left (t \right )}}}}{t}\right ] \]