60.1.7 problem 7

Internal problem ID [10021]
Book : Differential Gleichungen, E. Kamke, 3rd ed. Chelsea Pub. NY, 1948
Section : Chapter 1, linear first order
Problem number : 7
Date solved : Wednesday, March 05, 2025 at 08:04:30 AM
CAS classification : [_linear]

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

Maple. Time used: 0.002 (sec). Leaf size: 13
ode:=diff(y(x),x)+y(x)*cos(x)-exp(-sin(x)) = 0; 
dsolve(ode,y(x), singsol=all);
 
\[ y = \left (x +c_{1} \right ) {\mathrm e}^{-\sin \left (x \right )} \]
Mathematica. Time used: 0.153 (sec). Leaf size: 53
ode=D[y[x],x] + y[x]*Cos[x] - Exp[-Sin[x]]==0; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ y(x)\to \exp \left (\int _1^x-\cos (K[1])dK[1]\right ) \left (\int _1^x\exp \left (-\sin (K[2])-\int _1^{K[2]}-\cos (K[1])dK[1]\right )dK[2]+c_1\right ) \]
Sympy. Time used: 0.903 (sec). Leaf size: 10
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(y(x)*cos(x) + Derivative(y(x), x) - exp(-sin(x)),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = \left (C_{1} + x\right ) e^{- \sin {\left (x \right )}} \]