## FDEs

Moderator: Mike Everman

pezman
Posts: 613
Joined: Fri Oct 08, 2004 4:13 am
Antipspambot question: 0
Location: USA

### SAGE-acious

minor rant, deleted -- life's too short (and too long) to spent it working with anything but finest tools.

WebPilot
Posts: 3716
Joined: Tue Dec 07, 2004 6:51 pm
Antipspambot question: 0
Location: 41d 1' N 80d 22' W

### what is a derivative? (re: FDEs)

This was at the bottom of the last page and I feel it was prematurely

This is important to know because of what's to come next.
Last edited by WebPilot on Tue Feb 12, 2008 8:30 pm, edited 1 time in total.

WebPilot
Posts: 3716
Joined: Tue Dec 07, 2004 6:51 pm
Antipspambot question: 0
Location: 41d 1' N 80d 22' W

### central difference formulae (re: FDEs)

So, here we have formulas for f'(xj) and f''(xj) whose values at
a point xj can be determined by evaluating the function at
the points xj-1, xj and xj+1.

The error decreases as one makes smaller the interval, h. The
'run time' will increase though.
Last edited by WebPilot on Tue Feb 12, 2008 8:32 pm, edited 1 time in total.

Mike Everman
Posts: 4934
Joined: Fri Oct 31, 2003 7:25 am
Antipspambot question: 0
Location: santa barbara, CA
Contact:
Mike
__________________________
Follow my technical science blog at: http://mikeeverman.com/

WebPilot
Posts: 3716
Joined: Tue Dec 07, 2004 6:51 pm
Antipspambot question: 0
Location: 41d 1' N 80d 22' W

### central difference formulae (re: FDEs)

Appears to be, Mike.

Here is a repeat of the last two:

PyroJoe
Posts: 1743
Joined: Wed Aug 29, 2007 5:44 pm
Antipspambot question: 125
Location: Texas
When working with structural components calculating the deflection and such, may give an idea about how the structure will behave. Depending upon the Factor of Safety "allowed" may tell more as to why a structure appears very rigged for certain applications.

Sometimes you find yourself in weird areas, such as narrow load bearing columns where standard equations miss a buckling effect. Euler has some interesting formulas.

http://en.wikipedia.org/wiki/Buckling

WebPilot
Posts: 3716
Joined: Tue Dec 07, 2004 6:51 pm
Antipspambot question: 0
Location: 41d 1' N 80d 22' W

### discretization of the deflection (re: FDEs)

Pics are back online ...

~~~~~~~~~~~~~~~~~~~~~~~~~~~~
PyroJoe wrote:
When working with structural components calculating the deflection and such, may give an idea about how the structure will behave. Depending upon the Factor of Safety "allowed" may tell more as to why a structure appears very rigged for certain applications.

Sometimes you find yourself in weird areas, such as narrow load bearing columns where standard equations miss a buckling effect. Euler has some interesting formulas.

http://en.wikipedia.org/wiki/Buckling
Thanks PyroJoe,

In those 'weird areas' where you cannot find a 'canned' formula
that applies, a numerical method is your only resort.

Euler was a prolific man; I see his name in numerical methods,
engineering mechanics and fluid mechanics books all the time.

~~~~~~~~~~~~~~~~~~~~~~~~~~~~

This is the beginning of the numerical approach, for which some of
you have patiently been waiting. I shall give it to you, the reader,
in 'bite size' chunks. If I have 'done a good job' in my preliminary
posts, I think some of you will 'pick it up'.

NOTE: M(x) means M is a function of x, not M times x ... I have
tried to be consistent and where two terms are multiplied together, I
have used a 'centered dot'.

NOTE #2: the notation, yj+1, means y(xj+1), etc.

NOTE #3: the f(x) term in the middle on the right hand side of the
central difference formula should have been written, f(xj) or more
compactly, fj.

NOTE #4: j and i are 'dummy variables' and can take on the values
0, 1, 2, 3, 4 ... n.

WebPilot
Posts: 3716
Joined: Tue Dec 07, 2004 6:51 pm
Antipspambot question: 0
Location: 41d 1' N 80d 22' W

### numerical evaluation of 2nd derivative (re: FDEs)

Here are some minor revisions and some additional material.

(c.t.)

WebPilot
Posts: 3716
Joined: Tue Dec 07, 2004 6:51 pm
Antipspambot question: 0
Location: 41d 1' N 80d 22' W

### moving to point 2 and back to 0 (re: FDEs)

(c.t.)

WebPilot
Posts: 3716
Joined: Tue Dec 07, 2004 6:51 pm
Antipspambot question: 0
Location: 41d 1' N 80d 22' W

### the 2nd to the last point (re: FDEs)

(c.t.)

WebPilot
Posts: 3716
Joined: Tue Dec 07, 2004 6:51 pm
Antipspambot question: 0
Location: 41d 1' N 80d 22' W

### matrix notation and solution (re: FDEs)

Matrix notation is a form of mathematical 'shorthand' used in
Linear Algebra. As you'll see it saves an incredible amount of
writing (or typing).

(c.t.)

WebPilot
Posts: 3716
Joined: Tue Dec 07, 2004 6:51 pm
Antipspambot question: 0
Location: 41d 1' N 80d 22' W

### spreadsheet implementation of 'fdm' solution (re: FDEs)

1. n = 10 segments (n+1 points)
2. h = 720/10 = 72 in
3. xi's in cells B14:B24
4. elements of array, A, in C14:M24 (directly from my notes)
5. bi's in O14:O24 (note the formula for which is shown in the window)

(c.t.)

WebPilot
Posts: 3716
Joined: Tue Dec 07, 2004 6:51 pm
Antipspambot question: 0
Location: 41d 1' N 80d 22' W

### Matrix inversion in 2 simple steps (re: FDEs)

Excel has some powerful tools.

Let's invert the matrix, A.

Define Matrix, A
1. select cells C14:M24 and click Insert - Name - Define - A

Select where you wish the inverse to be located
2. select cells C27:M37 and type in window
- minverse(A)
- and then press Ctrl-Shift-Enter (3 keys simultaneously)

(c.t.)

Voilà! there it is! Rather easy, n'est-ce pas ?

WebPilot
Posts: 3716
Joined: Tue Dec 07, 2004 6:51 pm
Antipspambot question: 0
Location: 41d 1' N 80d 22' W

### finally calculating the yi's (re: FDEs)

Define this inverted matrix as AI
3. select cells C27:M37 and click Insert - Name - Define - AI

Let's finally calculate the yi's

4. type yi in cell G39
5. select cells C40:C50 (we need to put them somewhere)
- =MMULT(AI,bi)
- and then press Ctrl-Shift-Enter (3 keys simultaneously)

(c.t.)

WebPilot
Posts: 3716
Joined: Tue Dec 07, 2004 6:51 pm
Antipspambot question: 0
Location: 41d 1' N 80d 22' W

### compare 'fdm' and 'exact' plots {re:FDEs}

For plotting purposes, we need to compute xi/L (the station numbers).

6. type xi/L in cell F39
7. type =B14/L in cell F40
8. select and copy this into cells F41:F50
- this is done by left mouse clicking cell F:40 and 'dragging'
its lower right corner down to cell F50

We are ready to plot the numerical solution against the
analytical one that I (we) did previously.

(c.t.)

The analytical (exact) maximum deflection is 2.396 and
the numerical (fdm) value is 2.415 . The fdm method differs
from the exact at this location by a mere +0.793% (< 1%).

If you wish to experiment, change the value of h.