66.1.7 problem Problem 7

Internal problem ID [13783]
Book : Differential equations and the calculus of variations by L. ElSGOLTS. MIR PUBLISHERS, MOSCOW, Third printing 1977.
Section : Chapter 1, First-Order Differential Equations. Problems page 88
Problem number : Problem 7
Date solved : Monday, March 31, 2025 at 08:11:43 AM
CAS classification : [_linear]

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

Maple. Time used: 0.001 (sec). Leaf size: 11
ode:=y(x)*sin(x)+diff(y(x),x)*cos(x) = 1; 
dsolve(ode,y(x), singsol=all);
 
\[ y = \cos \left (x \right ) c_1 +\sin \left (x \right ) \]
Mathematica. Time used: 0.034 (sec). Leaf size: 13
ode=y[x]*Sin[x]+D[y[x],x]*Cos[x]==1; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ y(x)\to \sin (x)+c_1 \cos (x) \]
Sympy. Time used: 0.650 (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 )} \]