83.49.12 problem Ex 12 page 128

Internal problem ID [19546]
Book : A Text book for differentional equations for postgraduate students by Ray and Chaturvedi. First edition, 1958. BHASKAR press. INDIA
Section : Book Solved Excercises. Chapter VIII. Linear equations of second order
Problem number : Ex 12 page 128
Date solved : Thursday, March 13, 2025 at 02:48:49 PM
CAS classification : [[_2nd_order, _linear, _nonhomogeneous]]

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

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