# What is the general solution of the differential equation? :  x^2(d^2y)/(dx^2)+xdy/dx+n^2y=0

Jun 21, 2017

$y = {C}_{1} \cos \left(n \log x\right) + {C}_{2} \sin \left(n \log x\right)$

#### Explanation:

To find out the general solution for

${x}^{2} y ' ' + x y ' + {n}^{2} y = 0$

we propose a solution with the structure

$y = c {x}^{\lambda}$

After substitution we get at

$\left({\lambda}^{2} + {n}^{2}\right) c {x}^{\lambda} = 0$

then

$\lambda = \pm i n$ or

$y = {c}_{1} {x}^{i n} + {c}_{2} {x}^{- i n}$ but

$x = {e}^{\log} x$ and ${e}^{i \alpha} = \cos \alpha + i \sin \alpha$

so

$y = {c}_{1} {e}^{i n \log x} + {c}_{2} {e}^{- i n \log x}$ and also

$y = {C}_{1} \cos \left(n \log x\right) + {C}_{2} \sin \left(n \log x\right)$ is the general solution

Jun 21, 2017

$y = A \cos \left(n \ln x\right) + B \sin \left(n \ln x\right)$

#### Explanation:

If we assume the a corrected equation:

${x}^{2} \frac{{d}^{2} y}{{\mathrm{dx}}^{2}} + x \frac{\mathrm{dy}}{\mathrm{dx}} + {n}^{2} y = 0$ ..... [A]

This is a Euler-Cauchy Equation which is typically solved via a change of variable. Consider the substitution:

$x = {e}^{t} \implies x {e}^{- t} = 1$

Then we have,

$\frac{\mathrm{dy}}{\mathrm{dx}} = {e}^{- t} \frac{\mathrm{dy}}{\mathrm{dt}}$, and, $\frac{{d}^{2} y}{{\mathrm{dx}}^{2}} = \left(\frac{{d}^{2} y}{{\mathrm{dt}}^{2}} - \frac{\mathrm{dy}}{\mathrm{dt}}\right) {e}^{- 2 t}$

Substituting into the initial DE [A] we get:

${x}^{2} \left(\frac{{d}^{2} y}{{\mathrm{dt}}^{2}} - \frac{\mathrm{dy}}{\mathrm{dt}}\right) {e}^{- 2 t} + x {e}^{- t} \frac{\mathrm{dy}}{\mathrm{dt}} + {n}^{2} y = 0$

$\therefore \frac{{d}^{2} y}{{\mathrm{dt}}^{2}} - \frac{\mathrm{dy}}{\mathrm{dt}} + \frac{\mathrm{dy}}{\mathrm{dt}} + {n}^{2} y = 0$

$\therefore \frac{{d}^{2} y}{{\mathrm{dt}}^{2}} + {n}^{2} y = 0$ ..... [B]

This is now a second order linear homogeneous Differentiation Equation with constant coefficients. The standard approach is to look at the Auxiliary Equation, which is the quadratic equation with the coefficients of the derivatives, i.e.

${m}^{2} + {n}^{2} = 0$ where $n \in \mathbb{R}$ is a constant

We can solve this quadratic equation, and we get two complex conjugate roots:

$m = \pm n i$

Thus the Homogeneous equation [B] has the solution:

$y = {e}^{0 t} \left(A \cos n t + B \sin n t\right)$
$\setminus \setminus = A \cos n t + B \sin n t$

Now we initially used a change of variable:

$x = {e}^{t} \implies t = \ln x$

So restoring this change of variable we get:

$y = A \cos \left(n \ln x\right) + B \sin \left(n \ln x\right)$

Which is the General Solution.

From the quoted answer we are told that one solution is:

${\cos}^{- 1} \left(\frac{y}{b}\right) = \log {\left(\frac{x}{n}\right)}^{n}$

If we assume that the logarithm base is $e$ (ie natural logarithms) then we can write this solution as:

${\cos}^{- 1} \left(\frac{y}{b}\right) = \log {\left(\frac{x}{n}\right)}^{n} \implies {\cos}^{- 1} \left(\frac{y}{b}\right) = n \ln \left(\frac{x}{n}\right)$
$\therefore \frac{y}{b} = \cos \left(n \ln \left(\frac{x}{n}\right)\right)$
$\therefore y = b \cos \left(n \ln \left(\frac{x}{n}\right)\right)$

Which is inconsistent with the solution of the DE, suggesting the quoted solution is in error.