# Second Order Nonhomogeneous Differential Equation.

The Eulero equation of the functional

$$J[y]=\int_a^b \frac{y'^2}{x^3} \; \mathrm dx,$$

leads to the following differential equation:

$$\frac{y''}{x^3}-3\frac{y'}{x^4}=0.$$

I rewrote the equation as

$$xy''-3y'=0,$$

integrating by parts I got:

$$y'x-4y=0.$$

and by separation of variables:

$$y=c_1x+c_2$$

which is not a solution of the original differential equation. Where did I commit illegal steps?

• For $c_2 \ne 0$ this is not a solution of $y'x-4y=0.$ – Fred Jun 21 '17 at 8:18
• Don't forget the constant of integration when doing IBP: $$xy'-4y=c$$ Solving gives: $$y=k_1 x^4-\frac{c}{4}$$ $$y=k_1 x^4+k_2$$ – projectilemotion Jun 21 '17 at 10:03

You are making a mistake with logarithms. Separating variables you get \begin{align} \frac{y'}{y} &= 4 \frac{1}{x} \\ \implies \mathrm{ln}(y) &= 4 \mathrm{ln}(x) +c \\ \implies \mathrm{ln}(y) &= \mathrm{ln}(x^4) +c \\ \implies y &= Dx^4 \end{align}

• what, for example, if $y=x^4+4$ then our equation doesn't hold $y'x-4y=0$, because we get $-16=0$? – serg_1 Jun 21 '17 at 8:34
• $y=x^4+c$ is not correct ! Correct: $y=cx^4$ – Fred Jun 21 '17 at 8:48
• Ah, thank you, of course - fixed. – Andrew Whelan Jun 21 '17 at 8:50

The general solution of $y'x-4y=0$ is given by

$y=cx^4$.

• I know, but how did you get it? – Dante Jun 21 '17 at 8:14
• You know ??? You have written $y=4x+c$ . Write $y'x=4y$. Then separation of variables. – Fred Jun 21 '17 at 8:17
• @Dante I think you're making a mistake with exponentiating logarithms in one of your last steps in the separation of variables (easy mistake to make if you do it quickly!) More specifically, you get $\mathrm{ln}(y) = 4 \mathrm{ln}(x) = \mathrm{ln}(x^4)$, then exponentiate. – Andrew Whelan Jun 21 '17 at 8:18
• separating the variables, $\frac{y'}{y}=4\frac{1}{x}$ which gives rise to $\ln |y|=4\ln |x|+c$, right? – Dante Jun 21 '17 at 8:21
• @AndrewWhelan oh god, yes it was my mistake. Thanks a lot. – Dante Jun 21 '17 at 8:23