39.5.9 problem Problem 24.31

Internal problem ID [6551]
Book : Schaums Outline Differential Equations, 4th edition. Bronson and Costa. McGraw Hill 2014
Section : Chapter 24. Solutions of linear DE by Laplace transforms. Supplementary Problems. page 248
Problem number : Problem 24.31
Date solved : Wednesday, March 05, 2025 at 12:56:27 AM
CAS classification : [[_2nd_order, _missing_x]]

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

Using Laplace method With initial conditions

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

Maple. Time used: 0.190 (sec). Leaf size: 31
ode:=diff(diff(y(x),x),x)+diff(y(x),x)+y(x) = 0; 
ic:=y(0) = 4, D(y)(0) = -3; 
dsolve([ode,ic],y(x),method='laplace');
 
\[ y = -\frac {2 \,{\mathrm e}^{-\frac {x}{2}} \left (-6 \cos \left (\frac {\sqrt {3}\, x}{2}\right )+\sqrt {3}\, \sin \left (\frac {\sqrt {3}\, x}{2}\right )\right )}{3} \]
Mathematica. Time used: 0.024 (sec). Leaf size: 47
ode=D[y[x],{x,2}]+D[y[x],x]+y[x]==0; 
ic={y[0]==4,Derivative[1][y][0] ==-3}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ y(x)\to -\frac {2}{3} e^{-x/2} \left (\sqrt {3} \sin \left (\frac {\sqrt {3} x}{2}\right )-6 \cos \left (\frac {\sqrt {3} x}{2}\right )\right ) \]
Sympy. Time used: 0.207 (sec). Leaf size: 37
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(y(x) + Derivative(y(x), x) + Derivative(y(x), (x, 2)),0) 
ics = {y(0): 4, Subs(Derivative(y(x), x), x, 0): -3} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = \left (- \frac {2 \sqrt {3} \sin {\left (\frac {\sqrt {3} x}{2} \right )}}{3} + 4 \cos {\left (\frac {\sqrt {3} x}{2} \right )}\right ) e^{- \frac {x}{2}} \]