30.10.1 problem 9

Internal problem ID [7580]
Book : Fundamentals of Differential Equations. By Nagle, Saff and Snider. 9th edition. Boston. Pearson 2018.
Section : Chapter 2, First order differential equations. Review problem. (J) Asymptotic Behavior. page 88
Problem number : 9
Date solved : Tuesday, September 30, 2025 at 04:54:33 PM
CAS classification : [[_linear, `class A`]]

\begin{align*} y^{\prime }+a y&=Q \left (x \right ) \end{align*}
Maple. Time used: 0.001 (sec). Leaf size: 21
ode:=diff(y(x),x)+a*y(x) = Q(x); 
dsolve(ode,y(x), singsol=all);
 
\[ y = \left (\int Q \left (x \right ) {\mathrm e}^{a x}d x +c_1 \right ) {\mathrm e}^{-a x} \]
Mathematica. Time used: 0.037 (sec). Leaf size: 32
ode=D[y[x],x]+a*y[x]==Q[x]; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)&\to e^{-a x} \left (\int _1^xe^{a K[1]} Q(K[1])dK[1]+c_1\right ) \end{align*}
Sympy. Time used: 0.663 (sec). Leaf size: 15
from sympy import * 
x = symbols("x") 
a = symbols("a") 
y = Function("y") 
q = Function("q") 
ode = Eq(a*y(x) - q(x) + Derivative(y(x), x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ \int \left (a y{\left (x \right )} - q{\left (x \right )}\right ) e^{a x}\, dx = C_{1} \]