- #1
Adyssa
- 203
- 3
Homework Statement
I'm doing a class on Numerical Solutions of DE and I have my first assignment. The problem is stated:
Consider the following second order boundary value problem:
[itex]\epsilon \frac{d^{2}y}{dx^{2}} + \frac{1}{2+x-x^{2}} \frac{dy}{dx}-\frac{2}{1+x}y = 4sin(3x), y(0) = 2, y(2) = 1, \epsilon = 0.01, h = 2N, x_{i} = ih[/itex]
We can approximate the derivatives at the N-1 interior points using the following finite difference approximations:
[itex]y'(x_{i}) = \frac{-y_{i-1} + y_{i+1}}{2h} + O(h^{2})[/itex] and [itex]y''(x_{i}) = \frac{y_{i-1} - 2y_{i} + y_{i+1}}{h^{2}} + O(h^{2})[/itex]
Homework Equations
as above.
The Attempt at a Solution
I don't understand the meaning of the [itex]O(h^{2})[/itex] term for each of the finite difference approximations. I think it refers to the error but I don't know how to account for it in my workings.
As for solving the boundary problem, my next step is to sub in y'(x) and y''(x) to the equation and work out equations that I can use to form a tri-diagonal matrix and then compute the solution and plot it, I think I can do this part ok, we worked through a similar problem in class but it didn't contain this [itex]O(h^{2})[/itex] term