84.32.9 problem 19.20 (b)

Internal problem ID [22317]
Book : Schaums outline series. Differential Equations By Richard Bronson. 1973. McGraw-Hill Inc. ISBN 0-07-008009-7
Section : Chapter 19. Power series solutions about an ordinary point. Supplementary problems
Problem number : 19.20 (b)
Date solved : Thursday, October 02, 2025 at 08:37:26 PM
CAS classification : [[_2nd_order, _with_linear_symmetries]]

\begin{align*} y^{\prime \prime }-2 y x&=x^{2} \end{align*}

Using series method with expansion around

\begin{align*} 1 \end{align*}

With initial conditions

\begin{align*} y \left (1\right )&=0 \\ y^{\prime }\left (1\right )&=2 \\ \end{align*}
Maple. Time used: 0.002 (sec). Leaf size: 18
Order:=6; 
ode:=diff(diff(y(x),x),x)-2*x*y(x) = x^2; 
ic:=[y(1) = 0, D(y)(1) = 2]; 
dsolve([ode,op(ic)],y(x),type='series',x=1);
 
\[ y = 2 \left (x -1\right )+\frac {1}{2} \left (x -1\right )^{2}+\left (x -1\right )^{3}+\frac {1}{2} \left (x -1\right )^{4}+\frac {3}{20} \left (x -1\right )^{5}+\operatorname {O}\left (\left (x -1\right )^{6}\right ) \]
Mathematica. Time used: 0.007 (sec). Leaf size: 41
ode=D[y[x],{x,2}]-2*x*y[x]==x^2; 
ic={y[1]==0,Derivative[1][y][1] ==2}; 
AsymptoticDSolveValue[{ode,ic},y[x],{x,1,5}]
 
\[ y(x)\to \frac {3}{20} (x-1)^5+\frac {1}{2} (x-1)^4+(x-1)^3+\frac {1}{2} (x-1)^2+2 (x-1) \]
Sympy
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(-x**2 - 2*x*y(x) + Derivative(y(x), (x, 2)),0) 
ics = {y(1): 0, Subs(Derivative(y(x), x), x, 1): 2} 
dsolve(ode,func=y(x),ics=ics,hint="2nd_power_series_regular",x0=1,n=6)
 
ValueError : ODE -x**2 - 2*x*y(x) + Derivative(y(x), (x, 2)) does not match hint 2nd_power_series_regular