75.20.12 problem 647

Internal problem ID [17075]
Book : A book of problems in ordinary differential equations. M.L. KRASNOV, A.L. KISELYOV, G.I. MARKARENKO. MIR, MOSCOW. 1983
Section : Chapter 2 (Higher order ODEs). Section 15.5 Linear equations with variable coefficients. The Lagrange method. Exercises page 148
Problem number : 647
Date solved : Monday, March 31, 2025 at 03:40:00 PM
CAS classification : [[_2nd_order, _with_linear_symmetries]]

\begin{align*} y^{\prime \prime }-y^{\prime }+{\mathrm e}^{2 x} y&=x \,{\mathrm e}^{2 x}-1 \end{align*}

Using reduction of order method given that one solution is

\begin{align*} y&=\sin \left ({\mathrm e}^{x}\right ) \end{align*}

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