30.5.1 problem 1

Internal problem ID [7500]
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 : 1
Date solved : Tuesday, September 30, 2025 at 04:40:03 PM
CAS classification : [[_homogeneous, `class A`], _rational, _Bernoulli]

\begin{align*} 2 t x x^{\prime }+t^{2}-x^{2}&=0 \end{align*}
Maple. Time used: 0.002 (sec). Leaf size: 27
ode:=2*t*x(t)*diff(x(t),t)+t^2-x(t)^2 = 0; 
dsolve(ode,x(t), singsol=all);
 
\begin{align*} x &= \sqrt {\left (-t +c_1 \right ) t} \\ x &= -\sqrt {\left (-t +c_1 \right ) t} \\ \end{align*}
Mathematica. Time used: 0.225 (sec). Leaf size: 37
ode=(  2*t*x[t] )*D[x[t],t]+(t^2-x[t]^2  )==0; 
ic={}; 
DSolve[{ode,ic},x[t],t,IncludeSingularSolutions->True]
 
\begin{align*} x(t)&\to -\sqrt {-t (t-c_1)}\\ x(t)&\to \sqrt {-t (t-c_1)} \end{align*}
Sympy. Time used: 0.265 (sec). Leaf size: 22
from sympy import * 
t = symbols("t") 
x = Function("x") 
ode = Eq(t**2 + 2*t*x(t)*Derivative(x(t), t) - x(t)**2,0) 
ics = {} 
dsolve(ode,func=x(t),ics=ics)
 
\[ \left [ x{\left (t \right )} = - \sqrt {t \left (C_{1} - t\right )}, \ x{\left (t \right )} = \sqrt {t \left (C_{1} - t\right )}\right ] \]