32.7.5 problem Exercise 20.6, page 220

Internal problem ID [5920]
Book : Ordinary Differential Equations, By Tenenbaum and Pollard. Dover, NY 1963
Section : Chapter 4. Higher order linear differential equations. Lesson 20. Constant coefficients
Problem number : Exercise 20.6, page 220
Date solved : Sunday, March 30, 2025 at 10:27:21 AM
CAS classification : [[_2nd_order, _missing_x]]

\begin{align*} y^{\prime \prime }+2 y^{\prime }-y&=0 \end{align*}

Maple. Time used: 0.002 (sec). Leaf size: 25
ode:=diff(diff(y(x),x),x)+2*diff(y(x),x)-y(x) = 0; 
dsolve(ode,y(x), singsol=all);
 
\[ y = \left (c_1 \,{\mathrm e}^{2 x \sqrt {2}}+c_2 \right ) {\mathrm e}^{-\left (1+\sqrt {2}\right ) x} \]
Mathematica. Time used: 0.021 (sec). Leaf size: 34
ode=D[y[x],{x,2}]+2*D[y[x],x]-y[x]==0; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ y(x)\to e^{-\left (\left (1+\sqrt {2}\right ) x\right )} \left (c_2 e^{2 \sqrt {2} x}+c_1\right ) \]
Sympy. Time used: 0.175 (sec). Leaf size: 26
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(-y(x) + 2*Derivative(y(x), x) + Derivative(y(x), (x, 2)),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = C_{1} e^{x \left (-1 + \sqrt {2}\right )} + C_{2} e^{- x \left (1 + \sqrt {2}\right )} \]