86.3.1 problem 1

Internal problem ID [23092]
Book : An introduction to Differential Equations. By Howard Frederick Cleaves. 1969. Oliver and Boyd publisher. ISBN 0050015044
Section : Chapter 4. Linear equations of the first order. Exercise 4a at page 56
Problem number : 1
Date solved : Thursday, October 02, 2025 at 09:20:02 PM
CAS classification : [_quadrature]

\begin{align*} y^{\prime }+3 y&=5 \end{align*}

With initial conditions

\begin{align*} y \left (0\right )&=y_{0} \\ \end{align*}
Maple. Time used: 0.009 (sec). Leaf size: 14
ode:=diff(y(x),x)+3*y(x) = 5; 
ic:=[y(0) = y__0]; 
dsolve([ode,op(ic)],y(x), singsol=all);
 
\[ y = \frac {5}{3}+{\mathrm e}^{-3 x} \left (y_{0} -\frac {5}{3}\right ) \]
Mathematica. Time used: 0.027 (sec). Leaf size: 26
ode=D[y[x],x]+3*y[x]==5; 
ic={y[0]==y0}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)&\to \frac {1}{3} e^{-3 x} \left (5 e^{3 x}+3 \text {y0}-5\right ) \end{align*}
Sympy. Time used: 0.093 (sec). Leaf size: 15
from sympy import * 
x = symbols("x") 
y0 = symbols("y0") 
y = Function("y") 
ode = Eq(3*y(x) + Derivative(y(x), x) - 5,0) 
ics = {y(0): y0} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = \left (y_{0} - \frac {5}{3}\right ) e^{- 3 x} + \frac {5}{3} \]