32.5.13 problem Exercise 11.14, page 97

Internal problem ID [5851]
Book : Ordinary Differential Equations, By Tenenbaum and Pollard. Dover, NY 1963
Section : Chapter 2. Special types of differential equations of the first kind. Lesson 11, Bernoulli Equations
Problem number : Exercise 11.14, page 97
Date solved : Tuesday, March 04, 2025 at 11:48:23 PM
CAS classification : [_linear]

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

Maple. Time used: 0.002 (sec). Leaf size: 21
ode:=diff(y(x),x)+y(x)*cos(x) = exp(2*x); 
dsolve(ode,y(x), singsol=all);
 
\[ y \left (x \right ) = \left (\int {\mathrm e}^{2 x +\sin \left (x \right )}d x +c_{1} \right ) {\mathrm e}^{-\sin \left (x \right )} \]
Mathematica. Time used: 0.657 (sec). Leaf size: 32
ode=D[y[x],x]+y[x]*Cos[x]==Exp[2*x]; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ y(x)\to e^{-\sin (x)} \left (\int _1^xe^{2 K[1]+\sin (K[1])}dK[1]+c_1\right ) \]
Sympy. Time used: 6.800 (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} \]