34.10.7 problem 16

Internal problem ID [8016]
Book : Schaums Outline. Theory and problems of Differential Equations, 1st edition. Frank Ayres. McGraw Hill 1952
Section : Chapter 15. Linear equations with constant coefficients (Variation of parameters). Supplemetary problems. Page 98
Problem number : 16
Date solved : Tuesday, September 30, 2025 at 05:14:17 PM
CAS classification : [[_2nd_order, _linear, _nonhomogeneous]]

\begin{align*} y^{\prime \prime }-y&={\mathrm e}^{x} \sin \left (2 x \right ) \end{align*}
Maple. Time used: 0.004 (sec). Leaf size: 30
ode:=diff(diff(y(x),x),x)-y(x) = exp(x)*sin(2*x); 
dsolve(ode,y(x), singsol=all);
 
\[ y = -\frac {{\mathrm e}^{x} \cos \left (2 x \right )}{8}+{\mathrm e}^{-x} c_1 +{\mathrm e}^{x} \left (c_2 -\frac {\sin \left (2 x \right )}{8}\right ) \]
Mathematica. Time used: 0.045 (sec). Leaf size: 58
ode=D[y[x],{x,2}]-y[x]==Exp[x]*Sin[2*x]; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)&\to e^{-x} \int _1^x-e^{2 K[1]} \cos (K[1]) \sin (K[1])dK[1]-\frac {1}{2} e^x \cos ^2(x)+c_1 e^x+c_2 e^{-x} \end{align*}
Sympy. Time used: 0.074 (sec). Leaf size: 26
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(-y(x) - exp(x)*sin(2*x) + Derivative(y(x), (x, 2)),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = C_{2} e^{- x} + \left (C_{1} - \frac {\sin {\left (2 x \right )}}{8} - \frac {\cos {\left (2 x \right )}}{8}\right ) e^{x} \]