40.4.7 problem 19 (h)

Internal problem ID [6647]
Book : Schaums Outline. Theory and problems of Differential Equations, 1st edition. Frank Ayres. McGraw Hill 1952
Section : Chapter 6. Equations of first order and first degree (Linear equations). Supplemetary problems. Page 39
Problem number : 19 (h)
Date solved : Wednesday, March 05, 2025 at 01:34:27 AM
CAS classification : [_exact, [_1st_order, `_with_symmetry_[F(x),G(x)]`], [_Abel, `2nd type`, `class A`]]

\begin{align*} \left (2 s-{\mathrm e}^{2 t}\right ) s^{\prime }&=2 s \,{\mathrm e}^{2 t}-2 \cos \left (2 t \right ) \end{align*}

Maple. Time used: 0.009 (sec). Leaf size: 57
ode:=(2*s(t)-exp(2*t))*diff(s(t),t) = 2*s(t)*exp(2*t)-2*cos(2*t); 
dsolve(ode,s(t), singsol=all);
 
\begin{align*} s &= \frac {{\mathrm e}^{2 t}}{2}-\frac {\sqrt {{\mathrm e}^{4 t}-4 \sin \left (2 t \right )-4 c_1}}{2} \\ s &= \frac {{\mathrm e}^{2 t}}{2}+\frac {\sqrt {{\mathrm e}^{4 t}-4 \sin \left (2 t \right )-4 c_1}}{2} \\ \end{align*}
Mathematica. Time used: 15.62 (sec). Leaf size: 81
ode=(2*s[t]-Exp[2*t])*D[s[t],t]==2*(s[t]*Exp[2*t]-Cos[2*t]); 
ic={}; 
DSolve[{ode,ic},s[t],t,IncludeSingularSolutions->True]
 
\begin{align*} s(t)\to \frac {1}{2} \left (e^{2 t}-i \sqrt {-e^{4 t}+4 \sin (2 t)-4 c_1}\right ) \\ s(t)\to \frac {1}{2} \left (e^{2 t}+i \sqrt {-e^{4 t}+4 \sin (2 t)-4 c_1}\right ) \\ \end{align*}
Sympy
from sympy import * 
t = symbols("t") 
s = Function("s") 
ode = Eq((2*s(t) - exp(2*t))*Derivative(s(t), t) - 2*s(t)*exp(2*t) + 2*cos(2*t),0) 
ics = {} 
dsolve(ode,func=s(t),ics=ics)
 
Timed Out