12.10.28 problem 28

Internal problem ID [1832]
Book : Elementary differential equations with boundary value problems. William F. Trench. Brooks/Cole 2001
Section : Chapter 5 linear second order equations. Section 5.7 Variation of Parameters. Page 262
Problem number : 28
Date solved : Monday, January 27, 2025 at 05:36:45 AM
CAS classification : [[_2nd_order, _with_linear_symmetries]]

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

Solution by Maple

Time used: 0.007 (sec). Leaf size: 19

dsolve((x-1)*diff(y(x),x$2)-x*diff(y(x),x)+y(x)=2*(x-1)^2*exp(x),y(x), singsol=all)
 
\[ y = \left (x^{2}+c_1 -2 x \right ) {\mathrm e}^{x}+c_2 x \]

Solution by Mathematica

Time used: 0.039 (sec). Leaf size: 24

DSolve[(x-1)*D[y[x],{x,2}]-x*D[y[x],x]+y[x]==2*(x-1)^2*Exp[x],y[x],x,IncludeSingularSolutions -> True]
 
\[ y(x)\to e^x \left (x^2-2 x+c_1\right )-c_2 x \]