13.4.8 problem 10

Internal problem ID [2345]
Book : Differential equations and their applications, 3rd ed., M. Braun
Section : Section 1.9. Page 66
Problem number : 10
Date solved : Saturday, March 29, 2025 at 11:57:17 PM
CAS classification : [_exact]

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

With initial conditions

\begin{align*} y \left (0\right )&=0 \end{align*}

Maple. Time used: 0.567 (sec). Leaf size: 36
ode:=2*t-2*exp(t*y(t))*sin(2*t)+exp(t*y(t))*cos(2*t)*y(t)+(-3+exp(t*y(t))*t*cos(2*t))*diff(y(t),t) = 0; 
ic:=y(0) = 0; 
dsolve([ode,ic],y(t), singsol=all);
 
\[ y = \frac {t^{3}-3 \operatorname {LambertW}\left (-\frac {t \cos \left (2 t \right ) {\mathrm e}^{\frac {t \left (t -1\right ) \left (t +1\right )}{3}}}{3}\right )-t}{3 t} \]
Mathematica. Time used: 4.816 (sec). Leaf size: 43
ode=2*t-2*Exp[t*y[t]]*Sin[2*t]+Exp[t*y[t]]*Cos[2*t]*y[t]+(-3+Exp[t*y[t]]*t*Cos[2*t])*D[y[t],t] == 0; 
ic=y[0]==0; 
DSolve[{ode,ic},y[t],t,IncludeSingularSolutions->True]
 
\[ y(t)\to \frac {t^3-3 W\left (-\frac {1}{3} e^{\frac {1}{3} t \left (t^2-1\right )} t \cos (2 t)\right )-t}{3 t} \]
Sympy
from sympy import * 
t = symbols("t") 
y = Function("y") 
ode = Eq(2*t + (t*exp(t*y(t))*cos(2*t) - 3)*Derivative(y(t), t) + y(t)*exp(t*y(t))*cos(2*t) - 2*exp(t*y(t))*sin(2*t),0) 
ics = {y(0): 0} 
dsolve(ode,func=y(t),ics=ics)
 
Timed Out