35.6.2 problem 2

Internal problem ID [6152]
Book : Mathematical Methods in the Physical Sciences. third edition. Mary L. Boas. John Wiley. 2006
Section : Chapter 8, Ordinary differential equations. Section 6. SECOND-ORDER LINEAR EQUATIONSWITH CONSTANT COEFFICIENTS AND RIGHT-HAND SIDE NOT ZERO. page 422
Problem number : 2
Date solved : Sunday, March 30, 2025 at 10:41:24 AM
CAS classification : [[_2nd_order, _missing_x]]

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

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