60.1.5 problem 5

Internal problem ID [10019]
Book : Differential Gleichungen, E. Kamke, 3rd ed. Chelsea Pub. NY, 1948
Section : Chapter 1, linear first order
Problem number : 5
Date solved : Wednesday, March 05, 2025 at 08:04:24 AM
CAS classification : [_linear]

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

Maple. Time used: 0.001 (sec). Leaf size: 21
ode:=diff(y(x),x)+y(x)*cos(x)-exp(2*x) = 0; 
dsolve(ode,y(x), singsol=all);
 
\[ y = \left (\int {\mathrm e}^{\sin \left (x \right )+2 x}d x +c_{1} \right ) {\mathrm e}^{-\sin \left (x \right )} \]
Mathematica. Time used: 0.066 (sec). Leaf size: 52
ode=D[y[x],x] + y[x]*Cos[x] - Exp[2*x]==0; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ y(x)\to \exp \left (\int _1^x-\cos (K[1])dK[1]\right ) \left (\int _1^x\exp \left (2 K[2]-\int _1^{K[2]}-\cos (K[1])dK[1]\right )dK[2]+c_1\right ) \]
Sympy. Time used: 6.810 (sec). Leaf size: 19
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(y(x)*cos(x) - exp(2*x) + Derivative(y(x), x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ \int \left (y{\left (x \right )} \cos {\left (x \right )} - e^{2 x}\right ) e^{\sin {\left (x \right )}}\, dx = C_{1} \]