File:Partial sums riemann zeta function.svg

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

Captions

Captions

The 30 first partial sums of Riemann's zeta function, for s = 1 and 2 (real numbers)

Summary

edit
Description
English: The 30 first partial sums of Riemann's zeta function, for s = 1 and 2 (real numbers). This corresponds to the harmonic series, and the series introduced in the Basel problem.
Date
Source Own work
Author Åshild Telle
Other versions File:Partial sums riemann zeta function-no.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("Partial sums")

plt.legend(fontsize=15)
plt.savefig("riemann_zeta_s1and2.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:39, 9 April 2020Thumbnail for version as of 17:39, 9 April 2020576 × 432 (31 KB)Mewasul (talk | contribs)corrected label; larger font size
09:41, 9 April 2020Thumbnail for version as of 09:41, 9 April 2020576 × 432 (30 KB)Mewasul (talk | contribs)Uploaded own work with UploadWizard

There are no pages that use this file.

Metadata