38.3.2 problem 2

Internal problem ID [6480]
Book : Engineering Mathematics. By K. A. Stroud. 5th edition. Industrial press Inc. NY. 2001
Section : Program 25. Second order differential equations. Test Excercise 25. page 1093
Problem number : 2
Date solved : Sunday, March 30, 2025 at 11:05:13 AM
CAS classification : [[_2nd_order, _with_linear_symmetries]]

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

Maple. Time used: 0.004 (sec). Leaf size: 23
ode:=diff(diff(y(x),x),x)-4*y(x) = 10*exp(3*x); 
dsolve(ode,y(x), singsol=all);
 
\[ y = \left (2 \,{\mathrm e}^{5 x}+c_2 \,{\mathrm e}^{4 x}+c_1 \right ) {\mathrm e}^{-2 x} \]
Mathematica. Time used: 0.018 (sec). Leaf size: 29
ode=D[y[x],{x,2}]-4*y[x]==10*Exp[3*x]; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ y(x)\to e^{-2 x} \left (2 e^{5 x}+c_1 e^{4 x}+c_2\right ) \]
Sympy. Time used: 0.083 (sec). Leaf size: 22
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(-4*y(x) - 10*exp(3*x) + Derivative(y(x), (x, 2)),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = C_{1} e^{- 2 x} + C_{2} e^{2 x} + 2 e^{3 x} \]