0
votes
0answers
24 views

Signal approximation using linear combination of functions

How I can approximate the signal $x(t)=0.001\,t^3 \exp(-0.1t)$ in the interval $[0,100]$ using a linear combination of the following functions: $f_1(t)=A_1$ $f_2(t)=A_2\cos(0.05t)$ ...
0
votes
0answers
47 views

Simpson's Rule derived from Trapezoidal Rule

I was just wondering if I could have some assistance in regards to the Trapezoidal Rule and Simpson's Rule. I have a question where it asks to generalize the Trapezoidal Rule to the case of ...
2
votes
1answer
47 views

Choosing degree of Chebyshev approximation

Chebyshev approximation approximates a function by fitting a weighted sum of Chebyshev polynomials to it. It requires evaluating a function at $N$ sample points to form the weighting coefficients. ...
1
vote
1answer
48 views

Inaccuracy in numerical calculation of arclength of part of an ellipse

I am trying to numerically calculate the arclength of part of an ellipse according to: $$ L = \int_0^{\phi_s}\sqrt{r^2+\left(\frac{dr}{d\phi}\right)^2} d\phi $$ where $r$ is defined as: $$ ...
2
votes
1answer
44 views

How to use undefined value in Composite Simpson's Rule

I have to use the Composite Simpson's Rule to approximate the integral $\int_0^1 t^2\cdot sin(\frac{1}{t}) dt$. I've used the Composite Simpson's Rule, but when I work through the algorithm, one step ...
1
vote
0answers
72 views

Approximations of the incomplete elliptic integral of the second kind

For a calculation I am working on I need to determine the arc length $l$ of a part of an ellipse in terms of the major axis $2a$, the minor axis $2b$ and the angle $\phi$. I know that this is a ...
0
votes
1answer
69 views

B-Spline Interpolation/Approximation

I've got a couple of probably very simple questions, yet some googling didn't bring up what I was looking for. First what I want to do: I have a grid, and the gridpoints are function values. I want to ...
0
votes
2answers
53 views

Aproximate calculation in decimals

I am trying to refresh on precision of calculations. If we have the decimal fractions: $.234673$, $.322135$, $.114342$, $.563217$ each known to be correct to six figures why are each of the decimals ...
3
votes
0answers
98 views

Runge-Kutta Error Analysis

Could anyone explain to me how to reduce the error propagated by using Runge-Kutta of order 4? Or can anyone give me a nice reference to it.
0
votes
0answers
23 views

Anyone tried B-F-S in training a neural network?

Anyone tried B-F-S (Broyden-Fletcher-Shanno) in training a neural network? I know SCG or LM are more popular, but I have already written an optimized library that have BFS method, I really dont want ...
3
votes
2answers
50 views

Discrete approximations of $\nabla^2{\bf v}$

I am writing a Navier Stokes solver. The vector field is represented as a grid with integer coordinates I am looking at other people's computer code. I don't entirely understand the vector calculus, ...
1
vote
1answer
103 views

Numerical approximation of the modified Bessel function $I_0$ with radical argument for integration purposes

I have to numerically calculate the following definite integral $$\int_{\alpha}^{\beta}I_0(a\sqrt{1-x^2})dx$$ for different values of $\alpha$ and $\beta$, where $a$ has a value of, say, $30$. I'm ...
0
votes
1answer
126 views

Least-squares approximation polynomial

Consider the function $\displaystyle f(x) = \frac{1}{\alpha (x-\beta)^2 + 1}$ in the interval $I = [-1,1]$. Set $\beta = 0$. How do I get the expression for the least-squares polynomial, say $\tilde ...
1
vote
1answer
133 views

How to approximate $\text{li}(z)$ numerically?

I'm trying to implement a function to calculate $\pi(x)$ via Riemann's formula: $$ \pi(x) = \operatorname{R}(x^1) - \sum_{\rho}\operatorname{R}(x^{\rho}) - \frac1{\ln x} + \frac1\pi \arctan ...
1
vote
1answer
123 views

How do I determine appropriate rational approximations to a sum of square roots in order to bound the error accumulation?

I have two numbers, $A$ and $B$, that are sums of integer multiples of a set of square roots of small primes (and 1) and their products: $A = a_0 + a_1\sqrt 2 + a_2\sqrt 3 + a_3\sqrt 5 + a_4\sqrt 6 + ...
1
vote
1answer
78 views

Need numerical approximation for Fourier{max(0,f(x,y))} given Fourier{f(x,y)}

Given $\mathscr{F}\{f(x,y)\}$ is there a way to numerically approximate $\mathscr{F}\{max(0,f(x,y))\}$ ? I am not necessarily looking for a closed formula. Even some iterative method would be ...
3
votes
1answer
55 views

Iterative model fitting

I have a sequence of points $\{(x_k,y_k,z_k)\}$ and I need to fit some $2D$ model $P(x,y)$ that approximates $z$ in some sense. The $z_k$$'s$ are noisy samples of some $2D$ function $z_k = f(x,y) + ...
3
votes
4answers
94 views

Improving Newton's iteration where the derivative is near zero?

I'm implementing a root-solver for finding x coordinates of a function f(x), after I have an y-coordinate. The function is periodic, roughly sinusoidal with constant amplitude but non-linearly ...
2
votes
1answer
75 views

Rounding .5 - why isn't rounding away from zero the 'right' answer?

I am familiar with the issue of 'how should one roung .5?', and I am familiar with the conventional solutions, but I don't understand why there isn't a correct answer. When you're formulating a ...
2
votes
1answer
73 views

approximate error between integral an sum

I am new here. My problem: There is an integral $I:=\int_0^1 f(x)\,dx$ for $f\colon [0,1]\to\mathbb{R}$ and I want to compute it by ...
0
votes
1answer
70 views

Approximating a simple sum

Can somone help me find an assymptotic formula for n, for fixed x , for this sum , perhaps an inequality would be even better, or some bound on the error. $$\sum_{k=1}^n \frac{1}{\log(kx)}$$ I need ...
1
vote
1answer
76 views

understanding the least squares criterion

I was given 20 data points and asked to choose the most suitable lowest degree polynomial to fit them using the least-squares criterion. I looked it up, but what i found seems far too complex or just ...
1
vote
0answers
26 views

clairification on standard deviation

I have a homework question that gives me a set of $x$ values and their respective $f(x)$ values and asks me to find the line which best fits the data. I have to do this by finding the estimated ...
4
votes
2answers
56 views

Linear regression where undershooting isn't as bad as overshooting

Given a set of points $(x_i, y_i)$, least-squares linear regression finds the linear function $L$ such that $$\sum \varepsilon(y_i, L(x_i))$$ is minimized, where $\varepsilon(y, y') = (y-y')^2$ is the ...
1
vote
0answers
73 views

Chebyshev Rational Approximation

Find the Chebyshev rational approximation of degree 4 with m=n=2 for $f(x)=\sin(x)$ . Now I do have a program that can evaluate this But its asking me to find the coefficients of the Chebyshev ...
1
vote
2answers
106 views

Continued Fractions Approximation

I have come across continued fractions approximation but I am unsure what the steps are. For example How would you express the following rational function in continued-fraction form: $${x^2+3x+2 ...
0
votes
1answer
152 views

numeric approximation to find maximum of a function

is there a fast numeric algorithm to approximate the maximum of an given function in an interval [x,y] without calculate the derivation of the function? I only know about solver to calculate the ...
2
votes
3answers
126 views

Simple test if point is above or below sine curve

Is there any simple formula or algorithm for determining if a point lies above or below the sine curve? For instance, if I have a point $(x, y)$, how can I test whether or not $y > \sin(x)$? ...
1
vote
0answers
128 views

Polynomial Interpolation and Error Bound

Problem: Use the Lagrange interpolating polynomial of degree three or less and four digit chopping arithmetic to approximate cos(.750) using the following values. Find an error bound for the ...
1
vote
1answer
57 views

How to approximate the error of a starting guess?

Given the equation $$ \frac{1}{x^4}+e^{x-100}=10^8 $$ that has one positive root > 1, formulate Newton's method for finding the root. Make one iteration with starting value = 1. Try to make another ...
3
votes
2answers
344 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
66 views

Calculating the divisor, known to be small, of two Stirling approximations of the logarithmic Gamma function without overflows

Earlier, I asked a question on MathOverflow regarding how one might analytically approximate a function of the form: $f(n) = \prod_{i=1}^{n-1} (1-ai)$ for $a \ge 0$, $(ai) < 1$, and $n > 10^5$ ...
2
votes
0answers
196 views

Why does relative error give number of correct digits?

I learnt that if the relative error is 5*$10^{-s}$ then the number of correct digits the result has $s$. Why is this so? Can you illustrate with an example and/or a proof? Another way to put it ...
0
votes
0answers
41 views

How to know number of digits that are lost from condition number?

I've got the formula for computing the condition number of a problem: Condition number = Rout / Rin where Rout is the relative error in output and Rin is the relative error in input. And if the ...
2
votes
4answers
401 views

Approximate solution for the root of a non-linear function

I have been working with a system which involves computing the roots of functions that look like \begin{equation} e^t (g\cos(\omega t) + b) = c \end{equation} where $t$ is the independent variable ...
2
votes
3answers
253 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 ...
0
votes
0answers
47 views

A question applying Ritz Galerkin.

Let S = (0,1)^2 contained in R^2. If we see the boundary value problem -(Triangle)u = (pi)^2 cos(pi*x1) in S, del(subscript n) u = 0 on the boundary, we have to 1) Provide a functional J, where ...
3
votes
1answer
142 views

Remainder term for Gauss-Laguerre quadrature

I need to calculate a quadrature rule with maximum degree of accuracy that looks like this: $$ \int_0^\infty e^{-x}f(x)dx = \sum_{i=0}^n A_if(x_i) + R_n(f) $$ where $n=2$. For $R_n(f)$ I have this ...
21
votes
5answers
1k views

How do you calculate the decimal expansion of an irrational number?

Just curious, how do you calculate an irrational number? Take $\pi$ for example. Computers have calculated $\pi$ to the millionth digit and beyond. What formula/method do they use to figure this out? ...
1
vote
2answers
238 views

Help with Chebyshev Economization of $\exp(x)$?

This may be a stupid question, so I apologize in advance if it is. This is a very common example of Chebyshev Economization, but I still do not understand how the coefficients are found. I want to ...
0
votes
1answer
82 views

Algorithms for finding closed form approximations for integrals (with no closed form solutions)

It is well known that many integrals have no closed form solutions, normally what you would do is solve them numerically. My question is if there are algorithms that give you good closed form ...
3
votes
0answers
74 views

Numerically estimate $a^b$ [duplicate]

Possible Duplicate: How can I calculate non-integer exponents? What is the most efficient way to estimate $a^b$ ($a > 0$) numerically? My goal is not to use built-in math functions (like ...
2
votes
1answer
301 views

Method for estimating the nth derivative?

When using numerical analysis, I often find that I am required to estimate a derivative (e.g. when using Newton Iteration for finding roots). To estimate the first derivative of a function $f(x)$ at ...
1
vote
2answers
158 views

Smoothing of absolute value and sign functions for numerical integration

I'm doing Numerical integration of ODEs. for a special system that has an always positive coordinate s and a conjugated momentum ...
1
vote
1answer
188 views

Spline Theory and Code

On P. Janert's book Data Analysis with Open Source Tools there is a discussion on splines, that they are "constructed from piecewise polynomial functions (typically cubic) that are joined together in ...
1
vote
1answer
447 views

How to approximate an integral using the Composite Trapezoid Rule

I'm trying to estimate the value of the following integral on the interval $[0,1]$ $$ I = \int_0^1 \frac{1}{1+x} dx $$ So, using the composite trapezoid rule (and with $n=4$, ie I'm only using the ...
1
vote
5answers
283 views

Find square root approximation function (tool)

first I have to apologize for any uncorrect naming or categorisation of my question, as I am an electrical engineer rather than a mathematican. I try to find a simple solution for my problem: I have ...
4
votes
1answer
125 views

Numerical differentiation issues

I've been using this to compute the first order derivative's value of a function $f$ in a given point: $$f'(x) = \frac{f(x+\epsilon) - f(x-\epsilon)}{2\epsilon}$$ For some $\epsilon = 0.0001$ or ...
14
votes
7answers
752 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
5answers
609 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 ...

1 2