40.13.14 problem 35

Internal problem ID [6768]
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 : Sunday, March 30, 2025 at 11:22:06 AM
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.542 (sec). Leaf size: 48
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]
 
\[ y(x)\to e^{3 x} \left (x+\frac {2}{3}\right )+\frac {c_1 e^{3 x+3}}{\sqrt {2}}-\frac {1}{9} \sqrt {2} c_2 (3 x+4) \]
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