86.4.5 problem 5

Internal problem ID [23112]
Book : An introduction to Differential Equations. By Howard Frederick Cleaves. 1969. Oliver and Boyd publisher. ISBN 0050015044
Section : Chapter 4. Linear equations of the first order. Exercise 4b at page 64
Problem number : 5
Date solved : Thursday, October 02, 2025 at 09:22:58 PM
CAS classification : [[_linear, `class A`]]

\begin{align*} y^{\prime }+4 y&={\mathrm e}^{k x} \end{align*}
Maple. Time used: 0.001 (sec). Leaf size: 21
ode:=diff(y(x),x)+4*y(x) = exp(k*x); 
dsolve(ode,y(x), singsol=all);
 
\[ y = {\mathrm e}^{-4 x} c_1 +\frac {{\mathrm e}^{k x}}{k +4} \]
Mathematica. Time used: 0.037 (sec). Leaf size: 30
ode=D[y[x],x]+4*y[x]==Exp[k*x]; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)&\to \frac {e^{-4 x} \left (e^{(k+4) x}+c_1 (k+4)\right )}{k+4} \end{align*}
Sympy. Time used: 0.099 (sec). Leaf size: 17
from sympy import * 
x = symbols("x") 
k = symbols("k") 
y = Function("y") 
ode = Eq(4*y(x) - exp(k*x) + Derivative(y(x), x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = C_{1} e^{- 4 x} + \frac {e^{k x}}{k + 4} \]