Questions on numerical analysis/numerical methods; methods for approximately solving various problems that often do not admit exact solutions.

learn more… | top users | synonyms (2)

4
votes
1answer
132 views

What's the fastest way to get an exact value for a product of (powers of polynomials)?

Suppose we have two integers $a$ and $b$. Also, suppose we have polynomials in $x$, $p_k(x)$. Finally, suppose we have a sequence of integers, where an integer in the sequence is denoted by $c_k$. ...
4
votes
1answer
552 views

Efficiently calculating the logarithmic integral with complex argument

My number theory library of choice doesn't implement the logarithmic integral for complex values. I thought that I might take a crack at coding it, but I thought I'd ask here first for algorithmic ...
3
votes
1answer
56 views

Need help to simplify an equation

I am computing an error estimate where at the end I got the following term $\|X_{k} - G\|\leq (q^{2^{k+2}} + q^{2^{k+3}}+ q^{2^{k+4}}....)q^{-3}\|Y_{0}\| + q^{2^{k+1}}.q^{-2}\|X_0\|$ , where $X_k$ ...
3
votes
1answer
441 views

Explain the error term in Euler method

Task: I had to find out some estimates for M and L to make sure the proportional accucrazy is not above $10^{-4}$ in the Euler method with the problem below. I am trying to understand the page 672 on ...
2
votes
0answers
77 views

how to choose point spacing to approximate a parametric curve using line segments?

Suppose I have a parametric equation for a curve $\vec{r} = f(t)$, which I wish to draw using line segments between some set of points at times $t_0, t_1, t_2,$ etc. If I want to achieve a given ...
2
votes
2answers
247 views

How to get the linear equation system for finite element method from the variational formulation

Let the problem be $$-u'' + a(x) u = f , \;x \in \Omega = ]0,1[ , \;u(0) = \alpha ; \;u(1) = \beta,$$ where $f \in L^2(\Omega) , a(x) \geq a_0 > 0 , a(x) \in L^{\infty}(\Omega).$ This problem ...
2
votes
1answer
367 views

Derivation of weak form for variational problem

My question is about understanding the derivation of the weak form of a variational problem (to be used for the solution via the finite element method). The problem is as follows (it is an image ...
2
votes
1answer
756 views

Numerical methods book

I'm looking for an introductory book on numerical methods. I'm beginning to learn to program (in Haskell, a functional language, if that would affect the recommendations). The reason I want such a ...
14
votes
1answer
258 views

Fastest curve from $p_0$ to $p_1$

I'm trying to solve a problem in path planning: Given points $p_0$ and $p_1$ and vectors $v_0$ and $v_1$, find a function $p(t)$ st. $p(0) = p_0$, $p(T) = p_1$, $p'(0) = v_0$ and $p'(T) = ...
6
votes
2answers
112 views

Exact result of a series using Euler-Maclaurin expansion.

This is a variant of Exercise 64 in Chapter 9 of concrete mathematics. Prove the following identity \begin{equation} \sum_{n = -\infty}^{\infty}' \frac{1 - \cos( 2\pi n k )}{n^2 } = 2 \pi^2 ( k - ...
5
votes
2answers
1k views

Fast Matlab Code for hypergeometric function $_2F_1$

I am looking for a good numerical algorithm to evaluate the hypergeometric function $_2F_1$ in Matlab (hypergeom in Matlab is very slow). I looked across the ...
5
votes
1answer
2k views

Natural cubic splines vs. Piecewise Hermite Splines

Recently, I was reading about a "Natural Piecewise Hermite Spline" in Game Programming Gems 5 (under the Spline-Based Time Control for Animation). This particular spline is used for generating a C2 ...
5
votes
2answers
1k views

Symmetrize eigenvectors of degenerate (repeated) eigenvalue

I have the following situation: I have a hermitian Matrix $A$ that satisfies some symmetries which I can express via $AS = SA$ for a unitary matrix $S$. Now I am interested in the eigenvectors of ...
4
votes
4answers
759 views

Recommendations for Numerical Analysis texts?

I'm in a numerical analysis course right now and it's pretty rigorous but I'm enjoying it a lot. I took a lower level course before that was more oriented towards implementation of numerical methods, ...
4
votes
2answers
6k views

Is a non-repeating and non-terminating decimal always an irrational?

We can build $\frac{1}{33}$ like this, $.030303$ $\cdots$ ($03$ repeats). $.0303$ $\cdots$ tends to $\frac{1}{33}$. So,I was wondering this: In the decimal representation, if we start writing the ...
4
votes
4answers
898 views

Calculation of Bessel Functions

I want to calculate the Bessel function, given by $$J_\alpha (\beta) = \sum_{m=0}^{\infty}\frac{(-1)^m}{m!\Gamma(m+\alpha +1)} \left(\frac{\beta}{2}\right)^{2m}$$ I know there are some tables that ...
4
votes
2answers
527 views

Numerical analysis textbooks and floating point numbers

What are some recommended numerical analysis books on floating point numbers? I'd like the book to have the following In depth coverage on the representation of floating point numbers on modern ...
4
votes
0answers
831 views

Convergence of Gauss-Newton method for piecewise linear functions

Notation for Gauss-Newton method Non-linear least squares problems are often solved by the Levenberg-Marquardt algorithm, which can be viewed as a Gauss–Newton method using a trust region approach. ...
4
votes
4answers
453 views

Numerical computation of the Rayleigh-Lamb curves

The Rayleigh-Lamb equations: $$\frac{\tan (pd)}{\tan (qd)}=-\left[\frac{4k^2pq}{\left(k^2-q^2\right)^2}\right]^{\pm 1}$$ (two equations, one with the +1 exponent and the other with the -1 exponent) ...
3
votes
2answers
102 views

Bernstein polynomial looks like this: $B_i^n={{n}\choose{i}}x^i(1-x)^{n-i}$.Find it's $r$'th derivative.

Bernstein polynomials are defined like this $B_i^n={{n}\choose{i}}x^i(1-x)^{n-i}$.I need to prove that $r$'th derivative of it is equal to: ...
3
votes
2answers
129 views

Root of the function $f(x)=xe^x-R$

How can we find the root of the function $f(x)=xe^x - R$ for a general R where $R>=-1/e.$ I don't have any idea as to how to even approach this. Came across this problem during my self-study in ...
3
votes
2answers
874 views

Numerical Approximation of the Continuous Fourier Transform

Given a function $F(k)$ in frequency space (sufficiently nice enough, eg. a Gaussian), I would like to compute its Fourier inverse \begin{equation}f(x) = ...
3
votes
3answers
2k views

Gaussian quadrature three-point

Derive the one and two-point Gaussian quadrature formulas for $$I=\int^1_0xf(x)dx\approx \sum_{j=1}^nw_jf(x_j)$$ with weight function $w(x)=x$. Which I know how to do and which I attached below (I ...
3
votes
1answer
386 views

Understanding rate of convergence and order of convergence

I am trying to understand what is the difference between 'rate of convergence' and 'order of convergence'. Does anyone know an intuitive explanation of the difference between them? For example, say I ...
3
votes
3answers
124 views

Accuracy from approximating $\zeta(2)$ with a partial sum

This is for an introductory numerical analysis class. The answer shouldn't be too complicated, but if you have one, feel free to post it. Figure out what $n$ should be such that $$\sum_{k=n+1}^\infty ...
2
votes
1answer
39 views

Higher order numerical PDE schemes near boundaries, implementation in MATLAB

Followup to my previous question. The first order scheme proved unstable for my pde: $$f_t + A y f_x - B x f_y =0$$ So I'm looking to implement a higher order scheme (using these tables). I was ...
2
votes
2answers
9k views

How to solve simultaneous equations using Newton-Raphson's method?

I understand how to find roots of a polynomial equation programmatically using Newton-Raphson method as explained here. How to find the values of $x$ and $y$ from the simultaneous equation given ...
2
votes
2answers
210 views

$\beta_k$ for Conjugate Gradient Method

I followed the derivation for the Conjugate Gradient method from the documents shared below http://en.wikipedia.org/wiki/Conjugate_gradient_method ...
1
vote
1answer
44 views

MATLAB, 1st order 2d hyperbolic equation, problem with convergence.

Follow up to my previous question: MATLAB: solving 1st order hyperbolic equation in 2 spacial dimensions The equation I'm solving has the form: $$f_t + A y f_x - B x f_y =0$$ I wrote the following ...
1
vote
1answer
45 views

Finite differences coefficients

I'm interested in deriving a forward finite difference approximation for the gradient of a function, $f(x)$, at the point $x = x_i$ using $k+1$ points. If the spatial domain is uniformly discretized, ...
1
vote
0answers
23 views

floating-point operations do not satisfy the well-known laws for arithmetic operations

Introduction to Numerical Analysis, Stoer, Chapter: Error Analysis, Page 8 if $|y|<\frac{eps}{\beta}|x|$ where $eps = 0.5\times 10^{1-t}$ then $$fl(x+y)=x+^*y=x$$ where $fl(x)=$ normalized ...
1
vote
2answers
57 views

$B_{i}^{n}(x)={{n}\choose{i}}x^i(1-x)^{n-i}$, prove that $B_{i}^{n}(cu)=\sum\limits_{j=0}^{n}B_{i}^{j}(c)B_{j}^{n}(u)$

$B_{i}^{n}(x)={{n}\choose{i}}x^i(1-x)^{n-i}$, prove that $B_{i}^{n}(cu)=\sum\limits_{j=0}^{n}B_{i}^{j}(c)B_{j}^{n}(u)$ I tried to to solve it from the right side: ...
1
vote
2answers
247 views

resources to study PDE from

I am an undergrad engineering student. I recently completed my second year, with that said, I have taken several calculus courses. Most recently I completed differential equations and multivariable ...
1
vote
1answer
307 views

LU decomposition of matrices

Although I know how the LU decomposition is done, given the following two matrices: $\begin{pmatrix} 0 & 2 & 3\\ 4 & 5 & 6 \\ 7 & 8 & 9 \end{pmatrix}$ and $ ...
1
vote
1answer
1k views

Derivative of $f(x,y)$ with respect to another function of two variables $k(x,y)$

Suppose that we have a function $f(x,y)$ of two variables: $$f(x,y) = g(x) + h(y) + 5(x-y) = x^2 + y^2 + 5(x-y)$$ where $g(x) = x^2$ and $h(y) = y^2$ are also functions of $x$ and $y$, respectively. ...
1
vote
3answers
724 views

Book in Numerical analysis

What books are good an introductory course in Numerical analysis? I look for a book with many applications, especially in biology
1
vote
1answer
125 views

Do I use Euler -method with Differentials correctly?

The book here (sorry not in English) on page 676: $$\begin{cases}y'=-y^{2} \\ y(0)=1\end{cases}$$ when $x_{k}=\frac{k}{5}$ which means $h=0.2$ i.e. $\Delta x=x_{k+1}-x_{k}=0.2:=h$. The task is ...
1
vote
1answer
372 views

Numerical Solutions of ordinary differential equations

Numerically solving $y'=f(x,y)$ with $k_1=f(x_n,y_n), k_2=f(x_n+c_2*h, y_n+c_2*h*k_1), y_{n+1}=y_n+h(b_1*k_1+b_2*k_2)$ what would the local truncation error be? Also, how would we perform a ...
0
votes
1answer
66 views

Interpolation of polynomials

let $f(x)=2^x$ and $x_0=1$, $x_1=2$, $x_2=3$. Use divided differences to compute the interpolation polynomial $P(x)$ satisfying $P(x_i)=f(x_i)$, i=0,1,2 and $P'(x_1)=f'(x_1)$ and estimate error ...
0
votes
1answer
54 views

Positivity of a stochastic process

I want to simulate the paths of a stochastic process $$ dS_t = r S_t dt + \sigma S_t dW_t$$ Using the Forward Euler method, we can write: $$ S_{n+1} = (1 + r \Delta t_n + \sigma \Delta W_{n}) S_n $$ ...
0
votes
2answers
149 views

Is there a general formula for estimating the step size h in numerical differentiation formulas?

Using three-point central-difference formula $$ f^{\prime}(x_0)\approx \frac{f(x_0+h)-f(x_0-h)}{2h} $$ and for $f(x)=\exp(x)$ at $x_0=0$ we have $$ \begin{array}{c, l, r} h & f^{\prime}(0) ...
0
votes
0answers
47 views

QR Algorithm with Shifts Question

Why must QR Algorithm with Shifts make no progress when applied to this n x n matrix? (attached as image). Also, if a matrix A is orthogonal in a QR factorization, will R be tridiagonal? How would ...
0
votes
3answers
426 views

Subtracting two dates

I'm developing a software and I need to subtract two dates and then get a date again. I've been trying to solve this problem for a while and I have found some additional problems. One of these ...
0
votes
1answer
108 views

Could someone help me to prove that this symmetric matrix is definite positive?

Let $a_{ij}\in\mathbb{R}$ for all $i,j\in\{1,...,n\}$ and $m\in\mathbb{N}$. Consider the matrix below. $$B=\begin{bmatrix} \sum_{k=1}^n(a_{1k})^2 & \sum_{k=1}^na_{1k}a_{2k} & \cdots & ...
0
votes
1answer
565 views

Fast methods to check linearity of differentials? Generalizing linearity?

The L1 Mat-1.1010 -course here has taught me the linearity conditions $f(a x)=a f(x)$ and $f(a+b)=f(a)+f(b)$. I want to generalize it, some quite irrelevant slow investigation here. It requires time ...
0
votes
1answer
13k views

Solving a system with Newton's method in matlab?

I have the following non-linear system to solve with Newton's method in matlab: x²+y²=2.12 y²-x²y=0.04 What is the linear equation system to be solved? Should I ...
0
votes
1answer
365 views

Derivative of a function defined by the divided difference of another function.

Given a function $f$ of class $C$ $^{n+2}$ in an interval $[a,b]$ and $x_{0}=a<x_1<x_2 ... <x_n = b$ a subdivision of $[a,b]$ into $n+1$ points. Given another function $g$ defined in the ...
10
votes
5answers
567 views

Can this function be rewritten to improve numerical stability?

I'm writing a program that needs to evaluate the function $$f(x) = \frac{1 - e^{-ux}}{u}$$ often with small values of $u$ (i.e. $u \ll x$). In the limit $u \to 0$ we have $f(x) = x$ using L'Hôpital's ...
8
votes
2answers
649 views

A function for which the Newton-Raphson method slowly converges?

I'm doing a MATLAB assignment in which you work out and implement a better version of Newton-Raphson using a second degree Taylor polynomial instead of a first degree one. I have the algorithm worked ...
7
votes
1answer
208 views

Applications of the “soft maximum”

There is a little triviality that has been referred to as the "soft maximum" over on John Cook's Blog that I find to be fun, at the very least. The idea is this: given a list of values, say ...