Questions tagged [approximation]

For questions that involve concrete approximations, such as finding an approximate value of a number with some precision. For questions that belong to the mathematical area of Approximation Theory, use (approximation-theory).

Approximations are representations of numbers that aren't exact, for example $\sqrt{2}\approx 1.41$. Such representations may be obtained using differentials (more generally, Taylor's formula), linear interpolation, etc.

4157 questions
37
votes
10 answers

What is the purpose of Stirling's approximation to a factorial?

Stirling approximation to a factorial is $$ n! \sim \sqrt{2 \pi n} \left(\frac{n}{e}\right)^n. $$ I wonder what benefit can be got from it? From computational perspective (I admit I don't know too much about how each arithmetic operation is…
Tim
  • 43,663
  • 43
  • 199
  • 459
37
votes
2 answers

On Shanks' quartic approximation $\pi \approx \frac{6}{\sqrt{3502}}\ln(2u)$

In Mathworld's "Pi Approximations", (line 58), Weisstein mentions one by the mathematician Daniel Shanks that differs by a mere $10^{-82}$, $$\pi \approx \frac{6}{\sqrt{3502}}\ln(2u)\color{blue}{+10^{-82}}\tag{1}$$ and says that $u$ is a product of…
Tito Piezas III
  • 47,981
  • 5
  • 96
  • 237
37
votes
7 answers

Looking for a function that approximates a parabola

I have a shape that is defined by a parabola in a certain range, and a horizontal line outside of that range (see red in figure). I am looking for a single differentiable, without absolute values, non-piecewise, and continuous function that can…
35
votes
1 answer

A series problem by Knuth

I came across the following problem, known as Knuth's Series which originally was an American Mathematical Monthly problem. Prove that $$\sum_{n=1}^\infty \left(\frac{n^n}{n!e^n}-\frac{1}{\sqrt{2\pi…
Eric Naslund
  • 69,703
  • 11
  • 166
  • 260
35
votes
10 answers

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 migrate it. I'm working on a project where I have…
34
votes
7 answers

Pi Estimation using Integers

I ran across this problem in a high school math competition: "You must use the integers $1$ to $9$ and only addition, subtraction, multiplication, division, and exponentiation to approximate the number $\pi$ as accurately as possible. Each integer…
user86563
34
votes
7 answers

Simple numerical methods for calculating the digits of $\pi$

Are there any simple methods for calculating the digits of $\pi$? Computers are able to calculate billions of digits, so there must be an algorithm for computing them. Is there a simple algorithm that can be computed by hand in order to compute the…
e.James
  • 3,147
  • 3
  • 22
  • 20
33
votes
3 answers

The right "weigh" to do integrals

Back in the day, before approximation methods like splines became vogue in my line of work, one way of computing the area under an empirically drawn curve was to painstakingly sketch it on a piece of graphing paper (usually with the assistance of a…
J. M. ain't a mathematician
  • 71,951
  • 6
  • 191
  • 335
33
votes
5 answers

How can I generate "random" curves?

In game programming (my profession) it is often necessary to generate all kinds of random things, including random curves (for example, to make a procedural island or for an agent to follow some path). For one dimensional things, we usually use…
Herman Tulleken
  • 3,326
  • 17
  • 34
32
votes
1 answer

$\pi^4 + \pi^5 \approx e^6$ is anything special going on here?

Saw it in the news: $$(\pi^4 + \pi^5)^{\Large\frac16} \approx 2.71828180861$$ Is this just pigeon-hole? DISCUSSION: counterfeit $e$ using $\pi$'s Given enough integers and $\pi$'s we can approximate just about any number. In formal…
32
votes
1 answer

I have found a formula for dividing numbers in easy steps

I found an easy method for division and it depends on some factors. I wanted to find an answer for $1000/101$ with easy steps. My starting point is here. I formulated this method by 2 hours of hard work. It is an infinite series, but taking 4 or 6…
rock-onn
  • 335
  • 2
  • 6
32
votes
10 answers

What's the closest approximation to $\pi$ using the digits $0-9$ only once?

What's the closest approximation to $\pi$ achievable using each digit $0-9$ no more than once, and basic operations of roots, brackets, exponentiation, addition subtraction, concatenation, division and factorial? This was mentioned in another…
samerivertwice
  • 8,241
  • 2
  • 20
  • 55
32
votes
5 answers

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? How does it compare to other irrational numbers…
Sean
  • 461
  • 2
  • 5
  • 7
30
votes
1 answer

Explanation and proof of the 4th order Runge-Kutta method

The 4th order Runge-Kutta (RK4) method is a numerical technique used to solve ordinary differential equations (ODEs) of the following form $$\frac{dy}{dx} = f(x,y), \qquad y(0)=y_0$$ It gives $y_{i+1}$ in the form $$y_{i+1} =…
30
votes
16 answers

Calculating the square root of 2

Since $\sqrt{2}$ is irrational, is there a way to compute the first 20 digits of it? What I have done so far I started the first digit decimal of the $\sqrt{2}$ by calculating iteratively so that it would not go to 3 so fast. It looks like…
MMJM
  • 617
  • 1
  • 5
  • 12