76.12.6 problem 6

Internal problem ID [17491]
Book : Differential equations. An introduction to modern methods and applications. James Brannan, William E. Boyce. Third edition. Wiley 2015
Section : Chapter 4. Second order linear equations. Section 4.2 (Theory of second order linear homogeneous equations). Problems at page 226
Problem number : 6
Date solved : Monday, March 31, 2025 at 04:15:39 PM
CAS classification : [[_2nd_order, _with_linear_symmetries]]

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

With initial conditions

\begin{align*} y \left (3\right )&=1\\ y^{\prime }\left (3\right )&=2 \end{align*}

Maple
ode:=(x-2)*diff(diff(y(x),x),x)+diff(y(x),x)+(x-2)*tan(x)*y(x) = 0; 
ic:=y(3) = 1, D(y)(3) = 2; 
dsolve([ode,ic],y(x), singsol=all);
 
\[ \text {No solution found} \]
Mathematica
ode=(x-2)*D[y[x],{x,2}]+D[y[x],x]+(x-2)*Tan[x]*y[x]==0; 
ic={y[3]==1,Derivative[1][y][3]==2}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 

Not solved

Sympy
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq((x - 2)*y(x)*tan(x) + (x - 2)*Derivative(y(x), (x, 2)) + Derivative(y(x), x),0) 
ics = {y(3): 1, Subs(Derivative(y(x), x), x, 3): 2} 
dsolve(ode,func=y(x),ics=ics)
 
ValueError : Couldnt solve for initial conditions