28.6.14 problem 18

Internal problem ID [7223]
Book : A treatise on ordinary and partial differential equations by William Woolsey Johnson. 1913
Section : Chapter IX, Special forms of differential equations. Examples XVII. page 247
Problem number : 18
Date solved : Tuesday, September 30, 2025 at 04:25:43 PM
CAS classification : [[_2nd_order, _with_linear_symmetries]]

\begin{align*} y^{\prime \prime }+{\mathrm e}^{2 x} y&=n^{2} y \end{align*}
Maple. Time used: 0.007 (sec). Leaf size: 17
ode:=diff(diff(y(x),x),x)+exp(2*x)*y(x) = n^2*y(x); 
dsolve(ode,y(x), singsol=all);
 
\[ y = c_1 \operatorname {BesselJ}\left (n , {\mathrm e}^{x}\right )+c_2 \operatorname {BesselY}\left (n , {\mathrm e}^{x}\right ) \]
Mathematica. Time used: 0.026 (sec). Leaf size: 46
ode=D[y[x],{x,2}]+Exp[2*x]*y[x]==n^2*y[x]; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)&\to c_1 \operatorname {Gamma}(1-n) \operatorname {BesselJ}\left (-n,\sqrt {e^{2 x}}\right )+c_2 \operatorname {Gamma}(n+1) \operatorname {BesselJ}\left (n,\sqrt {e^{2 x}}\right ) \end{align*}
Sympy
from sympy import * 
x = symbols("x") 
n = symbols("n") 
y = Function("y") 
ode = Eq(-n**2*y(x) + y(x)*exp(2*x) + Derivative(y(x), (x, 2)),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
False