Function composition in finite differences

Click For Summary
SUMMARY

The discussion focuses on expressing finite differences for the derivative of a product involving a function A(x) and u(x). The user, Federico, explores centered differences and confirms the need for values of A at i + 1/2 and i - 1/2 for accurate calculations. He also notes that using forward or backward differences requires A values at specific indices. The conversation emphasizes the importance of correctly applying finite difference methods in numerical analysis.

PREREQUISITES
  • Understanding of finite difference methods
  • Familiarity with LaTeX for mathematical expressions
  • Knowledge of numerical analysis concepts
  • Basic calculus, specifically derivatives
NEXT STEPS
  • Research centered finite difference methods in numerical analysis
  • Learn about forward and backward finite difference approximations
  • Explore the application of LaTeX in mathematical documentation
  • Study the implications of discretization in differential equations
USEFUL FOR

Mathematicians, numerical analysts, students studying calculus and differential equations, and anyone involved in computational modeling using finite differences.

fmilano
Messages
7
Reaction score
0
Hi. I am trying to express the following in finite differences:

[ tex ] \frac{d}{x}\left[ A(x)\frac{d\, u(x)}{x} \right] [ /tex ]

If I take centered differences I get:

[ tex ] \left{ \frac{d}{x}\left[ A(x)\frac{d\, u(x)}{x} \right] \right}_i = \frac{[A(x)\frac{d\, u(x)}{x}]_{i+1/2} - [A(x)\frac{d\, u(x)}{x}]_{i-1/2}}{h} = [ /tex ]

[ tex ] = \frac{A_{i+1/2}\[\frac{u_{i+1}-u_{i}}{h}\] - A_{i-1/2}\[\frac{u_{i}-u_{i-1}}{h}\]}{h} [ /tex ]

So, if I use centered differences I would have to have values for A at i + 1/2 and A at i - 1/2; is that correct? If I use forward or backward differences I need A values at i, i + 1, i + 2 and at i, i -1, i -2 respectively.

Am I on the correct path?

I would really appreciate any hint.

Thanks in advance,

Federico
 
Physics news on Phys.org
I think your LaTex expressions would show up correctly if you omit the space between the brackets around the tex tags and what is inside the tag.
 

Similar threads

  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 1 ·
Replies
1
Views
3K
  • · Replies 8 ·
Replies
8
Views
5K
  • · Replies 5 ·
Replies
5
Views
2K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 3 ·
Replies
3
Views
4K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 1 ·
Replies
1
Views
3K
  • · Replies 4 ·
Replies
4
Views
3K
  • · Replies 2 ·
Replies
2
Views
1K