71.9.3 problem 3

Internal problem ID [14403]
Book : Ordinary Differential Equations by Charles E. Roberts, Jr. CRC Press. 2010
Section : Chapter 4. N-th Order Linear Differential Equations. Exercises 4.1, page 186
Problem number : 3
Date solved : Saturday, February 22, 2025 at 03:47:12 PM
CAS classification : [[_2nd_order, _missing_y]]

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

With initial conditions

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

Maple. Time used: 0.015 (sec). Leaf size: 11
ode:=x*(x-3)*diff(diff(y(x),x),x)+3*diff(y(x),x) = x^2; 
ic:=y(1) = 0, D(y)(1) = 1; 
dsolve([ode,ic],y(x), singsol=all);
 
\[ y = \frac {x^{2}}{2}-\frac {1}{2} \]
Mathematica. Time used: 3.703 (sec). Leaf size: 78
ode=x*(x-3)*D[y[x],{x,2}]+3*D[y[x],x]==x^2; 
ic={y[1]==0,Derivative[1][y][1]==1}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ y(x)\to \int _1^x\exp \left (\int _1^{K[3]}-\frac {3}{(K[1]-3) K[1]}dK[1]\right ) \left (\int _1^{K[3]}\frac {\exp \left (-\int _1^{K[2]}-\frac {3}{(K[1]-3) K[1]}dK[1]\right ) K[2]}{K[2]-3}dK[2]+1\right )dK[3] \]
Sympy
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(-x**2 + x*(x - 3)*Derivative(y(x), (x, 2)) + 3*Derivative(y(x), x),0) 
ics = {y(1): 0, Subs(Derivative(y(x), x), x, 1): 1} 
dsolve(ode,func=y(x),ics=ics)
 
Timed Out