File:Partial sums riemann zeta function-no.svg

From Wikimedia Commons, the free media repository
Jump to navigation Jump to search

Original file(SVG file, nominally 576 × 432 pixels, file size: 29 KB)

Captions

Captions

Add a one-line explanation of what this file represents

Summary

[edit]
Description
Norsk bokmål: De 30 første delsummene av Riemanns zeta-funksjon, for s = 1 og 2 (reelle tall). Dette tilsvarer den harmonisk rekka, og rekken gitt i Basel-problemet.
Date
Source Own work
Author Åshild Telle
Other versions File:Partial sums riemann zeta function.svg, File:Partial sums riemann zeta function.png, File:Partial sums riemann zeta function-no.png
SVG development
InfoField
 
The SVG code is valid.
 
This plot was created with Matplotlib.
Source code
InfoField

Python code

import numpy as np
import matplotlib.pyplot as plt



def riemann_zeta_fn(n : int, s : complex) -> np.ndarray:
    """

    Args_
        n - number of  points to plot
        s - exponential

    Returns:
        numpy array of length n; values for the first n
            terms in the series defining the riemann zeta function

    """

    n_values = np.arange(1, n+1)

    sequence_values = np.array([1/(n**s) for n in n_values])

    return n_values, np.cumsum(sequence_values)


n = 30
n_values, riemann1 = riemann_zeta_fn(n, 1)
n_values, riemann2 = riemann_zeta_fn(n, 2)

label1 = r"$\sum_{n = 1}^{\infty} \frac{1}{n}$"
label2 = r"$\sum_{n = 1}^{\infty} \frac{1}{n^2}$"

plt.plot(n_values, riemann1, '*', label=label1)
plt.plot(n_values, riemann2, 'xb', label=label2)

plt.xlabel("n")
plt.ylabel("Delsum")

plt.legend(fontsize=15)
plt.savefig("riemann_zeta_s1and2-no.svg")

Licensing

[edit]
I, the copyright holder of this work, hereby publish it under the following license:
Creative Commons CC-Zero This file is made available under the Creative Commons CC0 1.0 Universal Public Domain Dedication.
The person who associated a work with this deed has dedicated the work to the public domain by waiving all of their rights to the work worldwide under copyright law, including all related and neighboring rights, to the extent allowed by law. You can copy, modify, distribute and perform the work, even for commercial purposes, all without asking permission.

File history

Click on a date/time to view the file as it appeared at that time.

Date/TimeThumbnailDimensionsUserComment
current17:44, 9 April 2020Thumbnail for version as of 17:44, 9 April 2020576 × 432 (29 KB)Mewasul (talk | contribs)corrected labels; larger font size
09:41, 9 April 2020Thumbnail for version as of 09:41, 9 April 2020576 × 432 (28 KB)Mewasul (talk | contribs)Uploaded own work with UploadWizard

The following page uses this file:

File usage on other wikis

The following other wikis use this file:

Metadata