65.4.15 problem 15

Internal problem ID [15674]
Book : Ordinary Differential Equations by Charles E. Roberts, Jr. CRC Press. 2010
Section : Chapter 2. The Initial Value Problem. Exercises 2.2, page 53
Problem number : 15
Date solved : Thursday, October 02, 2025 at 10:22:49 AM
CAS classification : [_quadrature]

\begin{align*} y^{\prime }&=b +a y \end{align*}

With initial conditions

\begin{align*} y \left (c \right )&=d \\ \end{align*}
Maple. Time used: 0.028 (sec). Leaf size: 27
ode:=diff(y(x),x) = a*y(x)+b; 
ic:=[y(c) = d]; 
dsolve([ode,op(ic)],y(x), singsol=all);
 
\[ y = \frac {-b +\left (d a +b \right ) {\mathrm e}^{-a \left (c -x \right )}}{a} \]
Mathematica. Time used: 0.025 (sec). Leaf size: 39
ode=D[y[x],x]==a*y[x]+b; 
ic={y[c]==d}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)&\to \frac {e^{-a c} \left (b \left (e^{a x}-e^{a c}\right )+a d e^{a x}\right )}{a} \end{align*}
Sympy. Time used: 0.079 (sec). Leaf size: 26
from sympy import * 
x = symbols("x") 
a = symbols("a") 
b = symbols("b") 
y = Function("y") 
ode = Eq(-a*y(x) - b + Derivative(y(x), x),0) 
ics = {y(c): d} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = \left (d e^{- a c} + \frac {b e^{- a c}}{a}\right ) e^{a x} - \frac {b}{a} \]