15.22.11 problem 11

Internal problem ID [3345]
Book : Differential Equations by Alfred L. Nelson, Karl W. Folley, Max Coral. 3rd ed. DC heath. Boston. 1964
Section : Exercise 40, page 186
Problem number : 11
Date solved : Sunday, March 30, 2025 at 01:37:31 AM
CAS classification : [[_2nd_order, _with_linear_symmetries]]

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

Using series method with expansion around

\begin{align*} 0 \end{align*}

With initial conditions

\begin{align*} y \left (0\right )&=0\\ y^{\prime }\left (0\right )&=0 \end{align*}

Maple. Time used: 0.005 (sec). Leaf size: 18
Order:=7; 
ode:=diff(diff(y(x),x),x)-2*y(x) = exp(2*x); 
ic:=y(0) = 0, D(y)(0) = 0; 
dsolve([ode,ic],y(x),type='series',x=0);
 
\[ y = \frac {1}{2} x^{2}+\frac {1}{3} x^{3}+\frac {1}{4} x^{4}+\frac {1}{10} x^{5}+\frac {7}{180} x^{6}+\operatorname {O}\left (x^{7}\right ) \]
Mathematica. Time used: 0.013 (sec). Leaf size: 39
ode=D[y[x],{x,2}]-2*y[x]==Exp[2*x]; 
ic={y[0]==0,Derivative[1][y][0] ==0}; 
AsymptoticDSolveValue[{ode,ic},y[x],{x,0,6}]
 
\[ y(x)\to \frac {7 x^6}{180}+\frac {x^5}{10}+\frac {x^4}{4}+\frac {x^3}{3}+\frac {x^2}{2} \]
Sympy
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(-2*y(x) - exp(2*x) + Derivative(y(x), (x, 2)),0) 
ics = {y(0): 0, Subs(Derivative(y(x), x), x, 0): 0} 
dsolve(ode,func=y(x),ics=ics,hint="2nd_power_series_regular",x0=0,n=7)
 
ValueError : ODE -2*y(x) - exp(2*x) + Derivative(y(x), (x, 2)) does not match hint 2nd_power_series_regular