2
votes
1answer
23 views

How to numerically solve the eigenvalues of the laplacian in a triangular domain with Dirichlet boundary condition?

Consider an arbitrary triangle. Now impose the Dirichlet boundary condition. How to solve the eigenvalues and eigenvectors of the Laplacian $-\nabla^2 = - \frac{\partial^2}{\partial x^2} - ...
0
votes
1answer
13 views

Converting x number of petaFLOPS into a base 2 number

I would like a few different formulas or methods for doing a couple of conversions and calculations: 1) How can I convert petaFLOPS into a base $2$ number representing how many operations per second ...
0
votes
1answer
19 views

Numerical evaluation of a complex integral

I have to evaluate numerically $f(z)$ via the Cauchy representation (so via a complex integral), in other words, I have to calculare $f(z)$ performing a complex integral: $\dfrac{1}{2\pi ...
1
vote
2answers
83 views

Questions about the field scientific computing

I have heard about the field of Applied and Computational Mathematics, Scientific Computing and want to get some information. Is this a combination of computer science and mathematics? What subjects ...
1
vote
1answer
38 views
1
vote
0answers
174 views

Change MATLAB code from Lax-Wendroff to Leapfrog

I want to see how leapfrog would look using this code, but I'm having issues implementing it. I think my biggest problem is adding in the $ U_j^{n-1}$ term, I just don't get the logic. Here's what ...
2
votes
1answer
76 views

Bisection Method Question, Multiple Roots

I understand how to do the bisection method and how to do it with a point of intersection. My question is should this not actually have multiple points of intersection? and if you're not given any ...
3
votes
1answer
62 views

Computational Maths

I'm trying to revise for a test and these 2 questions I just don't really understand what I'm meant to do, any pointers would be good. Any help I'd be very grateful for.
0
votes
1answer
87 views

Computation Method to solving Homogeneous Fredholm Integral Equation of Second Kind with Symmetric Kernel

I am attempting to write a program that will be able to numerically solve a homogeneous Fredholm Integral Equation of Second Kind, with a Symmetric Kernel. I have been looking through textbooks and ...
3
votes
4answers
135 views

Computing a large exp(x) in a numerically robust way.

I'm trying to compute $\lfloor e^x \rfloor$, where x is a 64-bit integer. The problem is that the result of the computation may be close to 2^64. In this range, 64-bit floating point numbers will be ...
0
votes
1answer
55 views

Discretize an ellipsoid given its semi-major axes and orientation

An ellipsoid centered at the origin can be defined by the solutions to $$ \mathbf{x}^\text{T} A \mathbf{x} = 1 $$ where $A$ is symmetric and positive-definite. The eigenvectors of $A$ define the ...
0
votes
2answers
50 views

logarithm and exponent computation performance

Using glibc on a x86 processor, which takes more CPU time? $a\ log\ b$ or $b^a$? For which values of $a$ is one faster than the other? Optional: Does the base used matter? See also: What algorithm ...
5
votes
3answers
223 views

FFT for power of 3

Classic FFT works fine, when n is power of 2. How to generalize FFT procedure when n is power of 3? Is it possible to easily ...
1
vote
2answers
34 views

Subtlety about the definition of B-splines

I came across the following definition for the zero'th order B-spline $$b_0(x) = \left\{ \begin{array}{lr} 0 & |x|>1/2\\ 1 & |x|<1/2\\ 1/2& |x|=1/2. \end{array} ...
1
vote
0answers
61 views

How calculators compute. [duplicate]

I would like to teach a class on the "magic" behind the calculator, so I would like to generate a list of "algorithms" for how a calculator computes the things we want it to. I will get the ball ...
2
votes
1answer
201 views

Software for numerical solution of a non-linear ODE system?

I have been given a nonlinear system of ODEs which has arisen out of a colleague's engineering research: $$\begin{array}{rcl} \dot{x}_0&=&x_1\\ ...
1
vote
1answer
196 views

Minimum number of iterations in Newton's method to find a square root

I am writing an algorithm that evaluates the square root of a positive real number $y$. To do this I am using the Newton-Raphton method to approximate the roots to $f(x)=x^2-y$. The $n^{th}$ iteration ...
4
votes
1answer
128 views

What is the upper bound on the error of a matrix multiplication

When both A and B are n x n upper-triangular matrices, the entries of C = AB are defined as follows: $$ c_{ij} = \begin{cases} \sum _{k=i}^ja_{ik}b_{kj} & 1\leq i\leq j\leq n \\0 & 1\leq j\lt ...
2
votes
1answer
85 views

Is WolframAlpha computing this radical correctly?

Is WolframAlpha computing this radical correctly? $$\sqrt{\frac{1}{1 + {10}^{-375}}}$$ When I double-check again, the inequality: $$\sqrt{\frac{1}{1 + {10}^{-x}}} > 1$$ leads to a ...
5
votes
2answers
802 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
1answer
277 views

Numerical Integration over 2D Regions with Discontinuous Functions

I've run into a tricky problem, and I haven't really thought up a good solution. I have to compute many integrals of the form $$\iint\limits_{B((x_k,y_k),\epsilon))} f(x,y) dy dx$$ where ...
0
votes
0answers
105 views

Effects of numerical integration stepsize on impulse inputs (e.g., delta function)

Some models of neurons treat synaptic input (from other neurons) as a single impulse, such as the Dirac delta. But doesn't this make the magnitude of that impulse a function of numerical integration ...
4
votes
1answer
53 views

About parallel time computation

I am studying a paper where it is mentioned that Newton iteration may be used to compute the inverse of $n \times n$, well- conditioned matrix in parallel time $o(\log^2n)$ and that this computation ...
0
votes
0answers
108 views

Simpson's rule characteristics

I just wanted to ask a quick question in regards to simpson's rule for integration. I have been reading up on the trapezoidal rule, and have found the notations and have an understanding such that: ...
1
vote
1answer
62 views

Discrete numerical derivative with respect to d/d(n*x)

How can I generate a stencil for a d/d(n*x) operator? I am writing a program that needs a method to calculate line derivatives in an image. If we want to calculate the simplest forward derivative ...
6
votes
1answer
128 views

Fractional part of exp(x)

I have a real number $x$ (for concreteness, say $10^4<x<10^6$) and would like to find $e^x-\lfloor e^x\rfloor$ to reasonable precision (10-20 decimal places). What is the most efficient method? ...
2
votes
0answers
322 views

Logistic regression algorithm in Casio and Texas Instruments calculators

When using logistic regression on a Casio or Texas Instruments calculator, the output is of the form $$f(x) = \frac{c}{1+ae^{-bx}} $$ The problem I have (when teaching in a class where both types of ...
0
votes
1answer
475 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 ...
1
vote
2answers
202 views

Computational efficiency of Machin-like formulae

From what I have read, it appears that the most efficient methods of calculating $ \pi $ are Machin-like formulae. And it is known that certain formulas are more efficient than others. Are there any ...
1
vote
1answer
96 views

Minimizing the norm related with iteration method

I am working on a iteration method to compute the generalized inverse of a matrix $A$ of rank $r$ Iteration method is $X_{k+1} = X_{k} + \beta X_{k} (I - A X_{k}) $ where notations are as follows ...
4
votes
1answer
68 views

Need little hint to prove a theorem from a paper

I have an iterative method \begin{eqnarray} X_{k+1}=(1+\beta)X_k-\beta X_k A X_k~~~~~~~~~~~~~~~~~ k = 0,1,\ldots \end{eqnarray} with initial approximation $X_0 = \beta A^*$ ($\beta$ is scalar ...
0
votes
0answers
178 views

How a direct method can be compared with an iterative method?

How a direct method can be compared with an iterative method? I have an iterative method to compute Moore- penrose generalized inverse. There are some direct methods available to compute Moore-Penrose ...
18
votes
8answers
2k views

Rapid approximation of $\tanh(x)$

This is kind of a signal processing/programming/mathematics crossover question. At the moment it seems more math-related to me, but if the moderators feel it belongs elsewhere please feel free to ...
5
votes
1answer
140 views

What's the best way to detect an algebraic number?

Suppose you calculate the first few (dozen, hundred) digits of a number which you believe to be a rational number. You can calculate the continued fraction for the number and truncate after a large ...
1
vote
0answers
95 views

calculating multivariable integrals

I having a look at how to calculate using PC a multivariable integrals. I am reading about the Quasi Montecarlo methods using the following (t, m, s)-Nets and (t, s)-Sequences Faure sequences My ...
5
votes
1answer
1k views

How does Knuth's algorithm for calculating logarithm work?

I had a look at Knuth's The Art of Computer Programming, book 1. In chapter 1, section 1.2.2, exercise 25, he presents the following algorithm for calculating logarithm: given $x\in[1,2)$, do the ...
25
votes
3answers
7k views

What algorithm is used by computers to calculate logarithms?

I would like to know how are logarithms calculated by computers. The GNU C library, for example, uses a call to the fyl2x() assembler instruction, which means that ...
6
votes
2answers
400 views

Accelerating Convergence of a Sequence

Suppose I had a monotonically increasing sequence $\{d_{n}\}$ which is also bounded above. The $d_{n}$'s satisfy a given recurrence, however computationally they tend very slowly to the limit. What ...
23
votes
1answer
458 views

Computing (on a computer) the first few (non-trivial) zeros of the zeta function of a number field

If $K$ is a number field, whose Galois closure over the rationals has degree 24 or so, and whose discriminant is around $163^4$, then what is a numerically efficient way of computing the first few ...
9
votes
1answer
262 views

Krylov-like method for solving systems of polynomials?

To iteratively solve large linear systems, many current state-of-the-art methods work by finding approximate solutions in successively larger (Krylov) subspaces. Are there similar iterative methods ...