Numerical analysis is a powerful tool for finding approximate solutions to complex mathematical problems, particularly differential equations. In the fields of space plasma physics and solar physics, whole courses are devoted to numerical analysis approaches that can then be applied to numerical simulations of specific problems - say the development of auroral substorms, or the origins of coronal mass ejections. In this first part of my introduction we will not dive in at that deep end but confine attention to preliminaries.

In fact though, we've already seen some cases of how numerical analysis can be applied, for instance in power series solutions to differential equations:

- Looking At Power Series Solutions To Differential Equations...
- In the above post/link we see a key element in numerical analysis, the use of Taylor series as an approximation to a function.

Let f then be a function defined on the closed interval [a, b] and f has n continuous
derivatives on [a, b] then f ^{n+1 }(x)
exists for all x in [a, b]. And:

f(b) = f(a) + f ’(a) **×**** **(b – a) + f ” (a)/ 2! (b – a)^{2}
+

….+ f^{ n} (a)** / **n!
(b – a)^{n}^{ }** + **f ^{n+1 }(c)/ (n
+1)! [(b- a)^{ n+1}]

Where c lies between a and b.

So in the case of f(x) in the power series solns. post:

f(x) = f(x _{o })
+ f ’(x _{o}) **×**** **(x – x _{o})
+ f ” (x _{o}) (x
– x _{o})^{2} /
2! +

f ”’ (x _{o}) (x – x _{o})^{3} /
2! + f^{ n} (x _{o})** **(x– x _{o})^{n }**/ **n!^{ }** **+
….

This is provided all derivatives exist at x = x _{o}

An example of use of Taylor series in a specific problem:

Integrate:
ò^{ b} _{a}
^{ }f(x) dx

Using a *Taylor series*
method and justify it.

__Solution__:

Take f(x) = **å** ^{¥} _{n
= 0} f^{ n} (a) **/ **n! (x – a)^{ n}

Then: ò^{ b} _{a}
^{ } ^{ }f(x) dx = ò^{ b} _{a}
^{ } ^{ }f(a) dx + **ò**^{ b}
_{a} ^{ }f ’(a) **×**** **(x – a) dx

+ ò^{ b} _{a}
^{ } f ” (a)/ 2! (x – a)^{2}

ò^{ }^{b} _{a} ^{ }f(x) dx = [f (a) **×**** **(b – a) + f ’(a)/ 2! (x – a)^{2 }**÷**^{ b}_{ a }

+ ò^{ b} _{a}
f ” (c)/ 2! (x – a)^{2}

^{}

** _{ }**The addition of the two terms

*in the bracket, with b, a limits*, will yield a least upper bound to the value of the integral. Given a function f, assume it is infinitely differentiable at some point a. Then we can write:

f(x)
= å ^{¥} _{n
= 0} f^{ n} (a) **/ **n! (x – a)^{ n}

Series and partial sums can also factor into numerical analysis, and convergence is often at the forefront.

If
{S _{n}_{ }} converges we say the series
converges.

Where: S _{n} = å ^{k} _{k = 1 }u^{ }_{n }= u^{ }_{1} + u^{ }_{2}
+ u^{ }_{3
} +…. u^{ }_{n}

From
which we can get a sequence of partial sums:

E.g. S _{1} = u^{ }_{1 , }S _{2} = u^{ }_{1 }+ u^{ }_{2} ,_{ } S _{3} = u^{ }_{1 }+ u^{ }_{2} ^{ }_{3}

*Example:*

å ^{¥} _{n = 1 }1/ (n+1) = å ^{¥} _{n = 1 }(1/n - 1/ (n +!)
= 1

S _{k} = ( 1 – ½)
+(1/2 – 1/3) + (1/3 – ¼) + …..(1/k – 1/ k -1) = 1

So: S _{k} = 1 - 1/ k + 1 converges to 1

If: å u^{ }_{n } converges then: lim u^{ }_{n}_{ }_{®}_{ 0o }= 0

For absolute convergence: Given: å ^{¥} _{n = 1 }u^{ }_{n}

If å ^{¥} _{n = 1 }÷ u^{ }_{n }÷ converges then å u^{ }_{n } converges absolutely

Ratio Test for absolute convergence.

Compute: lim _{n}_{®}_{ 0o}÷ u^{ }_{n+1 } / u^{ }_{n }÷ = __L__

If __L__ < 1 the series converges

If __L__ > 1 the series diverges

If __L__ = 1 the test fails, so no result

*Example: *å ^{¥} _{n = 1}* *n (2/3)^{ n}

lim _{n}_{®}_{ 0}÷ n + 1 (2/3)^{ n+1} / n (2/3)^{ n}^{ }÷ = lim _{n}_{®}_{ 0o }÷ (2/3)(1 + 1/n)÷ =

= 2/3 < 1 (So converges absolutely)

Now back to more basic generalities to see how numerical analysis works in the most primitive settings.

We take x and y as real numbers ( R_{ }) and let F be a generic computing system. Then x* and y* are the representations of x and y in F. Thus we can write for translation sake:

x = x* + e

y = y* + h

Let w denote a binary operation and let w* be the pseudo operation correction for w. Then if I want: x w y I actually get: x* w* y*. So that:

x w y = x* w* y* = (x w y - x* w y*) + (x* w y* - x* w* y*)

Hence:

÷ x w y - x* w* y*÷ __< __ ÷ x w y - x* w y*÷ +

÷ x* w y* - x* w* y*÷** **

Then the relative error is:

÷ x w y - x* w* y*÷** **/ x* w* y*

While the absolute error is: ÷ x w y - x* w* y*÷ ** **

This primitive and admittedly reductive example gets to the heart of numerical analysis.

__Suggested Problems For Math Nerds:__

1) Evaluate: 5 x^{4 } + 4 x^{3 } + 6 x^{2 } + 2x + 2

At x = 1.2 using Horner's approximation method

You may use the "Horner calculator" e.g.

Online calculator for the Horner scheme (elsenaju.eu)

But then write all steps in long form ultimately comparing:

a) 4 multiplications, 4 additions, and

b) 10 multiplications, 4 additions.

2) Check to see if the series:

å ^{¥} _{n = 1}* * 2^{n } (x + 5)^{n }^{ }/n^{ 2}

Converges.

*Challenge Problem:*

The Taylor
series can be used to find an approximation to a function’s value, i.e. of a
square root, in terms of the order n desired viz.

P_{ n }= f(n) + f ’(n) **×**** **(x – n) + f ” (n)/ 2! (x – n)^{2} +

….+ f^{ ”’} (n)** / 3**! (x – n)^{3 }** …..+ **f ^{n+1 }(n)/ (n
+1)! [(x- n)^{ n+1}]

Use the
Taylor series to 4^{th} order (n = 4 or
P_{ 4}) to obtain the value of
**Ö** 5

## No comments:

Post a Comment