File:Arc length, Fermat.svg

From testwiki
Jump to navigation Jump to search

Original file(SVG file, nominally 615 × 618 pixels, file size: 26 KB)

This file is from Wikimedia Commons and may be used by other projects. The description on its file description page there is shown below.

Summary

Description
English: This graph is meant to help accompany the article Length of an arc and describe the method Fermat used.
Español: Ilustración del método de Fermat para calcular la longitud de arco de una curva.
Date
Source Own work
Author Nicoguaro
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
from matplotlib import rcParams

rcParams['font.size'] = 16

fun = lambda x: x**1.5
tangent = lambda x, a: 1.5*a**0.5*(x - a) + a**1.5

a = 0.6
e = 0.45*a
lo = e/10  # Offset of annotations

# Principal plots
x = np.linspace(0, 1.2, 100)
y1 = fun(x)
y2 = tangent(x, a)
fig = plt.figure(figsize=(8, 8))
ax = fig.add_subplot(1, 1, 1)
plt.plot(x, y1, "r", lw=2)
plt.plot(x[y2>=0], y2[y2>=0], "k", lw=2)

# Auxiliar lines
plt.plot([0, 1.2], [fun(a), fun(a)], "--k", lw=1, alpha=0.5)
plt.plot([a, a], [0, y2[-1]], "--k", lw=1, alpha=0.5)
plt.plot([a + e, a + e], [0, y2[-1]], "--k", lw=1, alpha=0.5)

# Intersections points
plt.plot(a, fun(a), 'rs')
plt.annotate("A", xy=(a, fun(a) + lo))
plt.plot(a + e, fun(a), 'rs')
plt.annotate("B", xy=(a + e + lo, fun(a) + lo))
plt.plot(a + e, tangent(a+e, a), 'rs')
plt.annotate("C", xy=(a + e + lo, tangent(a+e, a) - lo))
plt.plot(a + e, fun(a+e), 'rs')
plt.annotate("D", xy=(a + e - lo, fun(a+e) + lo))

# Functions labels
plt.annotate(r"$y=x^{3/2}$", xy=(0.2, 0.2))
plt.annotate(r"$y=\frac{3\sqrt{a}}{2} (x - a) + a^{3/2}$", xy=(0.35, 0.12))

plt.xlim([0, 1.2])
plt.ylim([0, 2.5*fun(a)])
plt.xticks([a, a+e], [r"$a$", r"$a + e$"])
plt.yticks([fun(a)], [r"$a^{3/2}$"])
plt.savefig("Arc length, Fermat.svg", bbox_inches="tight")
plt.show()

Licensing

I, the copyright holder of this work, hereby publish it under the following license:
w:en:Creative Commons
attribution
This file is licensed under the Creative Commons Attribution 4.0 International license.
You are free:
  • to share – to copy, distribute and transmit the work
  • to remix – to adapt the work
Under the following conditions:
  • attribution – You must give appropriate credit, provide a link to the license, and indicate if changes were made. You may do so in any reasonable manner, but not in any way that suggests the licensor endorses you or your use.

Captions

Add a one-line explanation of what this file represents

Items portrayed in this file

depicts

12 February 2016

image/svg+xml

e7ae0e4eb88be7b0e8c1ee9285ea8c5ab21725f6

27,134 byte

618 pixel

615 pixel

File history

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

Date/TimeThumbnailDimensionsUserComment
current17:42, 12 February 2016Thumbnail for version as of 17:42, 12 February 2016615 × 618 (26 KB)wikimediacommons>NicoguaroFit lines inside the plotting box and change some colors.

The following page uses this file: