38.4.1 problem 1

Internal problem ID [6487]
Book : Engineering Mathematics. By K. A. Stroud. 5th edition. Industrial press Inc. NY. 2001
Section : Program 25. Second order differential equations. Further problems 25. page 1094
Problem number : 1
Date solved : Wednesday, March 05, 2025 at 12:51:57 AM
CAS classification : [[_2nd_order, _with_linear_symmetries]]

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

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