49.2.10 problem 7

Internal problem ID [7600]
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 : Wednesday, March 05, 2025 at 04:47:33 AM
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.053 (sec). Leaf size: 32
ode=D[y[x],x]+a*y[x]==b[x]; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ y(x)\to e^{-a x} \left (\int _1^xe^{a K[1]} b(K[1])dK[1]+c_1\right ) \]
Sympy. Time used: 1.076 (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} \]