85.68.3 problem 4

Internal problem ID [22914]
Book : Applied Differential Equations. By Murray R. Spiegel. 3rd edition. 1980. Pearson. ISBN 978-0130400970
Section : Chapter 4. Linear differential equations. B Exercises at page 217
Problem number : 4
Date solved : Thursday, October 02, 2025 at 09:16:33 PM
CAS classification : [[_2nd_order, _with_linear_symmetries]]

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

Using reduction of order method given that one solution is

\begin{align*} y&=\cos \left (x \right ) \end{align*}
Maple. Time used: 0.294 (sec). Leaf size: 41
ode:=diff(diff(y(x),x),x)+cos(x)*diff(y(x),x)+(sin(x)+1)*y(x) = 0; 
dsolve(ode,y(x), singsol=all);
 
\[ y = c_1 \operatorname {HeunC}\left (2, -\frac {1}{2}, -\frac {1}{2}, -3, \frac {7}{8}, \frac {1}{2}+\frac {\sin \left (x \right )}{2}\right )+c_2 \operatorname {HeunC}\left (2, \frac {1}{2}, -\frac {1}{2}, -3, \frac {7}{8}, \frac {1}{2}+\frac {\sin \left (x \right )}{2}\right ) \sin \left (\frac {\pi }{4}+\frac {x}{2}\right ) \]
Mathematica. Time used: 0.656 (sec). Leaf size: 55
ode=D[y[x],{x,2}]+Cos[x]*D[y[x],x]+(1+Sin[x])*y[x]==0; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)&\to \cos (x) \left (c_2 \int _1^{\cos (x)}\frac {e^{-\sqrt {1-K[1]^2}}}{K[1]^2 \sqrt {1-K[1]^2}}dK[1]+c_1\right ) \end{align*}
Sympy
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq((sin(x) + 1)*y(x) + cos(x)*Derivative(y(x), x) + Derivative(y(x), (x, 2)),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
False