60.1.8 problem 8

Internal problem ID [10022]
Book : Differential Gleichungen, E. Kamke, 3rd ed. Chelsea Pub. NY, 1948
Section : Chapter 1, linear first order
Problem number : 8
Date solved : Sunday, March 30, 2025 at 02:53:54 PM
CAS classification : [_linear]

\begin{align*} y^{\prime }+y \tan \left (x \right )-\sin \left (2 x \right )&=0 \end{align*}

Maple. Time used: 0.001 (sec). Leaf size: 13
ode:=diff(y(x),x)+y(x)*tan(x)-sin(2*x) = 0; 
dsolve(ode,y(x), singsol=all);
 
\[ y = \left (-2 \cos \left (x \right )+c_1 \right ) \cos \left (x \right ) \]
Mathematica. Time used: 0.043 (sec). Leaf size: 23
ode=D[y[x],x]+ y[x]*Tan[x] - Sin[2*x]==0; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ y(x)\to \cos (x) \left (\int _1^x2 \sin (K[1])dK[1]+c_1\right ) \]
Sympy. Time used: 0.553 (sec). Leaf size: 12
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(y(x)*tan(x) - sin(2*x) + Derivative(y(x), x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = \left (C_{1} - 2 \cos {\left (x \right )}\right ) \cos {\left (x \right )} \]