20.9.15 problem Problem 15

Internal problem ID [3759]
Book : Differential equations and linear algebra, Stephen W. Goode and Scott A Annin. Fourth edition, 2015
Section : Chapter 8, Linear differential equations of order n. Section 8.7, The Variation of Parameters Method. page 556
Problem number : Problem 15
Date solved : Sunday, March 30, 2025 at 02:07:33 AM
CAS classification : [[_2nd_order, _linear, _nonhomogeneous]]

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

Maple. Time used: 0.008 (sec). Leaf size: 49
ode:=diff(diff(y(x),x),x)+2*diff(y(x),x)+y(x) = exp(-x)/(-x^2+4)^(1/2); 
dsolve(ode,y(x), singsol=all);
 
\[ y = -\frac {\left (\left (-c_1 x -\arcsin \left (\frac {x}{2}\right ) x -c_2 \right ) \sqrt {-x^{2}+4}+x^{2}-4\right ) {\mathrm e}^{-x}}{\sqrt {-x^{2}+4}} \]
Mathematica. Time used: 0.041 (sec). Leaf size: 45
ode=D[y[x],{x,2}]+2*D[y[x],x]+y[x]==Exp[-x]/Sqrt[4-x^2]; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ y(x)\to e^{-x} \left (x \arctan \left (\frac {x}{\sqrt {4-x^2}}\right )+\sqrt {4-x^2}+c_2 x+c_1\right ) \]
Sympy. Time used: 0.318 (sec). Leaf size: 24
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(y(x) + 2*Derivative(y(x), x) + Derivative(y(x), (x, 2)) - exp(-x)/sqrt(4 - x**2),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = \left (C_{1} + x \left (C_{2} + \operatorname {asin}{\left (\frac {x}{2} \right )}\right ) + \sqrt {4 - x^{2}}\right ) e^{- x} \]