The general form of the first-order difference equation can be expressed as:
$$y_{n+ 1} = f(y_n)$$
Where $y_n$ represents the $n$ th value and $f$ is a function. The solution of the equation should be a sequence $\{y_n\}$ satisfying the following conditions, in which each value is generated by the previous value through the function $f$.
We can prove by mathematical induction that the general solution of the first-order difference equation can be expressed as:
$$y_n = f^{(n)}(y_0)$$
Where $ f {(n)} (y _ 0) $ represents the result obtained from $y_0$ after the function $f$ iterates $n$ times.
For example, for the equation $y_{n+ 1} = 2y_n$, the general solution is:
$$y_n = 2^ny_0$$
This is because:
$$y_ 1 = 2y_0$$
$$y_2 = 2y_ 1 = 2^2y_0$$
$$y_3 = 2y_2 = 2^3y_0$$
$$\cdots$$
$$y_n = 2^ny_0$$
Therefore, we can get the general solution of the difference equation by iterative recursive formula.
2. General solution of second-order difference equation
The general form of the second-order difference equation can be expressed as:
$$y_{n+2} = f(y_{n+ 1},y_n)$$
Where $y_n$ represents the $n$ th value and $f$ is a function. The solution of the equation should be the sequence $\{y_n\}$ satisfying the following conditions, in which each value is generated by the first two values through the function $f$.
By solving the characteristic equation of the second-order difference equation, the general solution of the second-order difference equation can be obtained. The general form of the characteristic equation is:
$$r^2 - ar - b = 0$$
Where $a$ and $b$ are the coefficients in the second-order difference equation, and $r$ is the root of the equation.
If the root of the characteristic equation is a real number, then the form of the general solution is:
$ $ y _ n = c_ 1r_ 1^n+c_2r_2^n$$
Where $c_ 1$ and $c_2$ are constants, and $r_ 1$ and $r_2$ are the roots of the characteristic equation.
If the root of the characteristic equation is a * * * yoke complex number, then the form of the general solution is:
$ $ y _ n = ar^n\cos(n\theta)+br^n\sin(n\theta)$$
Where $a$ and $b$ are constants, $r$ is the real part of the characteristic equation, and $ θ $ is the imaginary part of the characteristic equation.
For example, for the equation $y_{n+2} = y_{n+ 1}+y_n$, the characteristic equation is:
$$r^2 - r - 1 = 0$$
Its two roots are:
$ $ r _ 1 = \ frac { 1+\ sqrt { 5 } } { 2 } $ $
$ $ r _ 2 = \ frac { 1-\ sqrt { 5 } } { 2 } $ $
Therefore, the general solution of the equation is:
$ $ y _ n = c _ 1 \ left(\ frac { 1+\sqrt{5}}{2}\right)^n+c _ 2 \ left(\ frac { 1-\sqrt{5}}{2}\right)^n$$
3. Solutions of common difference equations
For common difference equations, we can solve them by the following methods:
(1) linear difference equation
The general form of linear difference equation can be expressed as:
$$a_{n+ 1} = p_na_n + q_n$$
Where $a_n$ represents the value of the item $n$, and $p_n$ and $q_n$ are constants. The general solution of the linear difference equation can be expressed as:
$$a_n = c_ 1p^n + c_2q^n$$
Where $c_ 1$ and $c_2$ are constants.
(2) Homogeneous second-order difference equation
The general form of homogeneous second-order difference equation can be expressed as:
$ $ a _ { n+2 }+ba _ { n+ 1 }+ca _ n = 0 $ $
Where $a_n$ represents the value of the item $n$, and $b$ and $c$ are constants. The general solution of the homogeneous second-order difference equation can be expressed as:
$ $ a _ n = c_ 1r_ 1^n+c_2r_2^n$$
Where $r_ 1$ and $r_2$ are the roots of the characteristic equation, and $c_ 1$ and $c_2$ are constants.
(3) Non-homogeneous second order difference equation
The general form of non-homogeneous second-order difference equation can be expressed as:
$ $ a _ { n+2 }+ba _ { n+ 1 }+ca _ n = f(n)$ $
Where $a_n$ represents the value of the item $n$, $b$ and $c$ are constants, and $f(n)$ is a function. The general solution of non-homogeneous second-order difference equation can be expressed as:
$$a_n = a_n^{(h)} + a_n^{(p)}$$
Where $ a _ n {(h)} $ is the general solution of homogeneous equation and $ a _ n {(p)} $ is the special solution of non-homogeneous equation.
In a word, difference equations are often used in various fields. For the general solution and solution of difference equation, we need to master basic mathematical knowledge, including mathematical induction, characteristic equation, linear algebra and so on. Only by mastering the solution method of difference equation can we understand its application scenario in practical problems more deeply.