81.6.12 problem 12

Internal problem ID [18616]
Book : A short course on differential equations. By Donald Francis Campbell. Maxmillan company. London. 1907
Section : Chapter V. Homogeneous linear differential equations. Exact equations. Exercises at page 69
Problem number : 12
Date solved : Thursday, March 13, 2025 at 12:25:24 PM
CAS classification : [[_2nd_order, _exact, _linear, _nonhomogeneous]]

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

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