- #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