15.14.2 problem 2

Internal problem ID [3174]
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 : 2
Date solved : Sunday, March 30, 2025 at 01:20:23 AM
CAS classification : [[_2nd_order, _with_linear_symmetries]]

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

Maple. Time used: 0.002 (sec). Leaf size: 27
ode:=diff(diff(y(x),x),x)+3*y(x) = 3*exp(-4*x); 
dsolve(ode,y(x), singsol=all);
 
\[ y = \sin \left (\sqrt {3}\, x \right ) c_2 +\cos \left (\sqrt {3}\, x \right ) c_1 +\frac {3 \,{\mathrm e}^{-4 x}}{19} \]
Mathematica. Time used: 0.023 (sec). Leaf size: 37
ode=D[y[x],{x,2}]+3*y[x]==3*Exp[-4*x]; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ y(x)\to \frac {3 e^{-4 x}}{19}+c_1 \cos \left (\sqrt {3} x\right )+c_2 \sin \left (\sqrt {3} x\right ) \]
Sympy. Time used: 0.078 (sec). Leaf size: 31
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(3*y(x) + Derivative(y(x), (x, 2)) - 3*exp(-4*x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = C_{1} \sin {\left (\sqrt {3} x \right )} + C_{2} \cos {\left (\sqrt {3} x \right )} + \frac {3 e^{- 4 x}}{19} \]