79.1.17 problem 3 (v)

Internal problem ID [18425]
Book : Elementary Differential Equations. By R.L.E. Schwarzenberger. Chapman and Hall. London. First Edition (1969)
Section : Chapter 3. Solutions of first-order equations. Exercises at page 47
Problem number : 3 (v)
Date solved : Thursday, March 13, 2025 at 11:56:41 AM
CAS classification : [[_linear, `class A`]]

\begin{align*} {\mathrm e}^{3 t} x^{\prime }+3 x \,{\mathrm e}^{3 t}&=2 t \end{align*}

Maple. Time used: 0.000 (sec). Leaf size: 14
ode:=exp(3*t)*diff(x(t),t)+3*x(t)*exp(3*t) = 2*t; 
dsolve(ode,x(t), singsol=all);
 
\[ x = \left (t^{2}+c_{1} \right ) {\mathrm e}^{-3 t} \]
Mathematica. Time used: 0.062 (sec). Leaf size: 17
ode=Exp[3*t]*D[x[t],t]+3*x[t]*Exp[3*t]==2*t; 
ic={}; 
DSolve[{ode,ic},x[t],t,IncludeSingularSolutions->True]
 
\[ x(t)\to e^{-3 t} \left (t^2+c_1\right ) \]
Sympy. Time used: 0.173 (sec). Leaf size: 12
from sympy import * 
t = symbols("t") 
x = Function("x") 
ode = Eq(-2*t + 3*x(t)*exp(3*t) + exp(3*t)*Derivative(x(t), t),0) 
ics = {} 
dsolve(ode,func=x(t),ics=ics)
 
\[ x{\left (t \right )} = \left (C_{1} + t^{2}\right ) e^{- 3 t} \]