30.14.13 problem 13

Internal problem ID [7662]
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 : 13
Date solved : Tuesday, September 30, 2025 at 04:55:37 PM
CAS classification : [_separable]

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

Using series method with expansion around

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

With initial conditions

\begin{align*} x \left (0\right )&=1 \\ \end{align*}
Maple. Time used: 0.007 (sec). Leaf size: 14
Order:=6; 
ode:=diff(x(t),t)+sin(t)*x(t) = 0; 
ic:=[x(0) = 1]; 
dsolve([ode,op(ic)],x(t),type='series',t=0);
 
\[ x = 1-\frac {1}{2} t^{2}+\frac {1}{6} t^{4}+\operatorname {O}\left (t^{6}\right ) \]
Mathematica. Time used: 0.001 (sec). Leaf size: 19
ode=D[x[t],t]+Sin[t]*x[t]==0; 
ic={x[0]==1}; 
AsymptoticDSolveValue[{ode,ic},x[t],{t,0,5}]
 
\[ x(t)\to \frac {t^4}{6}-\frac {t^2}{2}+1 \]
Sympy. Time used: 1.089 (sec). Leaf size: 17
from sympy import * 
t = symbols("t") 
x = Function("x") 
ode = Eq(x(t)*sin(t) + Derivative(x(t), t),0) 
ics = {x(0): 1} 
dsolve(ode,func=x(t),ics=ics,hint="1st_power_series",x0=0,n=6)
 
\[ x{\left (t \right )} = 1 - \frac {t^{2}}{2} + \frac {t^{4}}{6} + O\left (t^{6}\right ) \]