Internal problem ID [5832]
Book: Ordinary differential equations and calculus of variations. Makarets and Reshetnyak. Wold
Scientific. Singapore. 1995
Section: Chapter 2. Linear homogeneous equations. Section 2.3.4 problems. page 104
Problem number: 11.
ODE order: 2.
ODE degree: 1.
CAS Maple gives this as type [[_2nd_order, _linear, _nonhomogeneous]]
\[ \boxed {\left (\cos \left (x \right )+\sin \left (x \right )\right ) y^{\prime \prime }-2 \cos \left (x \right ) y^{\prime }+\left (\cos \left (x \right )-\sin \left (x \right )\right ) y=\left (\cos \left (x \right )+\sin \left (x \right )\right )^{2} {\mathrm e}^{2 x}} \]
✓ Solution by Maple
Time used: 0.422 (sec). Leaf size: 322
dsolve((cos(x)+sin(x))*diff(y(x),x$2)-2*cos(x)*diff(y(x),x)+(cos(x)-sin(x))*y(x)=(cos(x)+sin(x))^2*exp(2*x),y(x), singsol=all)
\[ y \left (x \right ) = -\cos \left (x \right ) \left (\left (\int {\mathrm e}^{\int \frac {\left (-\cot \left (x \right )+1\right ) \cos \left (x \right )+2 \sin \left (x \right ) \left (\tan \left (x \right )+1\right )}{\cos \left (x \right )+\sin \left (x \right )}d x} \sin \left (x \right )d x \right ) c_{1} -\left (\int {\mathrm e}^{2 x -2 \left (\int \frac {\sin \left (x \right )}{\cos \left (x \right )+\sin \left (x \right )}d x \right )-2 \left (\int \frac {\sin \left (x \right ) \tan \left (x \right )}{\cos \left (x \right )+\sin \left (x \right )}d x \right )+\int \frac {\cos \left (x \right ) \cot \left (x \right )}{\cos \left (x \right )+\sin \left (x \right )}d x -\left (\int \frac {\cos \left (x \right )}{\cos \left (x \right )+\sin \left (x \right )}d x \right )} \left (\csc \left (x \right )+\sec \left (x \right )\right )d x \right ) \left (\int {\mathrm e}^{2 \left (\int \frac {\sin \left (x \right )}{\cos \left (x \right )+\sin \left (x \right )}d x \right )+2 \left (\int \frac {\sin \left (x \right ) \tan \left (x \right )}{\cos \left (x \right )+\sin \left (x \right )}d x \right )-\left (\int \frac {\cos \left (x \right ) \cot \left (x \right )}{\cos \left (x \right )+\sin \left (x \right )}d x \right )+\int \frac {\cos \left (x \right )}{\cos \left (x \right )+\sin \left (x \right )}d x} \sin \left (x \right )d x \right )+\int {\mathrm e}^{2 x -2 \left (\int \frac {\sin \left (x \right )}{\cos \left (x \right )+\sin \left (x \right )}d x \right )-2 \left (\int \frac {\sin \left (x \right ) \tan \left (x \right )}{\cos \left (x \right )+\sin \left (x \right )}d x \right )+\int \frac {\cos \left (x \right ) \cot \left (x \right )}{\cos \left (x \right )+\sin \left (x \right )}d x -\left (\int \frac {\cos \left (x \right )}{\cos \left (x \right )+\sin \left (x \right )}d x \right )} \left (\csc \left (x \right )+\sec \left (x \right )\right ) \left (\int {\mathrm e}^{2 \left (\int \frac {\sin \left (x \right )}{\cos \left (x \right )+\sin \left (x \right )}d x \right )+2 \left (\int \frac {\sin \left (x \right ) \tan \left (x \right )}{\cos \left (x \right )+\sin \left (x \right )}d x \right )-\left (\int \frac {\cos \left (x \right ) \cot \left (x \right )}{\cos \left (x \right )+\sin \left (x \right )}d x \right )+\int \frac {\cos \left (x \right )}{\cos \left (x \right )+\sin \left (x \right )}d x} \sin \left (x \right )d x \right )d x -c_{2} \right ) \]
✓ Solution by Mathematica
Time used: 4.817 (sec). Leaf size: 476
DSolve[(Cos[x]+Sin[x])*y''[x]-2*Cos[x]*y'[x]+(Cos[x]-Sin[x])*y[x]==(Cos[x]+Sin[x])^2*Exp[2*x],y[x],x,IncludeSingularSolutions -> True]
\[ y(x)\to \frac {\left (\frac {1}{4}+\frac {i}{4}\right ) \left (e^{-2 i x}\right )^{\frac {1}{2}-\frac {i}{2}} \left (e^{i x}\right )^{1-2 i} \left (-\frac {i \left (-1+e^{2 i \arctan \left (e^{-2 i x}\right )}\right )}{1+e^{2 i \arctan \left (e^{-2 i x}\right )}}\right )^{-\frac {1}{2}-\frac {i}{2}} \left (-i \left (e^{-2 i x}\right )^i \sqrt {1+e^{-4 i x}} \sqrt {1+e^{4 i x}} e^{2 i \left (2 x+\arctan \left (e^{-2 i x}\right )\right )}-2 i \sqrt {-e^{4 i x}} \sqrt {-\left (1+e^{4 i x}\right )^2} e^{2 i \arctan \left (e^{-2 i x}\right )} \left (-\frac {i \left (-1+e^{2 i \arctan \left (e^{-2 i x}\right )}\right )}{1+e^{2 i \arctan \left (e^{-2 i x}\right )}}\right )^i+e^{4 i x} \left (e^{-2 i x}\right )^i \sqrt {1+e^{-4 i x}} \sqrt {1+e^{4 i x}}\right )}{\sqrt {-e^{4 i x}} \sqrt {-\left (1+e^{4 i x}\right )^2} \left (1+e^{2 i \arctan \left (e^{-2 i x}\right )}\right )}+\frac {c_2 e^{3 i x} \left (e^{-2 i x}\right )^{\frac {1}{2}+\frac {i}{2}} \sqrt {1+e^{-4 i x}} \left (e^{2 i \arctan \left (e^{-2 i x}\right )}+i\right ) \left (-\frac {i \left (-1+e^{2 i \arctan \left (e^{-2 i x}\right )}\right )}{1+e^{2 i \arctan \left (e^{-2 i x}\right )}}\right )^{\frac {1}{2}-\frac {i}{2}}}{\sqrt {1+e^{4 i x}} \left (-1+e^{2 i \arctan \left (e^{-2 i x}\right )}\right )}+c_1 \left (e^{i x}\right )^{-i} \]