20.4.39 problem Problem 56

Internal problem ID [3674]
Book : Differential equations and linear algebra, Stephen W. Goode and Scott A Annin. Fourth edition, 2015
Section : Chapter 1, First-Order Differential Equations. Section 1.8, Change of Variables. page 79
Problem number : Problem 56
Date solved : Sunday, March 30, 2025 at 02:04:20 AM
CAS classification : [[_homogeneous, `class C`], _dAlembert]

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

Maple. Time used: 0.014 (sec). Leaf size: 17
ode:=diff(y(x),x) = sin(3*x-3*y(x)+1)^2; 
dsolve(ode,y(x), singsol=all);
 
\[ y = x +\frac {1}{3}+\frac {\arctan \left (-3 x +3 c_1 \right )}{3} \]
Mathematica. Time used: 0.648 (sec). Leaf size: 43
ode=D[y[x],x]==(Sin[3*x-3*y[x]+1])^2; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ \text {Solve}\left [2 y(x)-2 \left (\frac {1}{3} \tan (-3 y(x)+3 x+1)-\frac {1}{3} \arctan (\tan (-3 y(x)+3 x+1))\right )=c_1,y(x)\right ] \]
Sympy. Time used: 2.665 (sec). Leaf size: 82
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(-sin(3*x - 3*y(x) + 1)**2 + Derivative(y(x), x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ \left [ y{\left (x \right )} = x - \frac {2 \operatorname {atan}{\left (\frac {\sqrt {9 C_{1}^{2} + 18 C_{1} x + 9 x^{2} + 1} - 1}{3 \left (C_{1} + x\right )} \right )}}{3} + \frac {1}{3}, \ y{\left (x \right )} = x + \frac {2 \operatorname {atan}{\left (\frac {\sqrt {9 C_{1}^{2} + 18 C_{1} x + 9 x^{2} + 1} + 1}{3 \left (C_{1} + x\right )} \right )}}{3} + \frac {1}{3}\right ] \]