47.4.1 problem 49

Internal problem ID [7478]
Book : Ordinary differential equations and calculus of variations. Makarets and Reshetnyak. Wold Scientific. Singapore. 1995
Section : Chapter 2. Linear homogeneous equations. Section 2.2 problems. page 95
Problem number : 49
Date solved : Wednesday, March 05, 2025 at 04:39:37 AM
CAS classification : [[_2nd_order, _missing_x]]

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

Maple. Time used: 0.000 (sec). Leaf size: 26
ode:=diff(diff(y(x),x),x)+2*diff(y(x),x)-y(x) = 0; 
dsolve(ode,y(x), singsol=all);
 
\[ y = c_{1} {\mathrm e}^{\left (\sqrt {2}-1\right ) x}+c_{2} {\mathrm e}^{-\left (1+\sqrt {2}\right ) x} \]
Mathematica. Time used: 0.02 (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.276 (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 )} \]