82.2.19 problem 24-20

Internal problem ID [21780]
Book : The Differential Equations Problem Solver. VOL. II. M. Fogiel director. REA, NY. 1978. ISBN 78-63609
Section : Chapter 24. Power series about an ordinary point. Page 719
Problem number : 24-20
Date solved : Thursday, October 02, 2025 at 08:02:04 PM
CAS classification : [[_2nd_order, _with_linear_symmetries]]

\begin{align*} \cos \left (x \right ) u^{\prime \prime }+\sin \left (x \right ) u^{\prime }+\left (\cos \left (x \right )+\sin \left (x \right )\right ) u&=0 \end{align*}

Using series method with expansion around

\begin{align*} \frac {\pi }{4} \end{align*}

With initial conditions

\begin{align*} u \left (\frac {\pi }{4}\right )&=2 \\ u^{\prime }\left (\frac {\pi }{4}\right )&=0 \\ \end{align*}
Maple. Time used: 0.003 (sec). Leaf size: 16
Order:=6; 
ode:=cos(x)*diff(diff(u(x),x),x)+sin(x)*diff(u(x),x)+(cos(x)+sin(x))*u(x) = 0; 
ic:=[u(1/4*Pi) = 2, D(u)(1/4*Pi) = 0]; 
dsolve([ode,op(ic)],u(x),type='series',x=1/4*Pi);
 
\[ u = 2-2 \left (x -\frac {\pi }{4}\right )^{2}+\frac {2}{3} \left (x -\frac {\pi }{4}\right )^{4}+\frac {1}{5} \left (x -\frac {\pi }{4}\right )^{5}+\operatorname {O}\left (\left (x -\frac {\pi }{4}\right )^{6}\right ) \]
Mathematica. Time used: 0.005 (sec). Leaf size: 42
ode=Cos[x]*D[u[x],{x,2}]+Sin[x]*D[u[x],x]+(Cos[x]+Sin[x])*u[x]==0; 
ic={u[Pi/4]==2,Derivative[1][u][Pi/4] ==0}; 
AsymptoticDSolveValue[{ode,ic},u[x],{x,Pi/4,5}]
 
\[ u(x)\to \frac {1}{5} \left (x-\frac {\pi }{4}\right )^5+\frac {2}{3} \left (x-\frac {\pi }{4}\right )^4-2 \left (x-\frac {\pi }{4}\right )^2+2 \]
Sympy
from sympy import * 
x = symbols("x") 
u = Function("u") 
ode = Eq((sin(x) + cos(x))*u(x) + sin(x)*Derivative(u(x), x) + cos(x)*Derivative(u(x), (x, 2)),0) 
ics = {u(pi/4): 2, Subs(Derivative(u(x), x), x, pi/4): 0} 
dsolve(ode,func=u(x),ics=ics,hint="2nd_power_series_ordinary",x0=pi/4,n=6)
 
Timed Out