Questions tagged [truncation-error]

This tag is for questions relating to truncation error, which is the difference between the true (analytical) derivative of a function and its derivative obtained by numerical approximation.

Filter by
Sorted by
Tagged with
1
vote
0answers
9 views

Relative error of a number in machine epsilon units

I came across an estimation of the relative error between two representations of the same number, one implemented in C++ and another one via a computer algebra program, that was in units of machine ...
0
votes
1answer
32 views

Truncation and rounding error bound derivation for finite difference approximation to the first derivative

Finite difference approximation to the first derivative: $$ f'(x)= \frac{f(x+h) - f(x)}{h} $$ Heath's book on Scientific computing Section 1.2.4, Example 1.3 says truncation error for the finite ...
1
vote
0answers
13 views

Stirling's approximation fractional error

Given Stirling's approximation $\ln N!$ is approximated by $N\ln N-N+\frac{1}{2}\ln N$. I want to calculate the fractional error that comes from neglecting the third term $\frac{1}{2}\ln N$ for $N=10$ ...
0
votes
1answer
42 views

How to calculate the centered approximation of ${\frac{{df}}{{dt}} = - \frac{f}{\tau }}$?

In the textbook of An Introduction to Computational Methods in Hydrodynamics by Willy Benz. 2.2 Differential Equations. I know how to derive the general formula above $$ f\left( {{x_0} + \Delta x} \...
0
votes
1answer
33 views

Local Truncation Error on Improved Euler's Method

I need to reach the conclusion that $$\tau(x,h) = \frac{\phi(x + h) - \phi(x)}{h} - \frac{1}{2}[f(x,\phi(x)) + f(x+h,\phi(x) + h f(x,\phi(x)))] = O(h^2)$$ So I tried using Taylor expansions and ...
0
votes
0answers
28 views

What does the order of an integration method means

My question is how do you define the order of an integration method. I know, that eulers method $$y_{k+1}=y(t)+h\cdot f(y,t)$$ And I also know that it is a first-order integration method. but i don't ...
0
votes
1answer
62 views

Numerical Methods - Relative Error

In our lectures, we've been looking at relative error and in our recent problem sheet we were asked to prove the following: Let $\hat{x} \neq 0$ be an approximation of a non-zero quantity $x$. ...
0
votes
1answer
22 views

What is the error of FEM-like spline discretizations?

Let's have $f(x)$ a nice*, scalar valued function. It is approximated by $$ f(x)\approx g(x)=\sum_i f(x_i) N_i(x), $$ where $x_i = x_0+i \Delta x$ are uniformly spaced points, $N_i(x) = N(x-x_i)$, ...
1
vote
0answers
28 views

Find the local truncation error of the exponential-Euler approximation.

The Problem I have a differential equation of the following form $$\dot{y} = A(y)y+B(y)$$ Provided that $A$ does not depend on $y$ (or depends very weakly on $y$), I can approximate by using the ...
0
votes
0answers
27 views

Truncate a sum in order to speed up an algorithm (Big O)

Let $k\leq n$, I am looking to truncate this sum (with a Big O or Little o) in order to compute just few terms $$ \sum^k_{i=1} (k-(i-1))^{p}\sqrt{y_i} $$ where $y=(y_i)_{i\leq n}$ is a bounded ...
0
votes
1answer
34 views

Numerical analysis - Error analysis for the second order Taylor method

I'm trying to prove the following result for the second order Taylor method: $f$ is continuous and satisfies a Lipschitz condition with constant L on $D=\{(t,y)\mid a\leq t \leq b, -\infty<y<\...
0
votes
0answers
6 views

How do I quantify maximum error in approximations of partial differential systems?

Suppose I have a complicated system of partial differential equations, but I have data suggesting I only need to look at a limited range of values. After linearizing the system with a Jacobian and ...
0
votes
1answer
38 views

Simple loss of significance question.

I know that (because of the finiteness of computer arithmetic) for large values of $x$, the function $$f(x)=\log(x+1)-\log(x)$$ will be subtracting two very close values. Can I get around this by re-...
0
votes
0answers
31 views

Best truncation for a stochastic discrete sum

Let $n\in\mathbb N$ and $\delta=\frac{1}{n}$. We have $c\in(-\frac{1}{2},\frac{1}{2})$, $\xi_i=\pm 1$ for $i=0..n$, it is a random variable, we also have $b_i-b_{i-1}=O(\delta)$, and, I assume $b_i=O(...
0
votes
0answers
50 views

Derive local truncation error for Improved Euler

I'm trying to find the local truncation error of the autonomous ODE: fx/ft = f(x). I know that the error is |x(t1) − x1|, but I can't successfully figure out the Taylor expansion to get to the answer, ...
0
votes
3answers
58 views

Forward and centered finite difference give same error plot: why?

Let us consider the following standard approximations of the first derivative of a function $$FD = \frac{f(x+h)-f(x)}{h}$$ $$CFD = \frac{f(x+h)-f(x-h)}{2h}$$ The first is first order accurate, while ...
0
votes
0answers
34 views

What factorial number to get a good approximation of the matrix exponential?

$$e^X = \sum_{k=0}^N{1 \over k!}X^k$$ Assume that $X \in \Re^{nxn}$ is random matrix. What number $N$ should I use to get a good accuracy compared if $N = \infty$? Is this possible to measure?
0
votes
0answers
22 views

Relative error from truncation error in Taylor series expansion

Given the function $f(x)=\sin x$, please expand it about $x=0$ using Taylor series and truncate the series to $n=6$ terms then find the relative error at $x=\pi/4$ due to truncation found?
0
votes
2answers
39 views

Closely minimize error bound $\frac{4 \pi \exp(\cosh(a))}{\exp(a N) -1}$

I'm trying to minimize an error bound $$\frac{4 \pi \exp(\cosh(a))}{\exp(a N) -1},$$ where $N$ is the step size for the trapezoidal rule and $-a < Im < a, a > 0$ is a strip bound which may ...
0
votes
0answers
43 views

How to prove the global error of this method? [duplicate]

To prove the GE of $$ x_{n+1} = x_n + hf(t_n + \frac{1}{2}h, x_n + \frac{1}{2}hf(t_n, x_n))$$ is $O(h^2)$, so I can assume the exact solution $x(t)$ of the ODE $x' = f(t, x(t))$ is smooth and $f$ ...
1
vote
1answer
53 views

forward - backward differencing = central differencing

From Taylor series, we can derive: Forward Differencing Formula: $$ f'(x_{i}) = \frac{f(x_{i+1}) - f(x_{i})}{h} - \frac{f''(x_{i})h}{2!} $$ $$\tag 1 f'(x) \approx \dfrac{f(x+h)-f(x)}{h}$$ (1) ...
0
votes
2answers
43 views

Approximate the integral $\int_0^{0.5}{x^2e^{x^2}}dx$ correct to four decimal places using a Maclaurin series.

I got $$\int_0^{0.5}{\sum_0^\infty}\frac{x^{2n+2}}{n!}dx$$ for the taylor series representation, but I'm not sure what to do next. Do I use 0 and 0.5 as bounds for z for the Lagrange Error Bound? And ...
1
vote
0answers
36 views

The numerical solution of Van der Pol's equation does not show chaotic behavior as expected.

I post this question again with more details : For a bachelor's work we have to study the chaotic behavior shown in the numerical solution of the driven van der pol oscillator as a function of the ...
1
vote
1answer
74 views

Finding an upper bound for the local error with the Euler method

This is not about a particular problem but more a question about how to best approach this kind of problem. I'll give three examples and my approach to them. Problem 1 $$ y' = 2y - 5 \sin(t)$$ $$ y(...
2
votes
1answer
47 views

Order of accuracy for non-smooth solutions and non-smooth local truncation errors

I'm working with numerical methods for solving PDEs (Linear Advection/Euler equations with temporal and spatial discretisation) using finite difference/finite volume methods. In these simulations I ...
0
votes
1answer
21 views

Bounding the error for the remainder of $\log(x)$

We are asked to bound the error given by the remainder of the Taylor series of $\log(x)$ about some point $a>0$. Using the remainder as: $$R_n = \frac{f^{(n+1)}(\xi)}{(n+1)!}(x - a)^{n+1} $$ and ...
0
votes
0answers
65 views

General procedure for calculating Local and Global Truncation error for a finite difference method

This question is a bit general, but hopefully that's ok, as I expect there to be clear, non-opinionated answers. I've been looking all over the internet, in textbooks and lecture notes etc., and I ...
2
votes
1answer
55 views

Global Error Bound for Implicit Euler

I'm trying to derive an error bound for the approximate solution obtained with Backward Euler to the IVP $$\frac{dy}{dt} = f(y), \hspace{.75cm} y(0) = y_0,$$ where $f \in C^2(\mathbb{R})$ with ...
2
votes
2answers
243 views

Calculating the truncation error for exponential function in complex plane

Having seen this question on Taylor approximation of complex exponential function, I am looking for a solution this problem and would be great if I also knew the name of the paper. It is about ...
0
votes
0answers
14 views

Nummerical truncation on MATLAB - Increase of precision

It might be not suitable for the current forum, but it is math-related. Than, I wonder if there is a MATLAB user among us. I currently implement multible degrees of Runge-Kutta methods on mentioned ...
0
votes
0answers
69 views

Error in Linear Interpolation

For part a I have found the estimation in the highlighted blue, however I am unsure of how to find the error. previously I had been using the equation $$ \lvert f(x)-p_1(x)\rvert\le\left(\frac{h^2}8\...
2
votes
1answer
48 views

How do I avoid significant rounding error in evaluating $(\ln(x) - \sin(\pi x))(1-x)^{-1}$?

How do I avoid significant rounding error in evaluating $$\frac{\ln(x) - \sin(\pi x) }{1-x}$$ This function causes error as $x\to 1$. How can this be avoided? I tried using taylor's expansion but I ...
0
votes
1answer
105 views

A minus sign on the truncation error: Crank-Nicolson method for a diffusion equation with consume

I was studying by first time truncation error on finite schemes and the author of the article I am studying states the equation: $u_t=u_{xx}-1$ and the truncation error $T_m^{n+1}=\dfrac{\...
0
votes
1answer
29 views

Given an analytic function can I derive to what precision I need to evaluate its arguments to get a result of a given precision?

Suppose I have some arbitrary analytic function over the reals e.g.: $$ x \mapsto \frac{\sqrt{\sin(x)+2e^x}}{x^2 - \ln(x^x)} $$ Given some input of arbitrary precision $x$ how can I evaluate such an ...
0
votes
1answer
71 views

Confusion regarding order of error/truncation notation for iterative methods

I am confused as to the meaning of the $O(h)$ notation used to denote error associated with an iterative algorithm (for example RKF45 has an local error of order $O(h^5)$) The general template for ...
0
votes
0answers
17 views

Error Analysis for a Fraction

Suppose I have the following functions $f(x)$ and $g(x)$, such that: $$ f(x) = \tilde{f}(x) + O(x^{-p}) $$ $$ g(x) = \tilde{g}(x) + O(x^{q}) $$ where $p,q \in \mathbb{Z}_{++}$ and f,g are positive ...
1
vote
1answer
55 views

How do I interpret my error graph?

I wrote an RK4 algorithm and am testing it on $y' = -ty$ which has the solution $y(t) = e^{-t^2 / 2}$ I decided to also graph the error, which I am now trying to decipher. I plotted the solution and ...
0
votes
1answer
19 views

proof: upper bound error of approximating a number with only $n$ decimals precision

Suppose you have a real number $A$ and approximate it by only $n$ decimal places. Call this number $a$. proof that the upper bound of absolute error of this approximation $|A-a| \le 5 \times 10^{-(n+1)...
1
vote
1answer
73 views

Truncation error

I wonder if the truncation error that I derived in the following approximation really has order 2? If so I also wonder what happens to the $u_{xxxx}$ term since it does not cancel out? $$u^n_{j+2}-4u^...
0
votes
1answer
65 views

How to prove finite difference approximation has error of order $\mathcal{O}(\Delta x^2)$

I'm asked to prove that the finite difference approximation $$u_{xx}(x_i) = \frac{u_{i+1} - 2u_i + u_{i-1}}{\Delta x^2}$$ gives a discretization error of order $\mathcal{O}(\Delta x^2).$ My attempt: ...
1
vote
1answer
58 views

maximum error when rounding off multiple times

So I am aware that when you round to n decimal places accuracy, the maximum error is $~0.5 × 10^n~$ But if I use the rounded result, and use multiply it by another un-rounded number and round the ...
1
vote
0answers
81 views

Truncation error and non self-starting Heun

I've seen two different truncation formulas for the midpoint rule. A common one is $h^3 \frac{ f''}{24}$. Another, referred to as open Newton Cotes, is $h^3 \frac{f''}{3}$. The Newton Cotes ...
1
vote
1answer
50 views

Truncation error when applying a finite difference scheme to solve $u_t +Au_x = 0$

The wave equation in one space dimension is given as $$ u_t + Au_x = 0 $$ where $$ u := \begin{bmatrix} v(x,\, t) \\ w(x,\, t) \end{bmatrix}, \quad A = \begin{bmatrix} 0 & -1 \\ -1 & 0 \end{...
0
votes
0answers
41 views

Bounding the error in a solution, to an IVP, produced by RK4.

What techniques exist for bounding the error in a solution, to an IVP, produced by RK4? The below problem is intended to contextualize the question. Problem The $x$, $y$ and $z$ axes of a coordiante ...
1
vote
0answers
528 views

What is the formula for the local truncation error in RK4?

The local truncation error of a one-step ODE solver is defined to be $$e_{i+1} = \lvert y(t_{i+1}) - \tilde{y}_{i+1}\rvert,$$ the absolute value of the difference between the correct solution of the "...
2
votes
1answer
117 views

Questions about 0.999… equals 1 [closed]

Being 0.999... = 1, I expect that they have the same behaviour when applying the same algorithm/operation, but: If we define >, <, =, as checking digit by digit two number, we have that 0 < 1 ...
0
votes
1answer
187 views

How can I be sure that a partial sum is accurate to some number of decimal places?

In a homework assignment, I am asked how many terms of a series are needed to obtain four decimal places (chopped) of accuracy. There are certain tricks that I am supposed to use, where I can ...
1
vote
2answers
424 views

Deriving the central Euler method and intuition

My professor (Dutch) asked us to determine, among other things, the truncation error of the central Euler method. First of all, this is probably not the correct term, since there are very few results ...
0
votes
1answer
61 views

Finding error in a an approximation

We want to see the total error in approximating $$ f'(x) \approx \frac{ f(x+h)-f(x) }{h} $$ where $f: R \to R$ is differentiable. We can find $\theta \in [x,x+h]$ by Taylor's to that $$ f(x+h) = f(x) +...
0
votes
1answer
99 views

Local error per unit step

The solution of the ODE $$ y' = f(t,y)$$ is being seeked. Let $u_{m}$ be the numerical solution of a one step method and $y(t_m)$ its true solution. The local error $e_{loc} $ is then defined as $$...