# Solve the differential equation x^2(d^2y)/(dx^2) + x dy/dx + y = x^m ?

Sep 4, 2017

$y = A \cos \left(\ln x\right) + B \sin \left(\ln x\right) + \frac{{x}^{m}}{{m}^{2} + 1}$

#### Explanation:

We have:

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

This is a Euler-Cauchy Equation (the power of $x$ is the same as the degree of the differential in every occurrence of their product) 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}} + y = {\left({e}^{t}\right)}^{m}$

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

$\therefore \frac{{d}^{2} y}{{\mathrm{dt}}^{2}} + y = {e}^{t m}$ ..... [B]

This is now a second order linear non-Homogeneous Differentiation Equation. The standard approach is to find a solution, ${y}_{c}$ of the homogeneous equation by looking at the Auxiliary Equation, which is the quadratic equation with the coefficients of the derivatives, and then finding an independent particular solution, ${y}_{p}$ of the non-homogeneous equation.

Complementary Function

${m}^{2} + 1 = 0$

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

$m = \pm i$

Thus the Homogeneous equation [B] has the solution:

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

Particular Solution

With this particular equation [B], a probably solution is of the form:

$y = a {e}^{t m}$

Where $a$ is a constant to be determined by substitution

Let us assume the above solution works, in which case be differentiating wrt $x$ we have:

$y ' \setminus \setminus = a m {e}^{t m}$
$y ' ' = a {m}^{2} {e}^{t m}$

Substituting into the initial Differential Equation $\left[B\right]$ we get:

$a {m}^{2} {e}^{t m} + a {e}^{t m} = {e}^{t m}$
$\therefore a {m}^{2} + a = 1$
$\therefore a \left({m}^{2} + 1\right) = 1$
$\therefore a = \frac{1}{{m}^{2} + 1}$

And so we form the Particular solution:

${y}_{p} = {e}^{t m} / \left({m}^{2} + 1\right)$

General Solution

Which then leads to the GS of [B}

$y \left(t\right) = {y}_{c} + {y}_{p}$
$\setminus \setminus \setminus \setminus \setminus \setminus \setminus = A \cos t + B \sin t + {e}^{t m} / \left({m}^{2} + 1\right)$

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(\ln x\right) + B \sin \left(\ln x\right) + \frac{{\left({e}^{t}\right)}^{m}}{{m}^{2} + 1}$
$\setminus \setminus = A \cos \left(\ln x\right) + B \sin \left(\ln x\right) + \frac{{\left(x\right)}^{m}}{{m}^{2} + 1}$

Which is the General Solution of [A].

$y = A \cos \left(\ln x\right) + B \sin \left(\ln x\right) + \frac{{x}^{m}}{{m}^{2} + 1}$