74.2.1 problem 6

Internal problem ID [15763]
Book : INTRODUCTORY DIFFERENTIAL EQUATIONS. Martha L. Abell, James P. Braselton. Fourth edition 2014. ElScAe. 2014
Section : Chapter 1. Introduction to Differential Equations. Review exercises, page 23
Problem number : 6
Date solved : Thursday, March 13, 2025 at 06:18:20 AM
CAS classification : [_separable]

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

Maple. Time used: 0.003 (sec). Leaf size: 11
ode:=diff(y(x),x)+cos(x)*y(x) = 0; 
dsolve(ode,y(x), singsol=all);
 
\[ y = c_{1} {\mathrm e}^{-\sin \left (x \right )} \]
Mathematica. Time used: 0.031 (sec). Leaf size: 27
ode=D[y[x],x]+y[x]*Cos[x]==0; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)\to c_1 \exp \left (\int _1^x-\cos (K[1])dK[1]\right ) \\ y(x)\to 0 \\ \end{align*}
Sympy. Time used: 0.234 (sec). Leaf size: 8
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(y(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 )}} \]