60.1.31 problem Problem 45

Internal problem ID [15159]
Book : Differential equations and the calculus of variations by L. ElSGOLTS. MIR PUBLISHERS, MOSCOW, Third printing 1977.
Section : Chapter 1, First-Order Differential Equations. Problems page 88
Problem number : Problem 45
Date solved : Thursday, October 02, 2025 at 10:06:12 AM
CAS classification : [[_linear, `class A`]]

\begin{align*} x^{\prime }+5 x&=10 t +2 \end{align*}

With initial conditions

\begin{align*} x \left (1\right )&=2 \\ \end{align*}
Maple. Time used: 0.017 (sec). Leaf size: 7
ode:=diff(x(t),t)+5*x(t) = 10*t+2; 
ic:=[x(1) = 2]; 
dsolve([ode,op(ic)],x(t), singsol=all);
 
\[ x = 2 t \]
Mathematica. Time used: 0.033 (sec). Leaf size: 8
ode=D[x[t],t]+5*x[t]==10*t+2; 
ic={x[1]==2}; 
DSolve[{ode,ic},x[t],t,IncludeSingularSolutions->True]
 
\begin{align*} x(t)&\to 2 t \end{align*}
Sympy. Time used: 0.076 (sec). Leaf size: 5
from sympy import * 
t = symbols("t") 
x = Function("x") 
ode = Eq(-10*t + 5*x(t) + Derivative(x(t), t) - 2,0) 
ics = {x(1): 2} 
dsolve(ode,func=x(t),ics=ics)
 
\[ x{\left (t \right )} = 2 t \]