ODE
\[ a y'(x)+b y(x)+y''(x)=f(x) \] ODE Classification
[[_2nd_order, _linear, _nonhomogeneous]]
Book solution method
TO DO
Mathematica ✓
cpu = 0.755774 (sec), leaf count = 150
\[\left \{\left \{y(x)\to e^{-\frac {1}{2} x \left (\sqrt {a^2-4 b}+a\right )} \left (\int _1^x -\frac {f(K[1]) e^{\frac {1}{2} \left (\sqrt {a^2-4 b}+a\right ) K[1]}}{\sqrt {a^2-4 b}} \, dK[1]+e^{x \sqrt {a^2-4 b}} \int _1^x \frac {f(K[2]) e^{\frac {1}{2} \left (a-\sqrt {a^2-4 b}\right ) K[2]}}{\sqrt {a^2-4 b}} \, dK[2]+c_2 e^{x \sqrt {a^2-4 b}}+c_1\right )\right \}\right \}\]
Maple ✓
cpu = 0.197 (sec), leaf count = 124
\[ \left \{ y \left ( x \right ) ={{\rm e}^{-{\frac {x}{2} \left ( a-\sqrt {{a}^{2}-4\,b} \right ) }}}{\it \_C2}+{{\rm e}^{-{\frac {x}{2} \left ( a+\sqrt {{a}^{2}-4\,b} \right ) }}}{\it \_C1}+{1 \left ( \int \!f \left ( x \right ) {{\rm e}^{-{\frac {x}{2} \left ( -a+\sqrt {{a}^{2}-4\,b} \right ) }}}\,{\rm d}x{{\rm e}^{\sqrt {{a}^{2}-4\,b}x}}-\int \!f \left ( x \right ) {{\rm e}^{{\frac {x}{2} \left ( a+\sqrt {{a}^{2}-4\,b} \right ) }}}\,{\rm d}x \right ) {{\rm e}^{-{\frac {x}{2} \left ( a+\sqrt {{a}^{2}-4\,b} \right ) }}}{\frac {1}{\sqrt {{a}^{2}-4\,b}}}} \right \} \] Mathematica raw input
DSolve[b*y[x] + a*y'[x] + y''[x] == f[x],y[x],x]
Mathematica raw output
{{y[x] -> (C[1] + E^(Sqrt[a^2 - 4*b]*x)*C[2] + Integrate[-((E^(((a + Sqrt[a^2 -
4*b])*K[1])/2)*f[K[1]])/Sqrt[a^2 - 4*b]), {K[1], 1, x}] + E^(Sqrt[a^2 - 4*b]*x)*
Integrate[(E^(((a - Sqrt[a^2 - 4*b])*K[2])/2)*f[K[2]])/Sqrt[a^2 - 4*b], {K[2], 1
, x}])/E^(((a + Sqrt[a^2 - 4*b])*x)/2)}}
Maple raw input
dsolve(diff(diff(y(x),x),x)+a*diff(y(x),x)+b*y(x) = f(x), y(x),'implicit')
Maple raw output
y(x) = exp(-1/2*(a-(a^2-4*b)^(1/2))*x)*_C2+exp(-1/2*(a+(a^2-4*b)^(1/2))*x)*_C1+(
Int(f(x)*exp(-1/2*(-a+(a^2-4*b)^(1/2))*x),x)*exp((a^2-4*b)^(1/2)*x)-Int(f(x)*exp
(1/2*(a+(a^2-4*b)^(1/2))*x),x))/(a^2-4*b)^(1/2)*exp(-1/2*(a+(a^2-4*b)^(1/2))*x)