40.13.6 problem 26

Internal problem ID [6760]
Book : Schaums Outline. Theory and problems of Differential Equations, 1st edition. Frank Ayres. McGraw Hill 1952
Section : Chapter 18. Linear equations with variable coefficients (Equations of second order). Supplemetary problems. Page 120
Problem number : 26
Date solved : Sunday, March 30, 2025 at 11:21:43 AM
CAS classification : [[_2nd_order, _linear, _nonhomogeneous]]

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

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