4.26.27 \(a y'(x)+b y(x)+y''(x)=f(x)\)

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.294052 (sec), leaf count = 152

\[\left \{\left \{y(x)\to e^{-\frac {1}{2} x \left (\sqrt {a^2-4 b}+a\right )} \left (\int _1^x-\frac {e^{\frac {1}{2} \left (a+\sqrt {a^2-4 b}\right ) K[1]} f(K[1])}{\sqrt {a^2-4 b}}dK[1]+e^{x \sqrt {a^2-4 b}} \int _1^x\frac {e^{\frac {1}{2} \left (a-\sqrt {a^2-4 b}\right ) K[2]} f(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.206 (sec), leaf count = 138

\[\left [y \left (x \right ) = {\mathrm e}^{\left (-\frac {a}{2}+\frac {\sqrt {a^{2}-4 b}}{2}\right ) x} \textit {\_C2} +{\mathrm e}^{\left (-\frac {a}{2}-\frac {\sqrt {a^{2}-4 b}}{2}\right ) x} \textit {\_C1} +\frac {\left (\left (\int f \left (x \right ) {\mathrm e}^{-\frac {\left (-a +\sqrt {a^{2}-4 b}\right ) x}{2}}d x \right ) {\mathrm e}^{\frac {\left (a +\sqrt {a^{2}-4 b}\right ) x}{2}}-\left (\int f \left (x \right ) {\mathrm e}^{\frac {\left (a +\sqrt {a^{2}-4 b}\right ) x}{2}}d x \right ) {\mathrm e}^{-\frac {\left (-a +\sqrt {a^{2}-4 b}\right ) x}{2}}\right ) {\mathrm e}^{-a x}}{\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] + Inactive[Integrate][-((E^(((a + S
qrt[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)*Inactive[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))

Maple raw output

[y(x) = exp((-1/2*a+1/2*(a^2-4*b)^(1/2))*x)*_C2+exp((-1/2*a-1/2*(a^2-4*b)^(1/2))
*x)*_C1+(Int(f(x)*exp(-1/2*(-a+(a^2-4*b)^(1/2))*x),x)*exp(1/2*(a+(a^2-4*b)^(1/2)
)*x)-Int(f(x)*exp(1/2*(a+(a^2-4*b)^(1/2))*x),x)*exp(-1/2*(-a+(a^2-4*b)^(1/2))*x)
)/(a^2-4*b)^(1/2)*exp(-a*x)]