I tried solving $x^2y''-5xy' +8y=24$ using variation of Parameters and I keep getting the wrong answer
The correct Answer is $y=C_1x^2+C_2x^4+3$ according to my textbook
So I first got $y_c=C_1x^2+C_2x^4$ by replacing $y$ with $x^m$
Then I got $y_p$ using the equation $$y_p= -y_1\int y_2f(x)/w~ dx + y_2∫y_1f(x)/w~ dx $$ for $w$ I got $3x^5$
$y_1$ and $y_2$ would be $x^2$ and $x^4$ accordingly
Thus I got $y_p=2$ where the answer is off by 1 since $y= y_c + y_p$
Is there something I am doing wrong? I have solved this several times over and guarantee no calculation errors
You have $y_c$ correctly. For $y_p$ consider a constant function, say $y=C$
We have $$y=C, y'=0, y''=0$$
Plug in $$x^2y''-5xy'+8y=24$$
You get $$8C=24 \implies C=3$$ Thus $$y=y_p+y_c = c_1x^4 +c_2x^2 +3 $$
which is the correct answer.