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
1k views

Can you calculate the accuracy of a calculator?

I have a phone with an inbuilt calculator. I love to play with calculators. So i did the following and the following was shown by the calculator. When I went in the scientific tab, and wrote $\pi$ it ...
1
vote
0answers
70 views

Solving the difference equation in the stability analysis of a multistep method

So I am confused in going from a difference equation to a linear ODE. To make this concrete let's look at the second order Adams-Bashforth method we have: $Y_{n+1} = Y_n + h(3/4f_n - 1/2f_{n-1}$ ...
6
votes
2answers
2k 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 ...
1
vote
0answers
99 views

Formula for monthly payment of mortgage

What is the formula for monthly payment of mortgage including Term, Interest Rate, Cost of Home Down, Payment Insurance, Property Tax, HOA Fee. I'm a programmer and want to add this functionality to ...
5
votes
0answers
115 views

Do there exist solutions for this equation?

We know that solutions exist for equations of the following variety: $$ye^y=x \iff y=W(x)$$ Where W is the Lambert W function. We can augment the problem slightly, and ask if there exist solutions ...
1
vote
0answers
27 views

Lagrange finite elements [duplicate]

We consider in $\mathbb{R}^2$ the set of points $$\{M_1(-1,1),M_2(0,1), M_3(2,1),M_4(-1,0),M_5(1,0),M_6(2,0)\}$$ Let $\Omega$ a rectangular structure consisting of the heads $\{M_4(-1,0),M_6(2,0), ...
1
vote
0answers
99 views

Algorithm of projection

Suppose $S$ is a compact surface in $\mathbb{R}^{3}$ defined by a sufficiently smooth level set function $f$, that is, $S=\{s: f(s)=0\}.$ I am studying an algorithm that projects a point $x_{0}$on ...
2
votes
1answer
354 views

Integrating $\sin(n\theta(x))/\sin(\theta(x))$ for some function $\theta(x)$

I have an indefinite integral of the form: $$ \int \frac{\sin(n\theta(x)))}{\sin(\theta(x))} dx. $$ $\theta$ is a function of $x$ (and actually a complicated one). Is it possible to integrate it ...
3
votes
2answers
70 views

what is name of this numerical scheme for ode?

Let's have system of ODEs $$ \dot x(t) = A(t)x(t) $$ I came up with this numerical scheme: $$ x_{n+1} = e^{\frac{h}{2}A(t_{n+1})}e^{\frac{h}{2}A(t_n)}x_n $$ where $h$ is time step, $t_n = nh$ and ...
2
votes
1answer
174 views

Related to Applying Runge-Kutta Method

I have an initial value problem (henceforth IVP) as follows: $$\frac{d \Phi(t)}{dt}= A(t)\Phi(t)$$ subject to the initial condition $\Phi(t_0)=I$, where $\Phi(t), A(t), I$ are square matrices of same ...
2
votes
0answers
126 views

Solution of an implicit Fourier transform equation

How does one solve the following equation ($\hat{a}(k)$ denotes the Fourier transform of $a(x)$ and $q$ is real positive): $$\hat{a}(k)=f(k)\widehat{a^q}(k).$$ This equation appeared in some paper. ...
3
votes
1answer
519 views

Riemann sum error and the integral

It is a well known, that we have the following approximation error: $$ ...
1
vote
1answer
440 views

Numerical analysis Taylor's method question: Find a value of $n$ necessary for $P_n(x)$ to approximate $f(x)$ within $10^{-6}$ on $[-0.5,0.5]$.

Let $f(x)=\tan^{-1}(x)$ Let $P_n(x)$ be the $n$th Taylor polynomial for $f(x)$ about $x_0=0$ Find a value of $n$ necessary for $P_n(x)$ to approximate $f(x)$ within $10^{-6}$ on $[-0.5,0.5]$. Is ...
0
votes
2answers
81 views

Proving the continuity of a function at a given point - help needed

I have come across this question and am not sure as to how to go about finishing it. I have started off with working at out the limit at $x=2$ and this is $-4$. How then (or what do I use) to equate ...
0
votes
0answers
50 views

Estimate parameters in $y=y_{0}(1-\frac{t}{\tau})e^{-\alpha t/\tau}$

Given the function $y(t)$ with two independent parameters $\tau$ and $\alpha$ $$ y=y_{0}\left(1-\frac{t}{\tau}\right)e^{-\alpha t/\tau}, $$ We have two data points (experimental data) $ ...
1
vote
6answers
2k views

smooth functions or continuous

When we say a function is smooth? Is there any difference between smooth function and continuous function? If they are the same, why sometimes we say f is smooth and sometimes f is continuous? Please ...
0
votes
1answer
54 views

Subdividing a Bézier patch

I have a tensor-product Bézier patch and I want to subidivide this adding a curve inside the patch, which creates two rectangular subpatches. I found that the following statement holds: "if we ...
1
vote
1answer
731 views

Numerical integration over a surface of a sphere

I am integrating a double integral in spherical coordinates over the surface of a sphere in MATLAB numerically. Although I have changed the relative and absolute tolerance I get the feeling that ...
0
votes
1answer
272 views

optimization of a non-differentiable, component-wise step function

I would like to estimate the (local) minimum of a function $c:R^N \mapsto R^+$ where: $c$ is only differentiable almost everywhere, there exists a component $j$, such that $\frac{\partial ...
2
votes
1answer
79 views

Local constant interpolation in $L^1$

I really hope that anybody of you can help me with the following question: Consider the set $U\subseteq L^1([0,1])$ of non-negative integrable functions with unit mass, i.e. $u\geq 0$, $\int_0^1 u\,dx ...
1
vote
1answer
99 views

Looking for a window containing the solution of an equation

I need to solve billions of times equations $\,f(x)=0\,$ with $$f(x) := \sum_{i=1}^N \frac {z_i}{c_i + x}$$ All $z_i$ are positive and add to $1$. Among the $N$ coefficients $c_i$, $M$ are negative ...
1
vote
0answers
70 views

When examining global error bounds for Euler method, can I rescale the domain limits?

I'm looking at provable global error bounds of the Euler method for the first time and I was surprised to find that the bound grows exponentially in the amount of time (the domain size) propagated ...
2
votes
1answer
115 views

What is a norm that can measure average oscillatory amplitude?

I am numerically computing the growth of an oscillatory instability in a fluid system. Suppose for simplicity that the function $f(x)$ [defined on a finite interval] has oscillations of different ...
1
vote
3answers
5k views

Modified Euler Method for second order differential equations

The question I am doing is asking me to carry out the Modified Euler method for a second order differential equation: Consider the following initial value problem: ...
2
votes
1answer
389 views

Optimizing trigonometric and nonlinear functions

First, Please, keep in mind that I'm a programmer not mathematician, and I have a fair mathematical background. I used optimization in Java to fit some observations to a trigonometric function, I ...
1
vote
1answer
387 views

Runge-Kutta method for multiple springs

If we have a spring attached to a wall with an object on the other side, the differential equations describing the system are: $$x'=v$$ $$v'=-\frac{k}{m}x-\frac{b}{m}v$$ Where: x is position of the ...
0
votes
1answer
133 views

norm and invertibility

I'm currently solving some problems on matrix norms and one of these is asking me to show if a matrix is invertible or not. I wento trough the solution and at the end there was written : $\|A\|>0$ ...
1
vote
1answer
162 views

Power iteration provably works if the matrix has a unique eigenvalue $\lambda$ and $\lambda>0$

Let $A$ be a $n\times n$ real matrix and $v_0 \in \mathbb R^n$ s.t. $||v_0|| = 1$. Define a sequence $(v_k)_k$ of $n$-dimensional real vectors by $v_k = A^kv_0 / || A^kv_0 ||$. Assume that $A$ has a ...
0
votes
1answer
38 views

Calculate the weigths of a quadrature with highest precision

How do I calculate the weights $H_0$ and $H_1$ so that the the precision of the approximated function is as high as possible? $$ \int_{-1}^{1} f(x)\, dx \approx H_0 f\left(-\frac{1}{2}\right) + H_1 ...
3
votes
1answer
65 views

Numerical solution to diffusion-like equation with changing sign

I am trying to numerically solve an initial value problem $$ \frac{\partial f}{\partial t} = \frac{1}{x} \frac{\partial^2 f}{\partial x^2}$$ where $f = f(x,t) \text{ for } x \in [-1,-1],\ t \in [0, ...
1
vote
0answers
274 views

iterative method to solve nonlinear equations

I'd like to know whether there are any methods like the Gauss-Seidel method to solve nonlinear equations. For example, I'd like to solve $f(\textbf x) = 0$, where $f(\textbf x)$ is a nonlinear ...
2
votes
1answer
269 views

How to proceed solving this problem?

I'm working on the problem "soundwaves under the water" (page 16 in the document is in English) from a numerical analysis book. I've got the following problem that is taken from the numerical ...
2
votes
1answer
197 views

Spline interpolation that is non-decreasing when given non-decreasing sequence

How can I achieve a spline interpolation such that when given non-decreasing sequence of points the resulting spline will also be a non-decreasing function (and vice-versa, when given non-increasing ...
2
votes
1answer
107 views

Defining a Chebyshev series expansion

I'm trying to implement the Clenshaw algorithm for a truncated Chebyshev series. I think I've grasped the algorithm itself, but I'm a bit confused by an additional term in the definition. I have ...
2
votes
1answer
172 views

Question about integral equations

Consider the equation $$g(t) = \int_a^b K(t,s)f(s) ds $$ where $g$ and the kernel $K$ are known and $f$ is to be determined. Suppose that the equation has a solution. Under what conditions on the ...
1
vote
2answers
183 views

Explicit solutions for advection-diffusion PDEs

In order to test some implementations of numerical solvers for advection-diffusion equations with non-constant coefficients, I'm looking for examples of equations+border and initial conditions of this ...
5
votes
2answers
134 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 ...
1
vote
1answer
72 views

Prime numbers and limit(?)

Can someone help me to prove the following: $$\lim_{x\to\infty}(\sum_{p\leq x}\frac{1}{p}-\log(\log(x)) -C)=0$$ Where $C$ is a proper constant. Thank you...
0
votes
1answer
392 views

How do I calculate the values of the control points for an uniform cubic B spline surface?

I want to interpolate the following 3 scattered data points: (80.9,58.5,48.0),(35.0,89.6,82.3),(74.7,17.4,85.9) by an uniform cubic B spline surface on the following control lattice, $ \phi $: In ...
1
vote
2answers
265 views

Numerical inversion of characteristic functions

I have a need to use the FFT in my work and am trying to learn how to use it. I am beginning by attempting to use the FFT to numerically invert the characteristic function of a normal distribution. So ...
3
votes
1answer
293 views

Stability of the BTCS scheme for the heat equation in a disk

Consider the $1$-D heat equation: $$ u_t = a \Delta u = au_{xx} \\ u(0,t) = u(1,t) = 0 \\ u(x,0) = u_0(x) $$ where $a > 0$ is constant and $u_0$ is given. It is a classic result that the implicit ...
1
vote
1answer
51 views

Show that the method is of order 3 if a =-5 and of order 2 if a is not equal to -5

I am studying ODEs and came across this exam question: I have the solution here also: I have been working on this exam question all day and have been stuck for hours. What I don't understand is ...
0
votes
1answer
185 views

truncation error - help

I am trying to understand the concept of local truncation error and came accross this in my lecture notes: what I don't understand here is where the term 'O' comes from and what it stands for in ...
1
vote
1answer
105 views

Why is the only $k$ step method with stiff decay BDF?

I'm studying for a test and I'd like to know how justify why the only $k$-step method of order $k$ with stiff decay is BDF. By definition of stiff decay(Ascher & Petzold) a method has stiff decay ...
2
votes
0answers
754 views

Show that the averaged vector field one step method is well-defined

Let $\dot{\mathbf{y}} = \mathbf{f}(\mathbf{y}), \;\mathbf{f}: D \subset \mathbb{R}^d \to \mathbb{R}^d$ be an autonomous differential equation with $\mathbf{f}$ smooth. We define the averaged vector ...
2
votes
1answer
50 views

Why is (asymptotic) stability inherited by A-stable Runge-Kutta-methods?

I wonder how A-stability of a Runge-Kutta-Method implies that (asymptotic) stability is inherited from the solution of a linear initial value problem. For a Runge-Kutta-Method $\psi^{\tau}$ there is ...
1
vote
0answers
280 views

$N$ equally spaced points on an ellipsoid

I would like to find a algorithm for determining the $(x,y,z)$ co-ordinates for evenly distributed $N$ points on the surface of an ellipsoid. These points must be spaced from its nearest neighbour ...
1
vote
0answers
335 views

Algebraic ellipsoidal least squares fit

I'm looking to perform a least squares fit in 3D to a quadratic surface of the form: \begin{equation} Ax^2 + Bxy + Cxz + Dy^2 + Eyz + Fz^2 + ax + by + cz + d = 0 \end{equation} by minimizing ...
4
votes
1answer
83 views

Similarity in shapes

I have been thinking which countries in the world are similar in shape, then I had this problem. For example we have country maps as seen in the figure and we need to determine which country is ...
1
vote
1answer
103 views

Symplectic integrators and divergence free vector fields

Imagine a simple, divergence free vector field (such as a 2D series of concentric circles). If one seeds a triangle (three different particles) and tracks their evolution with an integrator, can one ...