34.13.13 problem 35

Internal problem ID [8054]
Book : Schaums Outline. Theory and problems of Differential Equations, 1st edition. Frank Ayres. McGraw Hill 1952
Section : Chapter 18. Linear equations with variable coefficients (Equations of second order). Supplemetary problems. Page 120
Problem number : 35
Date solved : Tuesday, September 30, 2025 at 05:14:50 PM
CAS classification : [[_2nd_order, _with_linear_symmetries]]

\begin{align*} \left (x +1\right ) y^{\prime \prime }-\left (3 x +4\right ) y^{\prime }+3 y&=\left (3 x +2\right ) {\mathrm e}^{3 x} \end{align*}
Maple. Time used: 0.006 (sec). Leaf size: 21
ode:=(1+x)*diff(diff(y(x),x),x)-(3*x+4)*diff(y(x),x)+3*y(x) = (3*x+2)*exp(3*x); 
dsolve(ode,y(x), singsol=all);
 
\[ y = \left (c_1 +x \right ) {\mathrm e}^{3 x}+\frac {\left (3 x +4\right ) c_2}{3} \]
Mathematica. Time used: 0.223 (sec). Leaf size: 273
ode=(x+1)*D[y[x],{x,2}]-(3*x+4)*D[y[x],x]+3*y[x]==(3*x+2)*Exp[3*x]; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)&\to \exp \left (\int _1^x\frac {3 K[1]+2}{2 K[1]+2}dK[1]-\frac {1}{2} \int _1^x\left (-3-\frac {1}{K[2]+1}\right )dK[2]\right ) \left (\int _1^x-\frac {\exp \left (3 K[4]+\int _1^{K[4]}\frac {3 K[1]+2}{2 K[1]+2}dK[1]+\frac {1}{2} \int _1^{K[4]}\left (-3-\frac {1}{K[2]+1}\right )dK[2]\right ) (3 K[4]+2) \int _1^{K[4]}\exp \left (-2 \int _1^{K[3]}\frac {3 K[1]+2}{2 K[1]+2}dK[1]\right )dK[3]}{K[4]+1}dK[4]+\int _1^x\exp \left (-2 \int _1^{K[3]}\frac {3 K[1]+2}{2 K[1]+2}dK[1]\right )dK[3] \left (\int _1^x\frac {\exp \left (3 K[5]+\int _1^{K[5]}\frac {3 K[1]+2}{2 K[1]+2}dK[1]+\frac {1}{2} \int _1^{K[5]}\left (-3-\frac {1}{K[2]+1}\right )dK[2]\right ) (3 K[5]+2)}{K[5]+1}dK[5]+c_2\right )+c_1\right ) \end{align*}
Sympy
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq((x + 1)*Derivative(y(x), (x, 2)) - (3*x + 2)*exp(3*x) - (3*x + 4)*Derivative(y(x), x) + 3*y(x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
NotImplementedError : The given ODE Derivative(y(x), x) - (-3*x*exp(3*x) + x*Derivative(y(x), (x, 2)) + 3*y(x) - 2*exp(3*x) + Derivative(y(x), (x, 2)))/(3*x + 4) cannot be solved by the factorable group method