6.9.1 problem 1

Internal problem ID [1757]
Book : Elementary differential equations with boundary value problems. William F. Trench. Brooks/Cole 2001
Section : Chapter 5 linear second order equations. Section 5.6 Reduction or order. Page 253
Problem number : 1
Date solved : Tuesday, September 30, 2025 at 05:19:06 AM
CAS classification : [[_2nd_order, _with_linear_symmetries]]

\begin{align*} \left (2 x +1\right ) y^{\prime \prime }-2 y^{\prime }-\left (2 x +3\right ) y&=\left (2 x +1\right )^{2} \end{align*}

Using reduction of order method given that one solution is

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