Skip to content

Commit 01c43f6

Browse files
committed
Fix: Correct Taylor expansion in local truncation error calculation
1 parent 3df29a2 commit 01c43f6

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

docs/src/lectures/lecture3.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ u' = f(u,p,t)
1313
where ``u(t_0) = u_0`` is known, to solve this equation on a time span from ``t \in [t_0, t_f]`` is known as the Initial Value Problem (IVP). The most basic method for handling this type of equation is known as Euler's method, which is given by the linear approximation of the derivative. Let ``u_n`` be the numerical approximation to ``u(t_0 + nh)`` at time ``t_n = t_0 + nh`` where ``h`` is the time discretization size, then can approximate via a Taylor Series expansion:
1414

1515
```math
16-
u(t+(n+1)h) = u(t+nh) + h u'(t+nh) + \frac{1}{2}h^2 u''(t) + \mathcal{O}(h^3)
16+
u(t+(n+1)h) = u(t+nh) + h u'(t+nh) + \frac{1}{2}h^2 u''(t+nh) + \mathcal{O}(h^3)
1717
```
1818

1919
which motivates the approximation by dropping the higher order terms:
@@ -65,10 +65,10 @@ LTE = u(t+(n+1)h) - u_{n+1}
6565
LTE = (u(t+nh) + h u'(t+nh) + \mathcal{O}(h^2)) - (u_n + h f(u_n,p,t_n))
6666
```
6767
```math
68-
LTE = (u(t+nh) + h u'(t+nh) + \frac{1}{2}h^2 u''(t) + \mathcal{O}(h^3)) - (u(t+nh) + h u'(t+nh))
68+
LTE = (u(t+nh) + h u'(t+nh) + \frac{1}{2}h^2 u''(t+nh) + \mathcal{O}(h^3)) - (u(t+nh) + h u'(t+nh))
6969
```
7070
```math
71-
LTE = \frac{1}{2}h^2 u''(t) + \mathcal{O}(h^3)
71+
LTE = \frac{1}{2}h^2 u''(t+nh) + \mathcal{O}(h^3)
7272
```
7373

7474
### Global Truncation Error in Euler's Method

0 commit comments

Comments
 (0)