7.4.17 problem 17

Internal problem ID [89]
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 : 17
Date solved : Friday, February 07, 2025 at 07:48:57 AM
CAS classification : [_linear]

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

With initial conditions

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

Solution by Maple

Time used: 0.010 (sec). Leaf size: 14

dsolve([(1+x)*diff(y(x),x)+y(x)=cos(x),y(0) = 1],y(x), singsol=all)
 
\[ y = \frac {\sin \left (x \right )+1}{x +1} \]

Solution by Mathematica

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

DSolve[{(1+x)*D[y[x],x]+y[x]==Cos[x],{y[0]==1}},y[x],x,IncludeSingularSolutions -> True]
 
\[ y(x)\to \frac {\sin (x)+1}{x+1} \]