# Differential equation $d^n/dx^n f(x)=\pm k^2f(x)$

How to solve this differential equation:

$$\frac{d^nf(x)}{dx^n}=\pm k^2f(x)$$

For $n=1,2,3$ and $\forall n\in\mathbb{N}$, and both signs, if this is possible.

-
Where exactly did you find this question? – hjpotter92 Jul 18 '12 at 17:45
I encounter these often in physics, with solutions but no derivations. I would like to know how. – TROLLKILLER Jul 18 '12 at 17:46
Ansatzs often works well, especially when you are solving ODEs. Since the equation says that derivatives of $f(x)$ are proportional to itself, we may plug $f(x) = e^{rx}$, which leads to the characteristic equation $r^n = \pm k^2$. Now for each zero $r_k$ of this equation, there corresponds a solution $f_k(x) = e^{r_k x}$. Since it is clear that the solution space is of dimension $n$ and the Wronskian of $f_1, \cdots, f_n$ are nonzero, we have found the general solution in terms of the linear combination of $f_1, \cdots, f_n$. – Sangchul Lee Jul 18 '12 at 17:54
It is a linear homogeneous differential equation with constant coefficients. A differential equations textbook should explain the method to find the general solution. In fact, lots of things "encountered in physics with no derivations" can be found in mathematics textbooks. For courses which physics departments no longer require, in favor of physics courses with no derivations... – GEdgar Jul 18 '12 at 18:14

This equation is linear in $f(x)$, so if you just find $n$ linearly independent solutions by wild-guessing it should be enough to prove that this is the general solution of this equation.

For instance, since you know easily that for $n = 1$ you need to substitute $f(x) = e^{rx}$, a wild guess would be the same guess, which leads to $$r^n e^{rx} = \pm k^2 e^{rx} \quad \Longrightarrow \quad r^n = \pm k^2 \quad \Longrightarrow \quad r = \sqrt[n]{\pm k^2} e^{\frac{2\pi i j}n}, \quad 0 \le j \le n-1.$$ Since all those values of $r$ are distinct, you have $n$ solutions (for a fixed $n^{\text{th}}$ root of $+k^2$ or $-k^2$). Tadam!

Hope that helps,

-

Assume a solution

$$f\left(x\right) \propto \exp\left(\lambda x\right),$$ which gives $$\lambda^n = \pm k^2.$$ Now let $$\lambda = k^{2/n} \exp\left(i r\right),$$ so that $$\lambda^n = k^2 \exp\left(i n r\right) = \pm k^2 \Rightarrow \exp\left(i n r\right) = \pm 1.$$ If $+1$, $$r_m = \frac{2 \pi}{n} m,$$ where $m = 0, 1, ..., n - 1$.

If $-1$, $$r_m = \frac{\pi}{n} \left(2m+1\right),$$ where $m = 0, 1, ..., n - 1$.

Your solution is then $$f\left(x\right) = \sum_{m=0}^{n-1} a_m \exp\left[k^{2/n} \exp\left(i r_m\right) x\right],$$ where $a_m$'s are determined with $n$ initial conditions and the correct $r_m$'s are used based on whether it is $+1$ or $-1$.

You can check this for the simple harmonic oscillator ($n = 2$, and the $-1$ case).

-