7.2.1 problem 1

Internal problem ID [19]
Book : Elementary Differential Equations. By C. Henry Edwards, David E. Penney and David Calvis. 6th edition. 2008
Section : Chapter 1. First order differential equations. Section 1.3. Problems at page 27
Problem number : 1
Date solved : Friday, February 07, 2025 at 08:12:01 AM
CAS classification : [[_linear, `class A`]]

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

Solution by Maple

Time used: 0.001 (sec). Leaf size: 19

dsolve(diff(y(x),x)=-y(x)-sin(x),y(x), singsol=all)
 
\[ y = -\frac {\sin \left (x \right )}{2}+\frac {\cos \left (x \right )}{2}+c_1 \,{\mathrm e}^{-x} \]

Solution by Mathematica

Time used: 0.049 (sec). Leaf size: 25

DSolve[D[y[x],x]==-y[x]-Sin[x],y[x],x,IncludeSingularSolutions -> True]
 
\[ y(x)\to \frac {1}{2} \left (-\sin (x)+\cos (x)+2 c_1 e^{-x}\right ) \]