64.5.5 problem 5

Internal problem ID [13239]
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 : Wednesday, March 05, 2025 at 09:31:03 PM
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 \left (t \right ) = 1+{\mathrm e}^{\frac {1}{t}} c_{1} \]
Mathematica. Time used: 0.033 (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.308 (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 \]