36.1.29 problem 27 part(c)

Internal problem ID [6284]
Book : Fundamentals of Differential Equations. By Nagle, Saff and Snider. 9th edition. Boston. Pearson 2018.
Section : Chapter 2, First order differential equations. Section 2.2, Separable Equations. Exercises. page 46
Problem number : 27 part(c)
Date solved : Wednesday, March 05, 2025 at 12:31:03 AM
CAS classification : [_separable]

\begin{align*} y^{\prime }&=\sqrt {1+\sin \left (x \right )}\, \left (1+y^{2}\right ) \end{align*}

With initial conditions

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

Maple. Time used: 0.319 (sec). Leaf size: 37
ode:=diff(y(x),x) = (sin(x)+1)^(1/2)*(1+y(x)^2); 
ic:=y(0) = 1; 
dsolve([ode,ic],y(x), singsol=all);
 
\[ y = \tan \left (\sqrt {2}\, \left (\int _{0}^{x}\operatorname {csgn}\left (\sin \left (\frac {\pi }{4}+\frac {\textit {\_z1}}{2}\right )\right ) \sin \left (\frac {\pi }{4}+\frac {\textit {\_z1}}{2}\right )d \textit {\_z1} \right )+\frac {\pi }{4}\right ) \]
Mathematica. Time used: 0.394 (sec). Leaf size: 29
ode=D[y[x],x]==Sqrt[1+Sin[x]]*(1+y[x]^2); 
ic={y[0]==1}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ y(x)\to \tan \left (\frac {1}{4} \left (8 \sin \left (\frac {x}{2}\right )-8 \cos \left (\frac {x}{2}\right )+\pi +8\right )\right ) \]
Sympy. Time used: 1.756 (sec). Leaf size: 27
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq((-y(x)**2 - 1)*sqrt(sin(x) + 1) + Derivative(y(x), x),0) 
ics = {y(0): 1} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = \tan {\left (\int \sqrt {\sin {\left (x \right )} + 1}\, dx - \int \limits ^{0} \sqrt {\sin {\left (x \right )} + 1}\, dx + \frac {\pi }{4} \right )} \]