Differential Equation Question: How do I solve this? $\frac{d^2y}{dx^2}-\frac{1}{x}\frac{dy}{dx}=x$ This is the question:
$$\frac{d^2y}{dx^2}-\frac{1}{x}\frac{dy}{dx}=x$$
I've tried the substitution:
$$z=x\frac{dy}{dx}$$
But for some reason I get:
$$y=\frac{x^7}{35} + cx^2 + d$$
While the answer is supposed to be:
$$y=\frac{x^3}{3} + cx^2 + d$$
Could someone guide me on a step-by-step basis here,  because I'm clearly making a mistake at one of the steps that I'm not able to recognize.
Thanks.
 A: Hint: Put $y' = u \implies u' - \dfrac{1}{x}u = x$. From this you can solve for $u$ and find its antiderivative to get $y$.
A: Let z=$\frac{dy}{dx}$
$\frac{dz}{dx}-\frac{z}{x}=x$
$\frac{x\frac{dz}{dx}-z}{x^2}=1$
Note that the LHS is the derivative of $\frac{z}{x}$
$\frac{d}{dx}\frac{z}{x}=1$
$\frac{z}{x}=x+c'$
$z=x^2+c'x$
$y=\frac{x^3}{3}+\frac{c'}{2}x^2+d$
$y=\frac{x^3}{3}+cx^2+d$
A: So, the integrating factor is actually:
$$e^{\int(-2/x)dx}$$
On simplifying, it gives me:
$$\frac{1}{x^2}$$
And on multiplying the integrating factor:
$$\frac{1}{x^2}\frac{dz}{dx} - \frac{2}{x^3} = 1$$
Which is: $$\frac{d}{dx}(\frac{z}{x^2}) = 1$$
And on integrating both sides:
$$\frac{z}{x^2} = x + c$$
$$z = x^3 + cx^2$$
Substituting back y:
$$x\frac{dy}{dx} = x^3 + cx^2$$
Which ultimately gives:
$$y = \frac{x^3}{3} + cx^2 + d$$
Thanks for your help @Wang YeFei & @Aditya
A: You have $$y''-\frac{1}{x}y'=x$$
$\implies \frac{1}{x}y''-\frac{1}{x^2}y'=1$
$\implies \left( \frac{y'}{x} \right) ' =1$
$\implies \frac{y'}{x}=x+c$
$\implies y'=x^2+cx$
$\implies y=\frac{x^3}{3}+cx^2+d$.
A: Let $u=\frac{1}{x}\frac{dy}{dx}$. Then $$\frac{du}{dx}=\frac{1}{x}\frac{d^2y}{dx^2}-\frac{1}{x^2}\frac{dy}{dx}=1$$ Hence $u=x+c \implies \frac{dy}{dx}=x^2+cx \implies y=\frac{x^3}{3}+\frac{c}{2}x^2+d$
A: $\frac{dy}{dx}=u$ $\implies$ $\frac{d^2y}{dx^2}=\frac{du}{dx}$
Now, put $u$ and $\frac{du}{dx}$ in equation
hence, equation become  $\frac{du}{dy}$-$\frac{u}{x}=x$
multiply by 1/x both side we get $\frac{du}{dy}\frac{1}{x}-\frac{u}{x^2}=1$
we can write this eqn as  $\frac{d(\frac{u}{x})}{dx}=1$ $\implies $ $d(\frac{u}{x})=dx$
Integrating both side with respect to x
we get $\frac{u}{x}=x+c \implies u=x^2+cx$
Now again integrating $u$ with respect to x we get $y=\frac{x^3}{3}+\frac{cx^2}{2}+d$
