75.16.60 problem 533

Internal problem ID [16962]
Book : A book of problems in ordinary differential equations. M.L. KRASNOV, A.L. KISELYOV, G.I. MARKARENKO. MIR, MOSCOW. 1983
Section : Chapter 2 (Higher order ODEs). Section 15.3 Nonhomogeneous linear equations with constant coefficients. Trial and error method. Exercises page 132
Problem number : 533
Date solved : Monday, March 31, 2025 at 03:36:33 PM
CAS classification : [[_2nd_order, _missing_y]]

\begin{align*} y^{\prime \prime }-y^{\prime }&={\mathrm e}^{x} \sin \left (x \right ) \end{align*}

Maple. Time used: 0.001 (sec). Leaf size: 22
ode:=diff(diff(y(x),x),x)-diff(y(x),x) = exp(x)*sin(x); 
dsolve(ode,y(x), singsol=all);
 
\[ y = \frac {\left (2 c_1 -\cos \left (x \right )-\sin \left (x \right )\right ) {\mathrm e}^{x}}{2}+c_2 \]
Mathematica. Time used: 7.627 (sec). Leaf size: 34
ode=D[y[x],{x,2}]-D[y[x],x]==Exp[x]*Sin[x]; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ y(x)\to \int _1^xe^{K[2]} \left (c_1+\int _1^{K[2]}\sin (K[1])dK[1]\right )dK[2]+c_2 \]
Sympy. Time used: 0.195 (sec). Leaf size: 19
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(-exp(x)*sin(x) - Derivative(y(x), x) + Derivative(y(x), (x, 2)),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = C_{1} + \left (C_{2} - \frac {\sin {\left (x \right )}}{2} - \frac {\cos {\left (x \right )}}{2}\right ) e^{x} \]