36.6.20 problem 23

Internal problem ID [6381]
Book : Fundamentals of Differential Equations. By Nagle, Saff and Snider. 9th edition. Boston. Pearson 2018.
Section : Chapter 8, Series solutions of differential equations. Section 8.4. page 449
Problem number : 23
Date solved : Monday, January 27, 2025 at 01:58:32 PM
CAS classification : [[_2nd_order, _exact, _linear, _nonhomogeneous]]

\begin{align*} z^{\prime \prime }+x z^{\prime }+z&=x^{2}+2 x +1 \end{align*}

Using series method with expansion around

\begin{align*} 0 \end{align*}

Solution by Maple

Time used: 0.001 (sec). Leaf size: 59

Order:=6; 
dsolve(diff(z(x),x$2)+x*diff(z(x),x)+z(x)=x^2+2*x+1,z(x),type='series',x=0);
 
\[ z = \left (1-\frac {1}{2} x^{2}+\frac {1}{8} x^{4}\right ) z \left (0\right )+\left (x -\frac {1}{3} x^{3}+\frac {1}{15} x^{5}\right ) z^{\prime }\left (0\right )+\frac {x^{2}}{2}+\frac {x^{3}}{3}-\frac {x^{4}}{24}-\frac {x^{5}}{15}+O\left (x^{6}\right ) \]

Solution by Mathematica

Time used: 0.014 (sec). Leaf size: 70

AsymptoticDSolveValue[D[z[x],{x,2}]+x*D[z[x],x]+z[x]==x^2+2*x+1,z[x],{x,0,"6"-1}]
 
\[ z(x)\to -\frac {x^5}{15}-\frac {x^4}{24}+\frac {x^3}{3}+\frac {x^2}{2}+c_2 \left (\frac {x^5}{15}-\frac {x^3}{3}+x\right )+c_1 \left (\frac {x^4}{8}-\frac {x^2}{2}+1\right ) \]