80.3.36 problem 39

Internal problem ID [21200]
Book : A Textbook on Ordinary Differential Equations by Shair Ahmad and Antonio Ambrosetti. Second edition. ISBN 978-3-319-16407-6. Springer 2015
Section : Chapter 3. First order nonlinear differential equations. Excercise 3.7 at page 67
Problem number : 39
Date solved : Thursday, October 02, 2025 at 07:26:19 PM
CAS classification : [_linear]

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