Function composition in finite differences

In summary, the individual is asking for help expressing [ tex ] \frac{d}{x}\left[ A(x)\frac{d\, u(x)}{x} \right] [ /tex ] using finite differences. They have found the centered difference formula to be [ 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 ]
  • #1
fmilano
7
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
  • #2
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.
 

What is function composition in finite differences?

Function composition in finite differences is a mathematical concept that involves combining multiple functions to create a new function. It is commonly used in numerical analysis to approximate derivatives of a given function.

How is function composition used in finite differences?

In finite differences, function composition is used to approximate derivatives by taking the difference between two points on a function's graph. By using multiple compositions, a more accurate approximation can be achieved.

What is the difference between forward and backward finite differences?

Forward finite differences involve using points to the right of a given point on a function's graph, while backward finite differences use points to the left. This results in different approximations of the derivative, with forward differences being more accurate for positive derivatives and backward differences being more accurate for negative derivatives.

How do you choose the step size for finite differences?

The step size for finite differences should be small enough to ensure accuracy, but not so small that it leads to computational errors. A common approach is to use the smallest possible step size that does not result in significant rounding errors.

What are some common applications of function composition in finite differences?

Function composition in finite differences is used in many fields, including physics, engineering, and economics. Some common applications include approximating derivatives in differential equations and optimization problems, as well as analyzing data in statistics and finance.

Similar threads

Replies
1
Views
1K
Replies
1
Views
1K
  • Differential Equations
Replies
3
Views
1K
  • Differential Equations
Replies
8
Views
4K
  • Differential Equations
Replies
2
Views
1K
  • Differential Equations
Replies
4
Views
636
  • Differential Equations
Replies
1
Views
891
  • Differential Equations
Replies
1
Views
2K
Replies
5
Views
1K
Replies
1
Views
1K
Back
Top