#math
Extension to nth order is straightforward
Consider $$y'' + p(x)y' + q(x)y = r(x) \tag{1}$$where are continuous functions. Consider a particular solution
Let be a general solution to . Consider , which satisfies the equation , transforming it into $$Y'' + p(x)Y' + q(x)Y = 0 \tag{2}$$
Clearly we know how to solve for , . Thus the general solution to is $$y = C_{1}y_{1} + C_{2}y_{2} + y_{p}$$
We will focus on finding
Method of variation of parameters
Theorem
A particular solution to the linear ODE is given by $$y_{p}(x) = -y_{1}(x)\int\frac{y_{2}(x)r(x)}{W(y_{1},y_{2})}dx + y_{2}(x)\int\frac{y_{1}(x)r(x)}{W(y_{1},y_{2})}dx$$where and is referred to as wronskian, being basis solutions for the homogeneous counterpart
Note
The coefficient of leading term, (highest order differential) must be unity for this method to work.
If it is not, divide the entire equation by it
Non-homogeneous Euler-Cauchy Equation
If the ODE is of the form $$x^2y'' + axy' + by = \bar{r}(x),$$where are constants, then this equation is called non-homogeneous Euler-Cauchy Equation.
We find the solution to the homogeneous counterpart
of this by ignoring , and then we divide it by for it to become $$y'' + \frac{a}{x}y' + \frac{b}{x^2}y = r(x)$$and use the Method of variation of parameters to solve for specific solution . Thus we can write overall solution as linear combination of .