18.2.11 problem Problem 15.22

Internal problem ID [3494]
Book : Mathematical methods for physics and engineering, Riley, Hobson, Bence, second edition, 2002
Section : Chapter 15, Higher order ordinary differential equations. 15.4 Exercises, page 523
Problem number : Problem 15.22
Date solved : Monday, January 27, 2025 at 07:39:41 AM
CAS classification : [[_2nd_order, _exact, _linear, _nonhomogeneous]]

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

Solution by Maple

Time used: 0.003 (sec). Leaf size: 39

dsolve((x+1)^2*diff(y(x),x$2)+3*(x+1)*diff(y(x),x)+y(x)=x^2,y(x), singsol=all)
 
\[ y \left (x \right ) = \frac {\left (18 c_{1} -6\right ) \ln \left (x +1\right )+2 x^{3}-3 x^{2}+6 x +18 c_{2}}{18 x +18} \]

Solution by Mathematica

Time used: 0.048 (sec). Leaf size: 44

DSolve[(x+1)^2*D[y[x],{x,2}]+3*(x+1)*D[y[x],x]+y[x]==x^2,y[x],x,IncludeSingularSolutions -> True]
 
\[ y(x)\to \frac {2 x^3-3 x^2+6 x+6 (-1+3 c_2) \log (x+1)+18 c_1}{18 (x+1)} \]