Example 6. Solve the Bessel equation

$$
x^{2} y^{\prime \prime}+x y^{\prime}+\left(x^{2}-p^{2}\right) y=0, \quad x>0
$$

where $p$ is a given constant.
Solution. Rewrite (36) as

$$
y^{\prime \prime}+\frac{1}{x} y^{\prime}+\frac{x^{2}-p^{2}}{x^{2}} y=0
$$

Here

$$
p(x)=\frac{1}{x}, \quad q(x)=\frac{x^{2}-p^{2}}{x^{2}}
$$

so that

$$
a_{0}=\lim _{x \rightarrow 0} x p(x)=1, \quad b_{0}=\lim _{x \rightarrow 0} x^{2} q(x)=-p^{2}
$$

(see formulas (24)). The characteristic equation for $\rho$:

$$
\rho(\rho-1)+1 \cdot \rho-p^{2}=0, \quad \text { or } \quad \rho^{2}-p^{2}=0
$$

from which $\rho_{1}=p, \rho_{2}=-p$.

The first particular solution of Bessel's equation (36) is sought in the form of a generalized power series $y=x^{p} \sum_{k=0}^{\infty} C_{k} x^{k}$. Substituting $y, y^{\prime}$ and $y^{\prime \prime}$ into equation (36), we get $x^{2} \sum_{k=0}^{\infty} C_{k}(k+p)(k+p-1) x^{k+p-2}+x \sum_{k=0}^{\infty} C_{k}(k+p) x^{k+p-1}+\left(x^{2}-p^{2}\right) \sum_{k=0}^{\infty} C_{k} x^{k+p}=0$, or, after simple transformations and canceling by $x^{p}$,

$$
\sum_{k=0}^{\infty}\left[(k+p)^{2}-p^{2}\right] C_{k} x^{k}+\sum_{k=0}^{\infty} C_{k} x^{k+2}=0
$$

From here, equating the coefficients of all powers of $x$ to zero, we will have:

| $x^{0}$ | $\left(p^{2}-p^{2}\right) C_{0}=0$, |
| :--- | :--- |
| $x^{1}$ | $\left[(1+p)^{2}-p^{2}\right] C_{1}=0$, |
| $x^{2}$ | $\left[(2+p)^{2}-p^{2}\right] C_{2}+C_{0}=0$, |
| $x^{3}$ | $\left[(3+p)^{2}-p^{2}\right] C_{3}+C_{1}=0$, |
| $x^{4}$ | $\left[(4+p)^{2}-p^{2}\right] C_{4}+C_{2}=0$, |
| $\ldots$ | $\ldots \ldots \ldots \ldots \ldots \ldots \ldots \ldots \ldots \ldots$ |
| $x^{k}$ | $\left[(k+p)^{2}-p^{2}\right] C_{k}+C_{k-2}=0$, |
| $\ldots$ | $\ldots \ldots \ldots \ldots \ldots \ldots \ldots \ldots \ldots \ldots$ |

The first of the relations (37) is satisfied for any value of the coefficient $C_{0}$. From the second relation (37) we get $C_{1}=0$, from the third

$$
C_{2}=-\frac{C_{0}}{(2+p)^{2}-p^{2}}=-\frac{C_{0}}{2^{2}(1+p)}
$$

from the fourth $C_{3}=0$, from the fifth

$$
C_{4}=-\frac{C_{2}}{(4+p)^{2}-p^{2}}=\frac{C_{0}}{2^{4}(1+p)(2+p) \cdot 1 \cdot 2}
$$

Obviously, all coefficients with odd indices are zero: $C_{2 k+1}=0, k=0,1,2, \ldots$. The coefficients with even indices have the form:

$$
C_{2 k}=\frac{(-1)^{k} C_{0}}{2^{2 k}(p+1)(p+2) \ldots(p+k) \cdot k!}, \quad k=1,2, \ldots
$$

For simplifying further calculations, we take

$$
C_{0}=\frac{1}{2^{p} \Gamma(p+1)}
$$

where $\Gamma(\nu)$ is the Euler gamma function. The Euler gamma function $\Gamma(\nu)$ is defined for all positive values (and also for all complex values with a positive real part) as follows:

$$
\Gamma(\nu)=\int_{0}^{x} e^{-x} x^{\nu-1} d x
$$

The gamma function has the following important properties:

$$
\begin{aligned}
& \text { 1. } \Gamma(\nu+1)=\nu \Gamma(\nu) \text {. } \\
& \text { 2. } \Gamma(1)=1
\end{aligned}
$$

If $k$ is a positive integer, then

$$
\begin{aligned}
& \text { 3. } \Gamma(\nu+k+1)=(\nu+1)(\nu+2) \ldots(\nu+k) \Gamma(\nu+1) \\
& \text { 4. } \Gamma(k+1)=k \text { ! }
\end{aligned}
$$

Using (38) and the properties of the gamma function, the coefficient $C_{2 k}$ can be written as

$$
C_{2 k}=\frac{(-1)^{k}}{2^{2 k}(p+1)(p+2) \ldots(p+k) \cdot k!\cdot 2^{p} \Gamma(p+1)}=\frac{(-1)^{k}}{2^{2 k+p} \ldots k!\Gamma(p+k+1)}
$$

since $(p+1)(p+2) \ldots(p+k) \Gamma(p+1)$, according to property 3, equals $\Gamma(p+k+1)$. Now the particular solution of Bessel's equation, which we will denote by $J_{p}$, takes the form

$$
J_{p}(x)=\sum_{k=0}^{\infty} \frac{(-1)^{k}}{k!\Gamma(p+k+1)}\left(\frac{x}{2}\right)^{2 k+p}
$$

This function is called the Bessel function of the first kind of order $p$.

The second particular solution of Bessel's equation (36) is sought in the form

$$
y=x^{-p} \sum_{k=0}^{\infty} C_{k} x^{k}
$$

where $p$ is the second root of the characteristic equation. Clearly, this solution can be obtained from (39) by replacing $p$ with $-p$, since equation (36) contains $p$ in an even power and does not change when $p$ is replaced by $-p$.

Thus,

$$
J_{-p}(x)=\sum_{k=0}^{\infty} \frac{(-1)^{k}}{k!\Gamma(k+1-p)}\left(\frac{x}{2}\right)^{2 k-p}
$$

This function is called the Bessel function of the first kind of order $-p$.

If $p$ is not an integer, then the solutions $J_{p}(x)$ and $J_{-p}(x)$ are linearly independent, since their series expansions start with different powers of $x$ and, consequently, the linear combination $\alpha_{1} J_{p}(x)+\alpha_{2} J_{-p}(x)$ can be identically zero only if $\alpha_{1}=\alpha_{2}=0$.

If $p$ is an integer, then the linear dependence of the functions $J_{p}(x)$ and $J_{-p}(x)$ can be established, namely it turns out that

$$
J_{-n}(x)=(-1)^{n} J_{n}(x) \quad(n-\text { integer