49.1.5 problem 2 (b)

Internal problem ID [7584]
Book : An introduction to Ordinary Differential Equations. Earl A. Coddington. Dover. NY 1961
Section : Chapter 1.3 Introduction– Linear equations of First Order. Page 38
Problem number : 2 (b)
Date solved : Wednesday, March 05, 2025 at 04:47:02 AM
CAS classification : [_linear]

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

Maple. Time used: 0.002 (sec). Leaf size: 15
ode:=diff(y(x),x)+cos(x)*y(x) = sin(x)*cos(x); 
dsolve(ode,y(x), singsol=all);
 
\[ y = \sin \left (x \right )-1+c_{1} {\mathrm e}^{-\sin \left (x \right )} \]
Mathematica. Time used: 0.046 (sec). Leaf size: 18
ode=D[y[x],x]+Cos[x]*y[x]==Sin[x]*Cos[x]; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ y(x)\to \sin (x)+c_1 e^{-\sin (x)}-1 \]
Sympy. Time used: 0.493 (sec). Leaf size: 14
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(y(x)*cos(x) - sin(x)*cos(x) + Derivative(y(x), x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = C_{1} e^{- \sin {\left (x \right )}} + \sin {\left (x \right )} - 1 \]