ODE
\[ 2 \left (y''''(x)+\left (a^2+b^2\right ) y''(x)+a^2 b^2 y(x)\right )=\cos (a x)+\cos (b x) \] ODE Classification
[[_high_order, _linear, _nonhomogeneous]]
Book solution method
TO DO
Mathematica ✓
cpu = 0.908916 (sec), leaf count = 173
\[\left \{\left \{y(x)\to \frac {a \left (2 b \left (b^2-a^2\right ) \left (b \sin (a x) \left (4 a c_4 \left (b^2-a^2\right )+x\right )-a \sin (b x) \left (4 b c_2 \left (a^2-b^2\right )+x\right )\right )+a \left (8 a^4 b^2 c_1-16 a^2 b^4 c_1+a^2+8 b^6 c_1-5 b^2\right ) \cos (b x)\right )+b^2 \left (8 a^6 c_3-16 a^4 b^2 c_3+a^2 \left (8 b^4 c_3-5\right )+b^2\right ) \cos (a x)}{8 a^2 b^2 (a-b)^2 (a+b)^2}\right \}\right \}\]
Maple ✓
cpu = 0.307 (sec), leaf count = 130
\[ \left \{ y \left ( x \right ) ={\frac { \left ( -5\,{a}^{2}+{b}^{2} \right ) \cos \left ( ax \right ) }{8\,{a}^{2} \left ( -a+b \right ) ^{2} \left ( a+b \right ) ^{2}}}+{\frac { \left ( {a}^{2}-5\,{b}^{2} \right ) \cos \left ( bx \right ) }{8\,{b}^{2} \left ( -a+b \right ) ^{2} \left ( a+b \right ) ^{2}}}-{\frac {x\sin \left ( ax \right ) }{4\,{a}^{3}-4\,{b}^{2}a}}+{\frac {x\sin \left ( bx \right ) }{4\,{a}^{2}b-4\,{b}^{3}}}+{\it \_C1}\,\cos \left ( ax \right ) +{\it \_C2}\,\cos \left ( bx \right ) +{\it \_C3}\,\sin \left ( ax \right ) +{\it \_C4}\,\sin \left ( bx \right ) \right \} \] Mathematica raw input
DSolve[2*(a^2*b^2*y[x] + (a^2 + b^2)*y''[x] + y''''[x]) == Cos[a*x] + Cos[b*x],y[x],x]
Mathematica raw output
{{y[x] -> (b^2*(b^2 + 8*a^6*C[3] - 16*a^4*b^2*C[3] + a^2*(-5 + 8*b^4*C[3]))*Cos[
a*x] + a*(a*(a^2 - 5*b^2 + 8*a^4*b^2*C[1] - 16*a^2*b^4*C[1] + 8*b^6*C[1])*Cos[b*
x] + 2*b*(-a^2 + b^2)*(b*(x + 4*a*(-a^2 + b^2)*C[4])*Sin[a*x] - a*(x + 4*b*(a^2
- b^2)*C[2])*Sin[b*x])))/(8*a^2*(a - b)^2*b^2*(a + b)^2)}}
Maple raw input
dsolve(2*diff(diff(diff(diff(y(x),x),x),x),x)+2*(a^2+b^2)*diff(diff(y(x),x),x)+2*a^2*b^2*y(x) = cos(a*x)+cos(b*x), y(x),'implicit')
Maple raw output
y(x) = 1/8*(-5*a^2+b^2)*cos(a*x)/a^2/(-a+b)^2/(a+b)^2+1/8*(a^2-5*b^2)*cos(b*x)/b
^2/(-a+b)^2/(a+b)^2-x*sin(a*x)/(4*a^3-4*a*b^2)+x*sin(b*x)/(4*a^2*b-4*b^3)+_C1*co
s(a*x)+_C2*cos(b*x)+_C3*sin(a*x)+_C4*sin(b*x)