87.18.29 problem 29

Internal problem ID [23670]
Book : Ordinary differential equations with modern applications. Ladas, G. E. and Finizio, N. Wadsworth Publishing. California. 1978. ISBN 0-534-00552-7. QA372.F56
Section : Chapter 2. Linear differential equations. Exercise at page 135
Problem number : 29
Date solved : Thursday, October 02, 2025 at 09:44:07 PM
CAS classification : [[_2nd_order, _linear, _nonhomogeneous]]

\begin{align*} x^{\prime \prime }+2 x^{\prime }+x&=-\frac {{\mathrm e}^{-t}}{\left (t +1\right )^{2}} \end{align*}
Maple. Time used: 0.005 (sec). Leaf size: 19
ode:=diff(diff(x(t),t),t)+2*diff(x(t),t)+x(t) = -exp(-t)/(t+1)^2; 
dsolve(ode,x(t), singsol=all);
 
\[ x = {\mathrm e}^{-t} \left (t c_1 +\ln \left (1+t \right )+c_2 +1\right ) \]
Mathematica. Time used: 0.026 (sec). Leaf size: 23
ode=D[x[t],{t,2}]+2*D[x[t],t]+x[t]==-Exp[-t]/(1+t)^2; 
ic={}; 
DSolve[{ode,ic},x[t],t,IncludeSingularSolutions->True]
 
\begin{align*} x(t)&\to e^{-t} (\log (t+1)+c_2 t+1+c_1) \end{align*}
Sympy
from sympy import * 
t = symbols("t") 
x = Function("x") 
ode = Eq(x(t) + 2*Derivative(x(t), t) + Derivative(x(t), (t, 2)) + exp(-t)/(t + 1)**2,0) 
ics = {} 
dsolve(ode,func=x(t),ics=ics)
 
NotImplementedError : The given ODE Derivative(x(t), t) - (-t**2*x(t)*exp(t) - t**2*exp(t)*Derivativ