44.6.17 problem 17

Internal problem ID [7161]
Book : A First Course in Differential Equations with Modeling Applications by Dennis G. Zill. 12 ed. Metric version. 2024. Cengage learning.
Section : Chapter 2. First order differential equations. Section 2.3 Linear equations. Exercises 2.3 at page 63
Problem number : 17
Date solved : Wednesday, March 05, 2025 at 04:19:23 AM
CAS classification : [_linear]

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

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