66.1.31 problem Problem 45

Internal problem ID [13799]
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 : Wednesday, March 05, 2025 at 10:17:26 PM
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.005 (sec). Leaf size: 7
ode:=diff(x(t),t)+5*x(t) = 10*t+2; 
ic:=x(1) = 2; 
dsolve([ode,ic],x(t), singsol=all);
 
\[ x \left (t \right ) = 2 t \]
Mathematica. Time used: 0.063 (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]
 
\[ x(t)\to 2 t \]
Sympy. Time used: 0.129 (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 \]