6.9.12 problem 12

Internal problem ID [1768]
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 : 12
Date solved : Tuesday, September 30, 2025 at 05:19:11 AM
CAS classification : [[_2nd_order, _linear, _nonhomogeneous]]

\begin{align*} \left (1-2 x \right ) y^{\prime \prime }+2 y^{\prime }+\left (2 x -3\right ) y&=\left (4 x^{2}-4 x +1\right ) {\mathrm e}^{x} \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: 26
ode:=(1-2*x)*diff(diff(y(x),x),x)+2*diff(y(x),x)+(2*x-3)*y(x) = (4*x^2-4*x+1)*exp(x); 
dsolve(ode,y(x), singsol=all);
 
\[ y = {\mathrm e}^{-x} x c_1 -\frac {{\mathrm e}^{x} \left (x^{2}-2 c_2 -x \right )}{2} \]
Mathematica. Time used: 0.146 (sec). Leaf size: 77
ode=(1-2*x)*D[y[x],{x,2}]+2*D[y[x],x]+(2*x-3)*y[x]==(1-4*x+4*x^2)*Exp[x]; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)&\to -\frac {1}{2} e^x (x-1) x-\frac {c_2 e^{\frac {1}{2}-x} \sqrt {1-2 x} x}{\sqrt {2 x-1}}+\frac {c_1 e^{x-\frac {1}{2}} \sqrt {1-2 x}}{\sqrt {2 x-1}} \end{align*}
Sympy
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq((1 - 2*x)*Derivative(y(x), (x, 2)) + (2*x - 3)*y(x) - (4*x**2 - 4*x + 1)*exp(x) + 2*Derivative(y(x), x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
NotImplementedError : The given ODE -2*x**2*exp(x) + x*y(x) + 2*x*exp(x) - x*Derivative(y(x), (x, 2)) - 3*y(x)/2 - exp(x)/2 + Derivative(y(x), x) + Derivative(y(x), (x, 2))/2 cannot be solved by the factorable group method