63.5.12 problem 2(f)

Internal problem ID [13015]
Book : A First Course in Differential Equations by J. David Logan. Third Edition. Springer-Verlag, NY. 2015.
Section : Chapter 1, First order differential equations. Section 1.4.1. Integrating factors. Exercises page 41
Problem number : 2(f)
Date solved : Monday, March 31, 2025 at 07:30:53 AM
CAS classification : [_separable]

\begin{align*} \left (t^{2}+1\right ) x^{\prime }&=-3 t x+6 t \end{align*}

Maple. Time used: 0.002 (sec). Leaf size: 15
ode:=(t^2+1)*diff(x(t),t) = -3*t*x(t)+6*t; 
dsolve(ode,x(t), singsol=all);
 
\[ x = 2+\frac {c_1}{\left (t^{2}+1\right )^{{3}/{2}}} \]
Mathematica. Time used: 0.036 (sec). Leaf size: 24
ode=(t^2+1)*D[x[t],t]==-3*t*x[t]+6*t; 
ic={}; 
DSolve[{ode,ic},x[t],t,IncludeSingularSolutions->True]
 
\begin{align*} x(t)\to 2+\frac {c_1}{\left (t^2+1\right )^{3/2}} \\ x(t)\to 2 \\ \end{align*}
Sympy. Time used: 0.312 (sec). Leaf size: 14
from sympy import * 
t = symbols("t") 
x = Function("x") 
ode = Eq(3*t*x(t) - 6*t + (t**2 + 1)*Derivative(x(t), t),0) 
ics = {} 
dsolve(ode,func=x(t),ics=ics)
 
\[ x{\left (t \right )} = \frac {C_{1}}{\left (t^{2} + 1\right )^{\frac {3}{2}}} + 2 \]