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)

1
vote
1answer
119 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
354 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
3answers
120 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
2answers
91 views

Newton's Method; Numerical Analysis [closed]

How can newton's method be used to solve $$ \int_{0}^{x} e^{-t^2} dt = 1/3. ? $$
0
votes
1answer
93 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
3answers
255 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
0
votes
1answer
390 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 ...
10
votes
5answers
396 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
499 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 ...
6
votes
1answer
170 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 ...
5
votes
2answers
107 views

“Constrained” numerical solutions of ODEs with conservation laws?

Hi know little about numerical methods and I was considering the following problem that possibly has standard solution in the literature. Suppose you have an ODE for wich we already know that it must ...
5
votes
3answers
579 views

Projection matrices

I have found these two apparently contradicting remarks about projection matrices: 1) A matrix $P$ is idempotent if $PP = P$. An idempotent matrix that is also Hermitian is called a projection ...
5
votes
1answer
539 views

Some approximations for $\arccos(1/(1+x))$

I was trying to calculate the maximum ground distance you can see on mountains, with your elvation given. After some simple geometry, I was able to come up with the following formula: Let $h$ be ...
5
votes
1answer
206 views

how to solve $aX+bX^2=e^{cX}$

I build a model for our problem, but i cannot get a result from my model. Could anyone give me some idea to solve this formula: $aX+bX^2=e^{cX}$ Thx in advance!
5
votes
5answers
1k views

Numerically Efficient Approximation of cos(s)

I have an application where I need to run $\cos(s)$ (and $\operatorname{sinc}(s) = \sin(s)/s$) a large number of times and is measured to be a bottleneck in my application. I don't need every last ...
5
votes
1answer
1k views

Efficient and Accurate Numerical Implementation of the Inverse Rodrigues Rotation Formula (Rotation Matrix -> Axis-Angle)

I want to implement the Inverse Rodrigues Rotation Formula (also known as Log map from SO(3) to so(3)), in double precision code (MATLAB is fine for the example) preferably as a 3-parameter vector ...
4
votes
1answer
68 views

How to safely solve a pair of elementary equations in a floating point computing system?

I wrote a simple short computer program to solve a pair of equations of the format , $y = a1 * x + b1$ $y = a2 * x + b2$ . But , it outputs clearly wrong answers sometimes when $abs(a1)$ or ...
4
votes
1answer
400 views

Hermite Interpolation of $e^x$. Strange behaviour when increasing the number of derivatives at interpolating points.

I am trying to understand Hermite Interpolation. Here is my pedagogical example. I want to approximate $f(x)=e^x$ on the domain $[-1,1]$ using Hermite interpolation. I choose the Chebyshev zeros ...
3
votes
0answers
53 views

estimations of solutions

Let $\Omega=\mathbb{R}^2_+=\{(x,y) \in \mathbb{R}^2; y > 0\}$, $f \in L^2(\Omega)$, $\lambda \in \mathbb{R}^*_+$, $A=(a_{ij})_{1\leq i,j \leq 2}$, $a_{ij} \in \mathbb{R}$ and there exist $\alpha ...
3
votes
2answers
32 views

Determine best possible Lipschitz constant

I'm slightly confused by a homework problem here...I've been given the function: $ f(u) = log(u) $ With the bounds: $ 2 \leq u \lt \infty $ Now I thought I understood what the Lipschitz Condition ...
3
votes
1answer
58 views

Accuracy of the Newton-Cotes formulas for polynomials of degree $n+1$ and even $n$

Let $f$ be a polynomial of degree $n+1$. The Newton-Cotes formula is given by $$\int_{-t}^tf(x)\text{ d}x\approx\sum_{k=0}^nf(x_k)\int_{-t}^t\omega_{n+1}(x)\text{ d}x \tag{*}$$ where ...
3
votes
2answers
225 views

Explanation of Lagrange Interpolating Polynomial

Can anybody explain to me what Lagrange Interpolating Polynomial is with examples? I know the formula but it doesn't seem intuitive to me.
3
votes
2answers
254 views

Solving 3 simultaneous cubic equations

I have three equations of the form: $$i_1^3L_1+i_1K+V_1+(i_2+i_3+C)Z_n=0$$ $$i_2^3L_2+i_2K+V_2+(i_1+i_3+C)Z_n=0$$ $$i_3^3L_3+i_3K+V_3+(i_1+i_2+C)Z_n=0$$ where $L_1,L_2,L_3,K,V_1,V_2,V_3,C$ and $Z_n$ ...
3
votes
1answer
193 views

Understanding accuracy of Newton's Method

In a numerical analysis book I'm reading it says that using the Newton error formula we can find an expression for the number of correct digits in an approximation using Newton's Method. Here's the ...
3
votes
1answer
273 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
2answers
1k views

Modern formula for calculating Riemann Zeta Function [duplicate]

Possible Duplicate: How to evaluate Riemann Zeta function I have an amateur interest in the Zeta Function. I have read Edward's book on the topic, which is perhaps a little dated. I would ...
3
votes
1answer
414 views

Unstable linear inverse problem: which “dampening” Tikhonov matrix should I use?

A linear inverse problem is given by: $\ \mathbf{d}=\mathbf{A}\mathbf{m}+\mathbf{e}$ where d: observed data, A: theory operator, m: unknown model and e: error. The Least Square Error (LSE) model ...
3
votes
1answer
336 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 ...
3
votes
1answer
316 views

Why Monte Carlo integration is not affected by curse of dimensionality?

What is the common sense explanation behind that fact that MC integration is free of "curse of dimensionality" in contrast to deterministic integration rules (e.g. trapezoidal rule)?
3
votes
1answer
666 views

With Euler's method for differential equations, is it possible to take the limit as $h \to 0$ and get an exact approximation?

I was recently watching a tutorial on Euler's method for approximating differential equations, and the whole time I was thinking "why can't you just take the limit of the step size $h$ as it goes to ...
3
votes
2answers
1k views

Fast and robust root of a cubic polynomial with constraints

I'm looking for a fast and robust method for finding a root of a cubic polynomial $x^3 + px^2 + qx + r$ To make the search more robust and faster, I'd like to leverage these properties: The ...
3
votes
2answers
392 views

linear least squares minimizing distance from points to rays - is it possible?

I'm writing a tool whose purpose is to process data from a sensor that provides the true bearing to a target, and combine measurements taken at various times into an estimate of the target's position ...
3
votes
1answer
4k views

use duplex method to find square root of given number

I was reading this Wikipedia page about finding square root of given number. But I did't understand the section on the "Vedic duplex method". Not because of lack of English vocabulary, but main ...
2
votes
0answers
89 views

How to generate a random matrix which have given singular values?

I know one method: generate a random matrix, apply SVD decomposition, modify singular values, and then multiply those matrices back together. However, I'm wondering how random this method is. Since ...
2
votes
2answers
125 views

Is there a mean value theorem for higher order differences?

The standard mean value theorem tells us $\frac{f(x+h)-f(x)}{h} = f'(c)$ for some $c$ between $x$ and $x+h$. Rewriting this, we may see it as $\frac 1h\Delta_h f(x) = f'(c)$. This makes me wonder if ...
2
votes
2answers
519 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 ...
2
votes
2answers
1k views

Fixed-Point iteration technique.

I have to find the root of $x-e^{-x}=0$ by using fixed-point iteration. when i rewrite the equation as $x=e^{-x}$ , the iterative process converges to $0.567$ after $12$ iteration. But when i ...
2
votes
2answers
430 views

Brent's algorithm

Use Brent's algorithm to find all real roots of the equation $$9-\sqrt{99+2x-x^2}=\cos(2x),\\ x\in[-8,10]$$ I am having difficulty understanding Brent's algorithm. I looked at an example in ...
2
votes
1answer
121 views

Solve $x^x = a$ for known $a$? [duplicate]

For example if you have $x^x = 2$, can you express $x$ as a numerical expression containing only the addition, multiplication and exponentiation operators?
2
votes
1answer
95 views

Runge Kutta with Impulse

I'm trying to study a simple predator-prey type ODE system of two variables, but I'd like to analyze the impulse response. Really, I have two versions of the same dynamical system, so two copies of ...
2
votes
4answers
1k views

How to Determine Interval $[a,b]$ for a Fixed-Point Iteration?

Determine an interval $[a,b]$ on which the fixed-point ITERATION will converge. $x = g(x) = (2 - e^x + x^2)/3$ I've determined that $g'(x) = (2x -e^x)/3$, but I don't know how to ...
2
votes
3answers
540 views

How to calculate the area of bizarre shapes

I'm looking for an algorithm to calculate the area of various shapes (created out of basic shapes such as circles, rectangles, etc...). There are various possibilities such as the area of 2 circles, 1 ...
2
votes
3answers
709 views

what is “kink”?

Pleas tell me that what a "Kink" is and what this sentence means: Distance functions have a kink at the interface where $d = 0$ is a local minimum.
2
votes
4answers
421 views

Computing decimal digits of irrational numbers

How to compute the decimal digits of irrational number(non-transcendental) with an arbitrary precision? eg. Expansion of $\sqrt{ 2}$ with a precision of 500.
2
votes
1answer
232 views

Find error term of a quadrature

The three-point quadrature rule with error term is given by $$\int_{-1}^1f(x)dx=\frac59f\left(\frac{-\sqrt{15}}5\right)+\frac89f(0)+\frac59f\left(\frac{\sqrt{15}}5\right)+kf^{(6)}(c).$$ Find $k$. ...
2
votes
2answers
176 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 ...
2
votes
1answer
255 views

dice problem - numerical approximation

Suppose we roll m dice, remove all the dice that come up 1, and roll the rest again. If we repeat this process, eventually all the dice will be eliminated. How many rolls, on average, will we make? ...
2
votes
1answer
231 views

Finding a function that satisfies constraints numerically

I have the following system of equations for function $p(y)$ and I need help debugging my solution: $$\begin{align} 0&=\log(p(y))+1-\lambda-\gamma y^2-\eta ...
2
votes
2answers
342 views

Representing affine transform of Legendre polynomials

I have a function defined as a set of weighted Legendre polynomials: $f(x)=\alpha_0 P_0(x) + \alpha_1 P_1(x) + \alpha_2 P_2(x) +\ldots$. I have another function similarly defined with Legendre basis ...
2
votes
1answer
274 views

Setting up and solving differential equation with The Euler Method

I recently started this question and it gave me some insight into the world of differential equations. However the solution was not fit for my goals as I wanted a general method for calculating the ...