TITLE: Solving homogeneous third order ODE that becomes inhomogeneous second order ODE with constant
QUESTION [2 upvotes]: Given $xy'''-4y''+xy'-4y=0$, I need to find the general solution for this ODE, and I was given a hint to use $z = y''+y$.
So using the hint I get $z'=y'''+y'$ so back to the original equation I get
$$x(y'''+y')-4(y''+y)=0\Longrightarrow xz'-4z=0$$ this is a separable first order ODE so I get that $\frac{dz}{z}=\frac{4dx}{x}\Longrightarrow ln{z}=4ln{x}+C\Longrightarrow z=Cx^4$. Going back to $y$ I have $y''+y=C\cdot x^4$.
The homogeneous equation $y''+y=0$, has two solutions $y_1=cos{x}$ and $y_2=sin{x}$ so the general solution for the original equation should look like $y=Acos{x}+Bsin{x}+u$ where $u$ is a particular solution for $y''+y=C\cdot x^4$.
Thus assuming $u=e_4x^4+e_3x^3+e_2x^2+e_1x+e_0$ is the particular solution I get $u''=12e_4x^2+6e_3+2e_2$ and therefore $12e_4x^2+6e_3+2e_2+e_4x^4+e_3x^3+e_2x^2+e_1x+e_0=Cx^4\Longrightarrow e_4=C, e_3=0, e_2=12C, e_1=0, e_0=24C$ and the general solution is $$y=Acos{x}+Bsin{x}+C(x^4-12x^2+24)$$
And while any combination of $A,B,C$, constants, does solve $xy'''-4y''+xy'-4y=0$, I'm, honestly, have no idea how I got here (I understand up to $y''+y=Cx^4$), I repeated the steps I saw in other solved equations and I'm now trying to wrap my head around why I needed to do what I did

REPLY [0 votes]: This only works because of the special structure of this example. Change one 4 into a 3 and all breaks down.
Because it has this structure, one might see the factorization as differential operators (with the differntiation operator $D=\frac{d}{dx}$)
$$(xD-4)(D^2+1)y=0.$$
If ever you see such a factorization $$p(x,D)q(x,D)y=0,$$ you can decompose the problem as $$p(x,D)z=0,\\ q(x,D)y=z.$$
This is simplified, but no guarantee that the partial equations will be simple to solve (symbolically).
{"set_name": "stack_exchange", "score": 2, "question_id": 4314512}