63.1.102 problem 149

Internal problem ID [15542]
Book : DIFFERENTIAL and INTEGRAL CALCULUS. VOL I. by N. PISKUNOV. MIR PUBLISHERS, Moscow 1969.
Section : Chapter 8. Differential equations. Exercises page 595
Problem number : 149
Date solved : Thursday, October 02, 2025 at 10:19:42 AM
CAS classification : [[_2nd_order, _with_linear_symmetries]]

\begin{align*} s^{\prime \prime }-a^{2} s&=t +1 \end{align*}
Maple. Time used: 0.004 (sec). Leaf size: 27
ode:=diff(diff(s(t),t),t)-a^2*s(t) = t+1; 
dsolve(ode,s(t), singsol=all);
 
\[ s = {\mathrm e}^{a t} c_2 +{\mathrm e}^{-a t} c_1 +\frac {-t -1}{a^{2}} \]
Mathematica. Time used: 0.011 (sec). Leaf size: 31
ode=D[s[t],{t,2}]-a^2*s[t]==1+t; 
ic={}; 
DSolve[{ode,ic},s[t],t,IncludeSingularSolutions->True]
 
\begin{align*} s(t)&\to -\frac {t+1}{a^2}+c_1 e^{a t}+c_2 e^{-a t} \end{align*}
Sympy. Time used: 0.053 (sec). Leaf size: 26
from sympy import * 
t = symbols("t") 
a = symbols("a") 
s = Function("s") 
ode = Eq(-a**2*s(t) - t + Derivative(s(t), (t, 2)) - 1,0) 
ics = {} 
dsolve(ode,func=s(t),ics=ics)
 
\[ s{\left (t \right )} = C_{1} e^{- a t} + C_{2} e^{a t} - \frac {t}{a^{2}} - \frac {1}{a^{2}} \]