77.16.7 problem 7

Internal problem ID [20481]
Book : A Text book for differentional equations for postgraduate students by Ray and Chaturvedi. First edition, 1958. BHASKAR press. INDIA
Section : Chapter III. Ordinary linear differential equations with constant coefficients. Exercise III (H) at page 47
Problem number : 7
Date solved : Thursday, October 02, 2025 at 06:03:18 PM
CAS classification : [[_2nd_order, _linear, _nonhomogeneous]]

\begin{align*} y^{\prime \prime }+4 y^{\prime }-12 y&=\left (x -1\right ) {\mathrm e}^{2 x} \end{align*}
Maple. Time used: 0.005 (sec). Leaf size: 29
ode:=diff(diff(y(x),x),x)+4*diff(y(x),x)-12*y(x) = (x-1)*exp(2*x); 
dsolve(ode,y(x), singsol=all);
 
\[ y = \frac {\left (4 x^{2}+64 c_2 -9 x \right ) {\mathrm e}^{2 x}}{64}+{\mathrm e}^{-6 x} c_1 \]
Mathematica. Time used: 0.062 (sec). Leaf size: 38
ode=D[y[x],{x,2}]+4*D[y[x],x]-12*y[x]==(x-1)*Exp[2*x]; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)&\to e^{2 x} \left (\frac {x^2}{16}-\frac {9 x}{64}+\frac {9}{512}+c_2\right )+c_1 e^{-6 x} \end{align*}
Sympy. Time used: 0.181 (sec). Leaf size: 26
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq((1 - x)*exp(2*x) - 12*y(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_{2} e^{- 6 x} + \left (C_{1} + \frac {x^{2}}{16} - \frac {9 x}{64}\right ) e^{2 x} \]