74.8.20 problem 20

Internal problem ID [16085]
Book : INTRODUCTORY DIFFERENTIAL EQUATIONS. Martha L. Abell, James P. Braselton. Fourth edition 2014. ElScAe. 2014
Section : Chapter 2. First Order Equations. Review exercises, page 80
Problem number : 20
Date solved : Monday, March 31, 2025 at 02:41:21 PM
CAS classification : [_quadrature]

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

Maple. Time used: 0.001 (sec). Leaf size: 12
ode:=diff(y(t),t)+y(t) = 5; 
dsolve(ode,y(t), singsol=all);
 
\[ y = 5+{\mathrm e}^{-t} c_1 \]
Mathematica. Time used: 0.023 (sec). Leaf size: 20
ode=D[y[t],t]+y[t]==5; 
ic={}; 
DSolve[{ode,ic},y[t],t,IncludeSingularSolutions->True]
 
\begin{align*} y(t)\to 5+c_1 e^{-t} \\ y(t)\to 5 \\ \end{align*}
Sympy. Time used: 0.108 (sec). Leaf size: 8
from sympy import * 
t = symbols("t") 
y = Function("y") 
ode = Eq(y(t) + Derivative(y(t), t) - 5,0) 
ics = {} 
dsolve(ode,func=y(t),ics=ics)
 
\[ y{\left (t \right )} = C_{1} e^{- t} + 5 \]