15.14.6 problem 6

Internal problem ID [3178]
Book : Differential Equations by Alfred L. Nelson, Karl W. Folley, Max Coral. 3rd ed. DC heath. Boston. 1964
Section : Exercise 23, page 106
Problem number : 6
Date solved : Tuesday, March 04, 2025 at 04:04:57 PM
CAS classification : [[_2nd_order, _linear, _nonhomogeneous]]

\begin{align*} y^{\prime \prime }+4 y^{\prime }+4 y&=\frac {{\mathrm e}^{3 x}}{2}-\frac {{\mathrm e}^{-3 x}}{2} \end{align*}

Maple. Time used: 0.006 (sec). Leaf size: 25
ode:=diff(diff(y(x),x),x)+4*diff(y(x),x)+4*y(x) = 1/2*exp(3*x)-1/2*exp(-3*x); 
dsolve(ode,y(x), singsol=all);
 
\[ y = \frac {\left (-25+{\mathrm e}^{6 x}+50 \left (c_{1} x +c_2 \right ) {\mathrm e}^{x}\right ) {\mathrm e}^{-3 x}}{50} \]
Mathematica. Time used: 0.225 (sec). Leaf size: 33
ode=D[y[x],{x,2}]+4*D[y[x],x]+4*y[x]==1/2*(Exp[3*x]-Exp[-3*x]); 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ y(x)\to \frac {1}{50} e^{-3 x} \left (e^{6 x}+50 e^x (c_2 x+c_1)-25\right ) \]
Sympy. Time used: 0.270 (sec). Leaf size: 29
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(4*y(x) - exp(3*x)/2 + 4*Derivative(y(x), x) + Derivative(y(x), (x, 2)) + exp(-3*x)/2,0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = \left (C_{1} + C_{2} x\right ) e^{- 2 x} + \frac {13 \sinh {\left (3 x \right )}}{25} - \frac {12 \cosh {\left (3 x \right )}}{25} \]