47.1.3 problem 3

Internal problem ID [7384]
Book : Ordinary differential equations and calculus of variations. Makarets and Reshetnyak. Wold Scientific. Singapore. 1995
Section : Chapter 1. First order differential equations. Section 1.1 Separable equations problems. page 7
Problem number : 3
Date solved : Sunday, March 30, 2025 at 11:56:09 AM
CAS classification : [_separable]

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

Maple. Time used: 0.001 (sec). Leaf size: 11
ode:=diff(y(x),x) = sin(x)*y(x); 
dsolve(ode,y(x), singsol=all);
 
\[ y = c_1 \,{\mathrm e}^{-\cos \left (x \right )} \]
Mathematica. Time used: 0.031 (sec). Leaf size: 19
ode=D[y[x],x]==y[x]*Sin[x]; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)\to c_1 e^{-\cos (x)} \\ y(x)\to 0 \\ \end{align*}
Sympy. Time used: 0.271 (sec). Leaf size: 8
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(-y(x)*sin(x) + Derivative(y(x), x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = C_{1} e^{- \cos {\left (x \right )}} \]