General Solution for a second order ODE

83 Views Asked by At

So we have this problem in mathematical physics. We are asked to find the general solution for the ODE $$ (x^2)y''+(x)y'-(n^2)y=0 $$ for integer $n$.

But this is what I tried to do. I let $$ y=x^p\\ y'=px^{p-1}\\ y''=p(p-1)x^{p-2} $$ Then substituted it back to the original equation, $$ (x^2)p(p-1)x^{p-2}+xpx^{p-1}-n^2x^p=0 $$ So I have $$ x^p(p^2-n^2)=0 $$ And there, i'm stuck. My answer is

$$ C_1x^{p_1}+C_2x^{p_2}=y(x) $$

But is this correct? :'(

2

There are 2 best solutions below

2
On

You are almost there.

You have $$p^2=n^2 \implies p=\pm n$$

Thus your general solution is $$y=C_1 x^n+C_2 x^{-n}$$

0
On

Here's another possible approach:

Let us consider your differential equation $$x^2\cdot\frac{d^2y}{dx^2}+x\cdot\frac{dy}{dx}-n^2\cdot y=0$$ Let $t=\ln(x)\rightarrow x=e^t$.

Then,

$$\begin{align} \ \frac{dy}{dx} & =\frac{dt}{dx}\cdot\frac{dy}{dt} \\ & = \frac{d}{dx}\left(\ln(x)\right)\cdot\frac{dy}{dt} \\ & = \frac{1}{x}\cdot\frac{dy}{dt} \\ & = e^{-t}\cdot\frac{dy}{dt} \\ \end{align}$$ and $$\begin{align} \ \frac{d^2y}{dx^2} & =\frac{d}{dx}\left(\frac{dt}{dx}\cdot\frac{dy}{dt}\right) \\ & = \frac{d}{dx}\left(\frac{1}{x}\cdot\frac{dy}{dt}\right) \\ & = \frac{d}{dx}\left(\frac{1}{x}\right)\cdot\frac{dy}{dt}+\left(\frac{1}{x}\right)^2\cdot\frac{d^2y}{dt^2} \\ & = \frac{1}{x^2}\cdot\left(\frac{d^2y}{dt^2}-\frac{dy}{dt}\right) \\ & = e^{-2\cdot t}\cdot\left(\frac{d^2y}{dt^2}-\frac{dy}{dt}\right) \end{align}$$

Substitution into the differential equation gives $$\begin{aligned} e^{2\cdot t}\cdot e^{-2\cdot t}\cdot\left(\frac{d^2y}{dt^2}-\frac{dy}{dt}\right)+e^t\cdot e^{-t}\cdot\frac{dy}{dt}-n^2\cdot y&=0 \\ \frac{d^2y}{dt^2}-n^2\cdot y&=0 \\ \end{aligned}$$

Assume that $y\propto e^{\lambda\cdot t}$ for some constant $\lambda$.

Substitution into the differential equation gives

$$\begin{aligned} \frac{d^2}{dt^2}(e^{\lambda\cdot t})-n^2\cdot e^{\lambda\cdot t}&=0 \\ (\lambda^2-n^2)\cdot e^{\lambda\cdot t}&=0 \\ \end{aligned}$$ Because $e^{\lambda\cdot t}\ne 0$ for any finite $\lambda$, $\lambda^2-n^2=0\rightarrow \lambda_{1,2}=\pm n$.

Therefore, $$y(t)=\text{c}_1\cdot e^{-n\cdot t}+\text{c}_2\cdot e^{n\cdot t}$$ Let $t=\ln(x)$: $$\begin{align} \ y(x) & =\text{c}_1\cdot e^{-n\cdot\ln(x)}+\text{c}_2\cdot e^{n\cdot\ln(x)} \\ & = \text{c}_1\cdot e^{\ln(x^{-n})}+\text{c}_2\cdot e^{\ln(x^{n})} \\ & = \text{c}_1\cdot x^{-n}+\text{c}_2\cdot x^{n} \\ \end{align}$$ where $n\in\mathbb{Z}$.