77.40.3 problem 3

Internal problem ID [20759]
Book : A Text book for differentional equations for postgraduate students by Ray and Chaturvedi. First edition, 1958. BHASKAR press. INDIA
Section : Chapter VIII. Linear equations of second order. Excercise VIII (E) at page 140
Problem number : 3
Date solved : Thursday, October 02, 2025 at 06:22:54 PM
CAS classification : [[_2nd_order, _linear, _nonhomogeneous]]

\begin{align*} 4 y+y^{\prime \prime }&=4 \tan \left (2 x \right ) \end{align*}
Maple. Time used: 0.003 (sec). Leaf size: 33
ode:=diff(diff(y(x),x),x)+4*y(x) = 4*tan(2*x); 
dsolve(ode,y(x), singsol=all);
 
\[ y = \sin \left (2 x \right ) c_2 +\cos \left (2 x \right ) c_1 -\cos \left (2 x \right ) \ln \left (\sec \left (2 x \right )+\tan \left (2 x \right )\right ) \]
Mathematica. Time used: 0.133 (sec). Leaf size: 80
ode=D[y[x],{x,2}]+y[x]==4*Tan[2*x]; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)&\to 2 \sqrt {2} \sin (x) \text {arctanh}\left (\sqrt {2}-\tan \left (\frac {x}{2}\right )\right )+2 \sqrt {2} \sin (x) \text {arctanh}\left (\tan \left (\frac {x}{2}\right )+\sqrt {2}\right )-2 \sqrt {2} \cos (x) \text {arctanh}\left (\sqrt {2} \sin (x)\right )+c_1 \cos (x)+c_2 \sin (x) \end{align*}
Sympy. Time used: 0.257 (sec). Leaf size: 36
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(4*y(x) - 4*tan(2*x) + Derivative(y(x), (x, 2)),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = C_{2} \sin {\left (2 x \right )} + \left (C_{1} + \frac {\log {\left (\sin {\left (2 x \right )} - 1 \right )}}{2} - \frac {\log {\left (\sin {\left (2 x \right )} + 1 \right )}}{2}\right ) \cos {\left (2 x \right )} \]