32.4.8 problem 8

Internal problem ID [7781]
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 : 8
Date solved : Tuesday, September 30, 2025 at 05:05:23 PM
CAS classification : [[_2nd_order, _with_linear_symmetries]]

\begin{align*} y^{\prime \prime }-4 y^{\prime }+3 y&=x +{\mathrm e}^{2 x} \end{align*}
Maple. Time used: 0.004 (sec). Leaf size: 25
ode:=diff(diff(y(x),x),x)-4*diff(y(x),x)+3*y(x) = x+exp(2*x); 
dsolve(ode,y(x), singsol=all);
 
\[ y = {\mathrm e}^{3 x} c_2 +{\mathrm e}^{x} c_1 +\frac {x}{3}+\frac {4}{9}-{\mathrm e}^{2 x} \]
Mathematica. Time used: 0.098 (sec). Leaf size: 78
ode=D[y[x],{x,2}]-4*D[y[x],x]+3*y[x]==x+Exp[2*x]; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)&\to e^x \left (\int _1^x-\frac {1}{2} e^{-K[1]} \left (K[1]+e^{2 K[1]}\right )dK[1]+e^{2 x} \int _1^x\frac {1}{2} e^{-3 K[2]} \left (K[2]+e^{2 K[2]}\right )dK[2]+c_2 e^{2 x}+c_1\right ) \end{align*}
Sympy. Time used: 0.122 (sec). Leaf size: 26
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(-x + 3*y(x) - exp(2*x) - 4*Derivative(y(x), x) + Derivative(y(x), (x, 2)),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = C_{1} e^{x} + C_{2} e^{3 x} + \frac {x}{3} - e^{2 x} + \frac {4}{9} \]