12.17.1 problem section 9.1, problem 2

Internal problem ID [2107]
Book : Elementary differential equations with boundary value problems. William F. Trench. Brooks/Cole 2001
Section : Chapter 9 Introduction to Linear Higher Order Equations. Section 9.1. Page 471
Problem number : section 9.1, problem 2
Date solved : Tuesday, March 04, 2025 at 01:50:23 PM
CAS classification : [[_3rd_order, _exact, _linear, _homogeneous]]

\begin{align*} x^{3} y^{\prime \prime \prime }-x^{2} y^{\prime \prime }-2 x y^{\prime }+6 y&=0 \end{align*}

With initial conditions

\begin{align*} y \left (-1\right )&=-4\\ y^{\prime }\left (-1\right )&=-14\\ y^{\prime \prime }\left (-1\right )&=-20 \end{align*}

Maple. Time used: 0.014 (sec). Leaf size: 20
ode:=x^3*diff(diff(diff(y(x),x),x),x)-x^2*diff(diff(y(x),x),x)-2*x*diff(y(x),x)+6*y(x) = 0; 
ic:=y(-1) = -4, D(y)(-1) = -14, (D@@2)(y)(-1) = -20; 
dsolve([ode,ic],y(x), singsol=all);
 
\[ y = 3 x^{3}+\frac {25}{3 x}+\frac {22 x^{2}}{3} \]
Mathematica. Time used: 0.004 (sec). Leaf size: 24
ode=x^3*D[y[x],{x,3}]-x^2*D[y[x],{x,2}]-2*x*D[y[x],x]+6*y[x]==0; 
ic={y[-1]==-4,Derivative[1][y][-1]==-14,Derivative[2][y][-1]==-20}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ y(x)\to \frac {9 x^4+22 x^3+25}{3 x} \]
Sympy. Time used: 0.216 (sec). Leaf size: 19
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(x**3*Derivative(y(x), (x, 3)) - x**2*Derivative(y(x), (x, 2)) - 2*x*Derivative(y(x), x) + 6*y(x),0) 
ics = {y(-1): -4, Subs(Derivative(y(x), x), x, -1): -14, Subs(Derivative(y(x), (x, 2)), x, -1): -20} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = 3 x^{3} + \frac {22 x^{2}}{3} + \frac {25}{3 x} \]