73.9.21 problem 14.2 (k)

Internal problem ID [15203]
Book : Ordinary Differential Equations. An introduction to the fundamentals. Kenneth B. Howell. second edition. CRC Press. FL, USA. 2020
Section : Chapter 14. Higher order equations and the reduction of order method. Additional exercises page 277
Problem number : 14.2 (k)
Date solved : Thursday, March 13, 2025 at 05:49:27 AM
CAS classification : [[_2nd_order, _with_linear_symmetries]]

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

Using reduction of order method given that one solution is

\begin{align*} y&=\sin \left (x \right ) \end{align*}

Maple. Time used: 0.003 (sec). Leaf size: 12
ode:=sin(x)^2*diff(diff(y(x),x),x)-2*cos(x)*sin(x)*diff(y(x),x)+(1+cos(x)^2)*y(x) = 0; 
dsolve(ode,y(x), singsol=all);
 
\[ y = \sin \left (x \right ) \left (c_{2} x +c_{1} \right ) \]
Mathematica. Time used: 0.047 (sec). Leaf size: 15
ode=Sin[x]^2*D[y[x],{x,2}]-2*Cos[x]*Sin[x]*D[y[x],x]+(1+Cos[x]^2)*y[x]==0; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ y(x)\to (c_2 x+c_1) \sin (x) \]
Sympy
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq((cos(x)**2 + 1)*y(x) + sin(x)**2*Derivative(y(x), (x, 2)) - 2*sin(x)*cos(x)*Derivative(y(x), x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
NotImplementedError : The given ODE -(y(x)*cos(x)**2 + y(x) + sin(x)**2*Derivative(y(x), (x, 2)))/(2*sin(x)*cos(x)) + Derivative(y(x), x) cannot be solved by the factorable group method