40.9.6 problem 16

Internal problem ID [6716]
Book : Schaums Outline. Theory and problems of Differential Equations, 1st edition. Frank Ayres. McGraw Hill 1952
Section : Chapter 14. Linear equations with constant coefficients. Supplemetary problems. Page 92
Problem number : 16
Date solved : Wednesday, March 05, 2025 at 02:40:00 AM
CAS classification : [[_2nd_order, _with_linear_symmetries]]

\begin{align*} y^{\prime \prime }-6 y^{\prime }+9 y&={\mathrm e}^{2 x} \end{align*}

Maple. Time used: 0.003 (sec). Leaf size: 19
ode:=diff(diff(y(x),x),x)-6*diff(y(x),x)+9*y(x) = exp(2*x); 
dsolve(ode,y(x), singsol=all);
 
\[ y = \left (c_1 x +c_2 \right ) {\mathrm e}^{3 x}+{\mathrm e}^{2 x} \]
Mathematica. Time used: 0.026 (sec). Leaf size: 24
ode=D[y[x],{x,2}]-6*D[y[x],x]+9*y[x]==Exp[2*x]; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ y(x)\to e^{2 x} \left (1+e^x (c_2 x+c_1)\right ) \]
Sympy. Time used: 0.235 (sec). Leaf size: 17
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(9*y(x) - exp(2*x) - 6*Derivative(y(x), x) + Derivative(y(x), (x, 2)),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = \left (\left (C_{1} + C_{2} x\right ) e^{x} + 1\right ) e^{2 x} \]