![]() |
VOOZH | about |
Difference Equations are Mathematical Equations involving the differences between usually successive values of a function ('y') of a discrete variable. Here, a discrete variable means that it is defined only for values that differ by some finite amount, generally a constant (Usually '1'). A difference equation can also be defined as a relation between the difference of an unknown function at one or more general values how's the argument. For example equation Δyn+1+yn = 2, It can also be rewritten as: yn+2-yn+1+yn = 2 (Since, Δyn = yn+1-yn)
The Order of a Difference Equation can be found by the Relation:
Example: Consider the Equation 3yn+2-yn+1+5yn = -12, The Order of it is:
Hence, The Order of the above Equation is '2'. So, It can be called a 2nd Order Difference Equation specific.
Homogeneous: If the R.H.S of the above equation is zero, then it can be called a 2nd Order Homogeneous Difference Equation in specific.
Step 1: Let the given 2nd Order Difference Equation is:
ayn+2+byn+1+cyn = 0
Step 2:Then, we reduce the above 2nd Order Difference Equation to its Auxiliary Equation(AE) form:
ar2+br+c = 0
Step 3:Then, we find the Determinant of the above Auxiliary Equation(AE) by the Relation:
Det = (b2 − 4ac)
Step 4:If the Determinant found above is Positive (2 Distinct Real roots r1 & r2), then the yn will be:
yn = C1r1n + C2r2n
Step 5:Else if the Determinant found above is Zero (2 Equal Real Root,r1=r2=r), then the yn will be:
yn = (C1n + C2)r1n
Step 6: Else if the Determinant found above is Negative (Complex Roots, r = α ± iβ), then the yn will be:
yn = Pn(C1cos(nθ) + C2sin(nθ)), where P = √(α2+β2) and θ = tan-1(β/α)
If any Initial Conditions are given, like y0 = m and y1 = n, Then we substitute these two Equations in the above Equation and then we find the C1 & C2 by solving the equation we formed earlier by substitution. Then we resubstitute the C1 & C2 found in the equation 'yn'.
Example 1:
Output:
Example 2:
Output: