Complex Math Simple Life


Second Order Difference Equations

Posted in complex, difference, equation by beauangel on the February 19, 2007

Standard Form

a_0y_t + a_1y_{t-1} + a_2y_{t-2} = f(t) or a_0y_{t+2} + a_1y_{t+1} + a_2y_t = f(t)

The solving of a second order difference equation is very similar to the method of solving a second order differential equation, which is discussed in this previous post here.

The General Solution of a second order difference equation has a Complementary Function and a Particular Solution.

The Complementary Function (CF) is found by writing the auxiliary equation

a_0m^2 + a_1m + a_2 = 0 and solving it to find the two roots of such a quadratic equation.

When there are two different roots, m1 and m2, the CF is written as
y_t = A\left( m^t_1 \right) + B \left( m^t_2 \right) where A and B are arbitrary constants.
When there are two equal roots, such that m1 = m2 = m, then the CF is written as
y_t = (A + Bt)m^t.
When there are two complex roots, u + iv and u - iv, then the CF is

y_t = r^t (A \cos t\theta + B \sin t\theta) where r = \sqrt{u^2 + v^2} and \tan \theta = \frac{v}{u}.

Based on the standard form of the second order difference equation, the Particular Solution depends on the form f(t), the function in t on the RHS of the difference equation.

Again, similar to the case of differential equations, the Particular Solution (PS) is the same form as f(t) but contains undetermined coefficients which are determined by comparing them with the function in the RHS of the given difference equation.

If the function is a constant, say c, then the general form of the PS is k, an unknown constant.

If the function is in the form c \left( a^t \right), then the general form of the PS is k\left( a^t \right).

If the function is in the form at+ b, then a general linear function in t, A_1t + A_2, is the general form of the PS.

A homogeneous second order difference equation has zero on the RHS. Its standard form is a_1y_{t+2} + a_2y_{t+1} + a_3y_t = 0.

De Moivre’s Formula

Posted in complex, de moivre, theorem, trigonometry by beauangel on the January 17, 2007

For any complex number (and in particular any real number) x, and any integer n,

\left( \cos x + i \sin x \right)^n = \cos (nx) + i \sin (nx)

This is the equation that Abraham de Moivre came up with to link two branches of mathematics together, that of trigonometry and complex numbers.

This formula can be used to find the nth root of a complex number say z.

Written in polar form,

z = r (\cos x + i \sin x)

then,

 z^{\tfrac{1}{n}} = \left( r(\cos x + i \sin x) \right)^{\tfrac{1}{n}} = r^{\tfrac{1}{n}} \left\{ \cos \left( \frac{x+2k\pi}{n} \right) + i \sin \left( \frac{x+2k\pi}{n} \right)\right\}

where k varies from 0 to n — 1 to give the n roots of the complex number.