78.3.3 problem 1.c

Internal problem ID [20999]
Book : A FIRST COURSE IN DIFFERENTIAL EQUATIONS FOR SCIENTISTS AND ENGINEERS. By Russell Herman. University of North Carolina Wilmington. LibreText. compiled on 06/09/2025
Section : Chapter 4, Series solutions. Problems section 4.9
Problem number : 1.c
Date solved : Thursday, October 02, 2025 at 07:01:17 PM
CAS classification : [_separable]

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

Using series method with expansion around

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

With initial conditions

\begin{align*} y \left (0\right )&=1 \\ \end{align*}
Maple. Time used: 0.004 (sec). Leaf size: 51
Order:=5; 
ode:=(1+x)*diff(y(x),x) = p*y(x); 
ic:=[y(0) = 1]; 
dsolve([ode,op(ic)],y(x),type='series',x=0);
 
\[ y = 1+p x +\left (\frac {1}{2} p^{2}-\frac {1}{2} p \right ) x^{2}+\frac {1}{6} p \left (p^{2}-3 p +2\right ) x^{3}+\frac {1}{24} p \left (p^{3}-6 p^{2}+11 p -6\right ) x^{4}+\operatorname {O}\left (x^{5}\right ) \]
Mathematica. Time used: 0.001 (sec). Leaf size: 98
ode=(1+x)*D[y[x],x]==p*y[x]; 
ic={y[0]==1}; 
AsymptoticDSolveValue[{ode,ic},y[x],{x,0,4}]
 
\[ y(x)\to \frac {1}{4} \left (p^2-\frac {1}{2} \left (p^2-p\right ) p+\frac {1}{3} \left (-p^2+\frac {1}{2} \left (p^2-p\right ) p+p\right ) p-p\right ) x^4+\frac {1}{3} \left (-p^2+\frac {1}{2} \left (p^2-p\right ) p+p\right ) x^3+\frac {1}{2} \left (p^2-p\right ) x^2+p x+1 \]
Sympy. Time used: 0.353 (sec). Leaf size: 126
from sympy import * 
x = symbols("x") 
p = symbols("p") 
y = Function("y") 
ode = Eq(-p*y(x) + (x + 1)*Derivative(y(x), x),0) 
ics = {y(0): 1} 
dsolve(ode,func=y(x),ics=ics,hint="1st_power_series",x0=0,n=6)
 
\[ y{\left (x \right )} = 1 + p x + \frac {p x^{2} \left (p - 1\right )}{2} + \frac {p x^{3} \left (p \left (p - 1\right ) - 2 p + 2\right )}{6} + \frac {p x^{4} \left (- 3 p \left (p - 1\right ) + p \left (p \left (p - 1\right ) - 2 p + 2\right ) + 6 p - 6\right )}{24} + \frac {p x^{5} \left (12 p \left (p - 1\right ) - 4 p \left (p \left (p - 1\right ) - 2 p + 2\right ) + p \left (- 3 p \left (p - 1\right ) + p \left (p \left (p - 1\right ) - 2 p + 2\right ) + 6 p - 6\right ) - 24 p + 24\right )}{120} + O\left (x^{6}\right ) \]