43.2.10 problem 7

Internal problem ID [8886]
Book : An introduction to Ordinary Differential Equations. Earl A. Coddington. Dover. NY 1961
Section : Chapter 1.6 Introduction– Linear equations of First Order. Page 41
Problem number : 7
Date solved : Tuesday, September 30, 2025 at 05:59:31 PM
CAS classification : [[_linear, `class A`]]

\begin{align*} y^{\prime }+a y&=b \left (x \right ) \end{align*}
Maple. Time used: 0.001 (sec). Leaf size: 21
ode:=diff(y(x),x)+a*y(x) = b(x); 
dsolve(ode,y(x), singsol=all);
 
\[ y = \left (\int b \left (x \right ) {\mathrm e}^{a x}d x +c_1 \right ) {\mathrm e}^{-a x} \]
Mathematica. Time used: 0.029 (sec). Leaf size: 32
ode=D[y[x],x]+a*y[x]==b[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]} b(K[1])dK[1]+c_1\right ) \end{align*}
Sympy. Time used: 0.641 (sec). Leaf size: 15
from sympy import * 
x = symbols("x") 
a = symbols("a") 
y = Function("y") 
b = Function("b") 
ode = Eq(a*y(x) - b(x) + Derivative(y(x), x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ \int \left (a y{\left (x \right )} - b{\left (x \right )}\right ) e^{a x}\, dx = C_{1} \]