44.5.34 problem 34

Internal problem ID [7096]
Book : A First Course in Differential Equations with Modeling Applications by Dennis G. Zill. 12 ed. Metric version. 2024. Cengage learning.
Section : Chapter 2. First order differential equations. Section 2.2 Separable equations. Exercises 2.2 at page 53
Problem number : 34
Date solved : Sunday, March 30, 2025 at 11:41:59 AM
CAS classification : [_separable]

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

With initial conditions

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

Maple. Time used: 0.232 (sec). Leaf size: 56
ode:=diff(y(x),x) = exp(-2*y(x))*sin(x)/(x^2+1); 
ic:=y(0) = 0; 
dsolve([ode,ic],y(x), singsol=all);
 
\[ y = \frac {\ln \left (-i \operatorname {Si}\left (x -i\right ) \cosh \left (1\right )+i \cosh \left (1\right ) \operatorname {Si}\left (x +i\right )+i \pi \sinh \left (1\right )-2 i \operatorname {Si}\left (i\right ) \cosh \left (1\right )+\operatorname {Ci}\left (x +i\right ) \sinh \left (1\right )+\operatorname {Ci}\left (x -i\right ) \sinh \left (1\right )-2 \,\operatorname {Ci}\left (i\right ) \sinh \left (1\right )+1\right )}{2} \]
Mathematica. Time used: 1.119 (sec). Leaf size: 123
ode=D[y[x],x]==Exp[-2*y[x]]*Sin[x]/(1+x^2); 
ic={y[0]==0}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ y(x)\to \frac {1}{2} \log \left (\frac {\left (e^2-1\right ) \operatorname {CosIntegral}(i-x)+\left (e^2-1\right ) \operatorname {CosIntegral}(x+i)-2 e^2 \operatorname {CosIntegral}(i)+2 \operatorname {CosIntegral}(i)+2 e^2 \text {Shi}(1)+2 \text {Shi}(1)+i e^2 \text {Si}(i-x)+i \text {Si}(i-x)+i e^2 \text {Si}(x+i)+i \text {Si}(x+i)+2 e}{2 e}\right ) \]
Sympy. Time used: 6.947 (sec). Leaf size: 31
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(Derivative(y(x), x) - exp(-2*y(x))*sin(x)/(x**2 + 1),0) 
ics = {y(0): 0} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = \frac {\log {\left (2 \int \frac {\sin {\left (x \right )}}{x^{2} + 1}\, dx - 2 \int \limits ^{0} \frac {\sin {\left (x \right )}}{x^{2} + 1}\, dx + 1 \right )}}{2} \]