75.33.2 problem 831

Internal problem ID [17205]
Book : A book of problems in ordinary differential equations. M.L. KRASNOV, A.L. KISELYOV, G.I. MARKARENKO. MIR, MOSCOW. 1983
Section : Chapter 3. Section 24.2. Solving the Cauchy problem for linear differential equation with constant coefficients. Exercises page 249
Problem number : 831
Date solved : Thursday, March 13, 2025 at 09:18:48 AM
CAS classification : [[_linear, `class A`]]

\begin{align*} x^{\prime }-3 x&=3 t^{3}+3 t^{2}+2 t +1 \end{align*}

Using Laplace method With initial conditions

\begin{align*} x \left (0\right )&=-1 \end{align*}

Maple. Time used: 8.642 (sec). Leaf size: 15
ode:=diff(x(t),t)-3*x(t) = 3*t^3+3*t^2+2*t+1; 
ic:=x(0) = -1; 
dsolve([ode,ic],x(t),method='laplace');
 
\[ x \left (t \right ) = -\left (t +1\right ) \left (t^{2}+t +1\right ) \]
Mathematica. Time used: 0.185 (sec). Leaf size: 45
ode=D[x[t],t]-3*x[t]==3*t^3+3*t^2+2*t+1; 
ic={x[0]==-1}; 
DSolve[{ode,ic},x[t],t,IncludeSingularSolutions->True]
 
\[ x(t)\to e^{3 t} \left (\int _0^te^{-3 K[1]} \left (3 K[1]^3+3 K[1]^2+2 K[1]+1\right )dK[1]-1\right ) \]
Sympy. Time used: 0.155 (sec). Leaf size: 17
from sympy import * 
t = symbols("t") 
x = Function("x") 
ode = Eq(-3*t**3 - 3*t**2 - 2*t - 3*x(t) + Derivative(x(t), t) - 1,0) 
ics = {x(0): -1} 
dsolve(ode,func=x(t),ics=ics)
 
\[ x{\left (t \right )} = - t^{3} - 2 t^{2} - 2 t - 1 \]