75.6.12 problem 12

Internal problem ID [19980]
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, October 02, 2025 at 05:04:44 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.002 (sec). Leaf size: 23
ode:=(3*x^2+x)*diff(diff(y(x),x),x)+2*(1+6*x)*diff(y(x),x)+6*y(x) = sin(x); 
dsolve(ode,y(x), singsol=all);
 
\[ y = \frac {c_2 +c_1 x -\sin \left (x \right )}{3 x^{2}+x} \]
Mathematica. Time used: 0.034 (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]
 
\begin{align*} y(x)&\to \frac {-\sin (x)+c_2 x+c_1}{3 x^2+x} \end{align*}
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