7.4.16 problem 16

Internal problem ID [88]
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.5 (linear equations). Problems at page 54
Problem number : 16
Date solved : Friday, February 07, 2025 at 07:48:55 AM
CAS classification : [_separable]

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

With initial conditions

\begin{align*} y \left (\pi \right )&=2 \end{align*}

Solution by Maple

Time used: 0.007 (sec). Leaf size: 11

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

Solution by Mathematica

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

DSolve[{D[y[x],x]==(1-y[x])*Cos[x],{y[Pi]==2}},y[x],x,IncludeSingularSolutions -> True]
 
\[ y(x)\to e^{-\sin (x)}+1 \]