67.2.32 problem Problem 5(f)

Internal problem ID [13918]
Book : APPLIED DIFFERENTIAL EQUATIONS The Primary Course by Vladimir A. Dobrushkin. CRC Press 2015
Section : Chapter 4, Second and Higher Order Linear Differential Equations. Problems page 221
Problem number : Problem 5(f)
Date solved : Monday, March 31, 2025 at 08:18:04 AM
CAS classification : [[_2nd_order, _linear, _nonhomogeneous]]

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

With initial conditions

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

Maple. Time used: 0.706 (sec). Leaf size: 486
ode:=diff(diff(y(x),x),x)-(x-1)*diff(y(x),x)+x^2*y(x) = tan(x); 
ic:=y(0) = 0, D(y)(0) = 0; 
dsolve([ode,ic],y(x), singsol=all);
 
\[ \text {Expression too large to display} \]
Mathematica. Time used: 26.778 (sec). Leaf size: 4228
ode=D[y[x],{x,2}]-(x-1)*D[y[x],x]+x^2*y[x]==Tan[x]; 
ic={y[0]==0,Derivative[1][y][0] ==1}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 

Too large to display

Sympy
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(x**2*y(x) - (x - 1)*Derivative(y(x), x) - tan(x) + Derivative(y(x), (x, 2)),0) 
ics = {y(0): 0, Subs(Derivative(y(x), x), x, 0): 0} 
dsolve(ode,func=y(x),ics=ics)
 
NotImplementedError : The given ODE Derivative(y(x), x) - (x**2*y(x) - tan(x) + Derivative(y(x), (x, 2)))/(x - 1) cannot be solved by the factorable group method