Rocksolid Light

Welcome to novaBBS (click a section below)

mail  files  register  newsreader  groups  login

Message-ID:  

It's currently a problem of access to gigabits through punybaud. -- J. C. R. Licklider


tech / sci.math / Numerical Integration

SubjectAuthor
o Numerical IntegrationLearning math

1
Numerical Integration

<usgoa4$2ep$1@nnrp.usenet.blueworldhosting.com>

  copy mid

https://www.novabbs.com/tech/article-flat.php?id=155648&group=sci.math#155648

  copy link   Newsgroups: sci.math
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!nnrp.usenet.blueworldhosting.com!.POSTED!not-for-mail
From: inva...@invalid.invalid (Learning math)
Newsgroups: sci.math
Subject: Numerical Integration
Date: Fri, 8 Mar 2024 23:24:35 -0500
Organization: BWH Usenet Archive (https://usenet.blueworldhosting.com)
Lines: 60
Message-ID: <usgoa4$2ep$1@nnrp.usenet.blueworldhosting.com>
Injection-Date: Sat, 9 Mar 2024 04:24:36 -0000 (UTC)
Injection-Info: nnrp.usenet.blueworldhosting.com;
logging-data="2521"; mail-complaints-to="usenet@blueworldhosting.com"
Cancel-Lock: sha1:nhKEp5L+C9Sz1A6bFJL4BV/NQ14= sha256:vfhPUygDCj6S+W6tI/mnT4PCwktC81XRsaQhHEt/104=
sha1:lJ7lSxXFKhz/VJpm692Mqoj2ahw= sha256:VRfjt0MI+r4SGje8re2sHP0fUlpuIG65YoqIZLKYlgI=
X-Priority: 3
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.6157
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.5931
X-RFC2646: Format=Flowed; Original
 by: Learning math - Sat, 9 Mar 2024 04:24 UTC

While playing with numerical integration I arrived at a general formula for
a numerical integral as follows.

Start with the simple function such as y = x^2 and integrate it from 0 to 5
in 5 steps.
At each step the area between the curve and the x axis is approximated by a
rectangle.
This will obviously give an over estimate.
I can write it as:

(5/5)*(1/((5/5)^2))*((1^2)+(2^2)+(3^2)+(4^2)+(5^2) = 55 which is higher than
the exact answer of 41+2/3 as expected.

If I do the same with 10 steps I can write it as
(5/10)*(1/((10/5)^2))*(1^2+2^2+3^2+4^2+5^2+6^2+7^2+8^2+9^2+10^2) = 48.125 a
bit closer

And for 20 steps I have

(5/20)*(1/((20/5)^2))*(1^2+2^2+3^2+4^2+5^2+6^2+7^2+8^2+9^2+10^2+11^2+12^2+13^2+14^2+15^2+16^2+17^2+18^2+19^2+20^2
= 44.84375

For 1000 steps I can put the following in Wolfram and get 41.7292
(5/1000)*(1/(1000/5)^2) * sum from n = 1 to 1000 of n^2

For n steps I have (5/n)*(1/((n/5)^2)) * the sum of the squares from 1 to n

More generally integrating x^2 from 0 to X instead of 0 to 5 I have, for n
steps

(X/n)*(1/((n/X)^2)) * the sum of the squares from 1 to n

Even more generally for f(x) instead of x^2 it seems to be the case that the
integral is

(X/n)*(1/(f(n/X)) * the sum of f(x) for x = 1 to n

n must be an integer but if I set n = X * k I can choose k to make n an
interger.

Then I have the following general formula for the integral of f(x) from 0 to
X

Integral from 0 to X of f(x) is approximately (1/(k*f(k)) * the sum of f(x)
for x = 1 to n

Where n = X*k so first choose the number of steps n and then k = n/X

So if I want the integral from 0 to 4 of x^3 (which is exactly 64) I could
do it in 1000 steps by putting this in Wolfram
(1/((1000/4)*((1000/4)^3)) * the sum of x^3 for x = 1 to 1000

My guess is that this method can't be generalized to functions other than
x^n or can it?

I've never seen it used anywhere else, probably because it's not of great
interest.

1
server_pubkey.txt

rocksolid light 0.9.81
clearnet tor