71.4.15 problem 15

Internal problem ID [14316]
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 : Monday, March 31, 2025 at 12:17:23 PM
CAS classification : [_quadrature]

\begin{align*} y^{\prime }&=a y+b \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,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.038 (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]
 
\[ y(x)\to \frac {e^{-a c} \left (b \left (e^{a x}-e^{a c}\right )+a d e^{a x}\right )}{a} \]
Sympy. Time used: 0.149 (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} \]