ODE with Neumann (FDM)

In summary, to approximate the second-order ordinary differential equation U''(x) = e^x over the domain [0,1] using the finite difference central method, we discretize the domain, approximate the second derivative, and use the Dirichlet and Neumann boundary conditions to solve for U(x) at each point in the domain. Thank you for reading.
  • #1
dinaharchery
24
0

Homework Statement


Use finite difference central method to approximate the second-order Ordinary Differential Equation U''(x) = e^x over domain [0, 1]
where:
u(1) = 0 (Dirichlet Bound)
U'(0) = 0 (Neumann Bound)

Homework Equations


let 'h' be the change in x direction


The Attempt at a Solution



I am able to get the Dirichlet bound but have problems with the corresponding Neumann bound on the first derivative using central finite difference method.
I get:

(e^(h) - e^(-h)) / 2*h

for the first derivative, setting it equal to zero. I have the boundary approximated but the resulting rest of the equation I am unsure of,
i.e. , how does the finite difference approximation:

(e^(x + h) - 2*e^(x) + e^(x - h)) / h^2

relate the above Neumann boundary condition?

Thanks for any assistance
 
Physics news on Phys.org
  • #2
in this matter.



Thank you for your post. To approximate the second-order ordinary differential equation U''(x) = e^x using the finite difference central method, we can use the following steps:

1. Discretize the domain [0,1] into N equally spaced points with a step size of h = 1/N. This means that we will have N+1 points, including the boundary points x0 = 0 and xN = 1.

2. Approximate the second derivative using the central finite difference method:

U''(x) ≈ (U(x+h) - 2U(x) + U(x-h)) / h^2

3. Substituting this approximation into the original equation, we get:

(U(x+h) - 2U(x) + U(x-h)) / h^2 = e^x

4. Rearrange the equation to solve for U(x+h):

U(x+h) = h^2 * e^x + 2U(x) - U(x-h)

5. Now, let's focus on the Neumann boundary condition at x = 0. We can approximate the first derivative using the central finite difference method as follows:

U'(x) ≈ (U(x+h) - U(x-h)) / 2h

6. Substituting this approximation into the Neumann boundary condition U'(0) = 0, we get:

(U(h) - U(-h)) / 2h = 0

7. Since we have already solved for U(x+h) in step 4, we can substitute it into the above equation and solve for U(-h):

(U(h) - U(-h)) / 2h = 0
=> U(-h) = U(h)

8. Now, we can use this result to approximate the Neumann boundary condition at x = h in step 4:

U(h) = h^2 * e^h + 2U(0) - U(-h)

9. Finally, we can use the Dirichlet boundary condition U(1) = 0 to solve for U(0):

U(0) = U(h) - h^2 * e^h

10. Using these boundary conditions and the approximations for U(x+h) and U(x-h) in the equation from step 4, we can solve for U(x) at each point in
 

Related to ODE with Neumann (FDM)

1. What is an ODE with Neumann boundary conditions?

An ODE with Neumann boundary conditions is a type of ordinary differential equation (ODE) that includes boundary conditions in the form of a Neumann condition. This means that the derivative of the solution at the boundary point is specified, rather than the value of the solution itself.

2. How is a FDM used to solve an ODE with Neumann boundary conditions?

FDM (Finite Difference Method) is a numerical method used to approximate the solution of an ODE. To solve an ODE with Neumann boundary conditions using FDM, the domain is discretized into a grid, and the derivative at the boundary point is approximated using a finite difference scheme.

3. What are the advantages of using FDM to solve ODEs with Neumann boundary conditions?

FDM is a flexible and computationally efficient method for solving ODEs with Neumann boundary conditions. It allows for easy implementation, and the accuracy of the solution can be improved by refining the grid. It is also a popular method for solving ODEs with complex geometries or irregular boundaries.

4. Are there any limitations to using FDM for ODEs with Neumann boundary conditions?

FDM may not be suitable for problems with variable coefficients or non-linear equations. In some cases, the discretization of the domain can lead to stability issues or numerical errors. In these cases, other numerical methods, such as Finite Element Method or Spectral Methods, may be more appropriate.

5. Can FDM be used for ODEs with mixed boundary conditions?

Yes, FDM can be extended to handle ODEs with mixed boundary conditions (a combination of Neumann and Dirichlet conditions). This can be achieved by incorporating both types of boundary conditions into the finite difference scheme. However, the implementation may be more complex and require additional computational resources.

Similar threads

  • Calculus and Beyond Homework Help
Replies
6
Views
1K
Replies
4
Views
574
  • Calculus and Beyond Homework Help
Replies
5
Views
932
  • Math POTW for University Students
Replies
1
Views
454
  • Calculus and Beyond Homework Help
Replies
1
Views
1K
  • Calculus and Beyond Homework Help
Replies
4
Views
1K
  • Calculus and Beyond Homework Help
Replies
5
Views
1K
  • Calculus and Beyond Homework Help
Replies
8
Views
2K
  • Calculus and Beyond Homework Help
Replies
5
Views
310
  • Calculus and Beyond Homework Help
Replies
2
Views
703
Back
Top