58.5.5 problem 5

Internal problem ID [14599]
Book : Differential Equations by Shepley L. Ross. Third edition. John Willey. New Delhi. 2004.
Section : Chapter 2, section 2.3 (Linear equations). Exercises page 56
Problem number : 5
Date solved : Thursday, October 02, 2025 at 09:43:52 AM
CAS classification : [_separable]

\begin{align*} x^{\prime }+\frac {x}{t^{2}}&=\frac {1}{t^{2}} \end{align*}
Maple. Time used: 0.001 (sec). Leaf size: 12
ode:=diff(x(t),t)+1/t^2*x(t) = 1/t^2; 
dsolve(ode,x(t), singsol=all);
 
\[ x = 1+{\mathrm e}^{\frac {1}{t}} c_1 \]
Mathematica. Time used: 0.017 (sec). Leaf size: 20
ode=D[x[t],t]+x[t]/t^2==1/t^2; 
ic={}; 
DSolve[{ode,ic},x[t],t,IncludeSingularSolutions->True]
 
\begin{align*} x(t)&\to 1+c_1 e^{\frac {1}{t}}\\ x(t)&\to 1 \end{align*}
Sympy. Time used: 0.172 (sec). Leaf size: 10
from sympy import * 
t = symbols("t") 
x = Function("x") 
ode = Eq(Derivative(x(t), t) + x(t)/t**2 - 1/t**2,0) 
ics = {} 
dsolve(ode,func=x(t),ics=ics)
 
\[ x{\left (t \right )} = C_{1} e^{\frac {1}{t}} + 1 \]