10.9.16 problem 16

Internal problem ID [1318]
Book : Elementary differential equations and boundary value problems, 10th ed., Boyce and DiPrima
Section : Chapter 3, Second order linear equations, 3.4 Repeated roots, reduction of order , page 172
Problem number : 16
Date solved : Tuesday, March 04, 2025 at 12:29:05 PM
CAS classification : [[_2nd_order, _missing_x]]

\begin{align*} y^{\prime \prime }-y^{\prime }+\frac {y}{4}&=0 \end{align*}

With initial conditions

\begin{align*} y \left (0\right )&=2\\ y^{\prime }\left (0\right )&=b \end{align*}

Maple. Time used: 0.010 (sec). Leaf size: 16
ode:=diff(diff(y(t),t),t)-diff(y(t),t)+1/4*y(t) = 0; 
ic:=y(0) = 2, D(y)(0) = b; 
dsolve([ode,ic],y(t), singsol=all);
 
\[ y = {\mathrm e}^{\frac {t}{2}} \left (2+t \left (b -1\right )\right ) \]
Mathematica. Time used: 0.014 (sec). Leaf size: 20
ode=D[y[t],{t,2}]-D[y[t],t]+25/100*y[t]==0; 
ic={y[0]==2,Derivative[1][y][0] ==b}; 
DSolve[{ode,ic},y[t],t,IncludeSingularSolutions->True]
 
\[ y(t)\to e^{t/2} ((b-1) t+2) \]
Sympy. Time used: 0.162 (sec). Leaf size: 14
from sympy import * 
t = symbols("t") 
y = Function("y") 
ode = Eq(y(t)/4 - Derivative(y(t), t) + Derivative(y(t), (t, 2)),0) 
ics = {y(0): 2, Subs(Derivative(y(t), t), t, 0): b} 
dsolve(ode,func=y(t),ics=ics)
 
\[ y{\left (t \right )} = \left (t \left (b - 1\right ) + 2\right ) e^{\frac {t}{2}} \]