74.11.13 problem 25

Internal problem ID [16192]
Book : INTRODUCTORY DIFFERENTIAL EQUATIONS. Martha L. Abell, James P. Braselton. Fourth edition 2014. ElScAe. 2014
Section : Chapter 4. Higher Order Equations. Exercises 4.3, page 156
Problem number : 25
Date solved : Monday, March 31, 2025 at 02:46:26 PM
CAS classification : [[_2nd_order, _missing_x]]

\begin{align*} y^{\prime \prime }+y^{\prime }-2 y&=-1 \end{align*}

Maple. Time used: 0.003 (sec). Leaf size: 16
ode:=diff(diff(y(t),t),t)+diff(y(t),t)-2*y(t) = -1; 
dsolve(ode,y(t), singsol=all);
 
\[ y = {\mathrm e}^{-2 t} c_2 +{\mathrm e}^{t} c_1 +\frac {1}{2} \]
Mathematica. Time used: 0.013 (sec). Leaf size: 23
ode=D[y[t],{t,2}]+D[y[t],t]-2*y[t]==-1; 
ic={}; 
DSolve[{ode,ic},y[t],t,IncludeSingularSolutions->True]
 
\[ y(t)\to c_1 e^{-2 t}+c_2 e^t+\frac {1}{2} \]
Sympy. Time used: 0.136 (sec). Leaf size: 17
from sympy import * 
t = symbols("t") 
y = Function("y") 
ode = Eq(-2*y(t) + Derivative(y(t), t) + Derivative(y(t), (t, 2)) + 1,0) 
ics = {} 
dsolve(ode,func=y(t),ics=ics)
 
\[ y{\left (t \right )} = C_{1} e^{- 2 t} + C_{2} e^{t} + \frac {1}{2} \]