File:Pompeiu function.svg

Uploaded by Arami Mira
Upload date 2021-10-11T21:57:51Z
MIME type image/svg+xml
Dimensions 576 × 432 px
File size 17.6 KB

Summary

Description
English: Graphic of Pompeiu function P(x)=inverseof1m<ngcd(m,n)=111.8n2xmn3
Date
Source Own work
Author Arami Mira
SVG development
InfoField
 The SVG code is valid.
 This diagram was created with Matplotlib.
Source code
InfoField

Python code

import numpy as np
import matplotlib.pyplot as plt
import math

def seriesFunction(center, x):
	if x - center > 0:
		return (x - center) ** (1/3)
	else:
		return -((center - x) ** (1/3))

def series(n, x):
	q = 1.8
	f = 1
	s = 0
	for i in range(2, n+1):
		subs = 0
		for j in range(1, i):
			if math.gcd(i, j) == 1:
				subs += seriesFunction(j/i, x)
		s += subs / f
		f *= q
	return s

y = np.linspace(-0.1, 1.1, 5000)
x = [series(20, i) for i in y]


f, ax = plt.subplots()

ax.set_xlim(-4, 4)
ax.set_ylim(0, 1)
plt.plot(x, y)

plt.savefig("Pompeiu function.svg")

Licensing

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.

Captions

Graphic of Pompeiu function

Items portrayed in this file

depicts

11 October 2021

image/svg+xml

17,980 byte

a39bcb6f29bebcbe78add1bf709dfadec6eead7c

Category:CC-Zero Category:Differential calculus Category:Self-published work Category:Valid SVG created with Matplotlib code