49.3.6 problem 2

Internal problem ID [7606]
Book : An introduction to Ordinary Differential Equations. Earl A. Coddington. Dover. NY 1961
Section : Chapter 1. Introduction– Linear equations of First Order. Page 45
Problem number : 2
Date solved : Monday, January 27, 2025 at 03:07:19 PM
CAS classification : [_linear]

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

With initial conditions

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

Solution by Maple

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

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

Solution by Mathematica

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

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