75.16.4 problem 477

Internal problem ID [16906]
Book : A book of problems in ordinary differential equations. M.L. KRASNOV, A.L. KISELYOV, G.I. MARKARENKO. MIR, MOSCOW. 1983
Section : Chapter 2 (Higher order ODEs). Section 15.3 Nonhomogeneous linear equations with constant coefficients. Trial and error method. Exercises page 132
Problem number : 477
Date solved : Monday, March 31, 2025 at 03:35:09 PM
CAS classification : [[_2nd_order, _missing_y]]

\begin{align*} y^{\prime \prime }+7 y^{\prime }&={\mathrm e}^{-7 x} \end{align*}

Maple. Time used: 0.002 (sec). Leaf size: 20
ode:=diff(diff(y(x),x),x)+7*diff(y(x),x) = exp(-7*x); 
dsolve(ode,y(x), singsol=all);
 
\[ y = \frac {\left (-7 x -7 c_1 -1\right ) {\mathrm e}^{-7 x}}{49}+c_2 \]
Mathematica. Time used: 2.172 (sec). Leaf size: 55
ode=D[y[x],{x,2}]+7*D[y[x],x]==Exp[-7*x]; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)\to \int _1^xe^{-7 K[1]} (c_1+K[1])dK[1]+c_2 \\ y(x)\to -\frac {1}{49} e^{-7 x} (7 x+1)+\frac {8}{49 e^7}+c_2 \\ \end{align*}
Sympy. Time used: 0.223 (sec). Leaf size: 14
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(7*Derivative(y(x), x) + Derivative(y(x), (x, 2)) - exp(-7*x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = C_{1} + \left (C_{2} - \frac {x}{7}\right ) e^{- 7 x} \]