7.2.20 problem 22

Internal problem ID [38]
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 : 22
Date solved : Friday, February 07, 2025 at 08:12:38 AM
CAS classification : [[_linear, `class A`]]

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

With initial conditions

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

Solution by Maple

Time used: 0.009 (sec). Leaf size: 13

dsolve([diff(y(x),x)=y(x)-x,y(4) = 0],y(x), singsol=all)
 
\[ y = -5 \,{\mathrm e}^{-4+x}+x +1 \]

Solution by Mathematica

Time used: 0.022 (sec). Leaf size: 15

DSolve[{D[y[x],x]==y[x]-x,{y[4]==0}},y[x],x,IncludeSingularSolutions -> True]
 
\[ y(x)\to x-5 e^{x-4}+1 \]