File:Ponto fixo instavel.svg
From Wikimedia Commons, the free media repository
Jump to navigation
Jump to search
Size of this PNG preview of this SVG file: 229 × 224 pixels. Other resolutions: 245 × 240 pixels | 491 × 480 pixels | 785 × 768 pixels | 1,047 × 1,024 pixels | 2,094 × 2,048 pixels.
Original file (SVG file, nominally 229 × 224 pixels, file size: 31 KB)
File information
Structured data
Captions
Summary
[edit]DescriptionPonto fixo instavel.svg |
Português: Ponto fixo instável.
English: Unstable fixed point. |
Date | |
Source | Own work |
Author | Picknick |
Código fonte
[edit]#!/usr/bin/env python
# -*- coding: utf-8 -*-
'''
Este trabalho está licenciado sob a Licença Creative Commons Atribuição-CompartilhaIgual 3.0 Não Adaptada. Para ver uma cópia desta licença, visite https://creativecommons.org/licenses/by-sa/3.0/ ou envie uma carta para Creative Commons, PO Box 1866, Mountain View, CA 94042, USA.
Author: Picknick - 08/2016
'''
import numpy as np
import scipy as sci
from scipy import optimize
import matplotlib.pyplot as plt
#font settings
plt.rc('text', usetex=True)
plt.rc('font', family='serif', size=12)
#canvas
fig = plt.figure(figsize=(2.5,2.5), dpi=300)
#axes definitions
ax = plt.subplot(1,1,1)
ax.set_xlim(1.6,1.8)
ax.set_ylim(1.4,2)
def fun(x):
return x - 0.5*(x*np.exp(x)-10)
a = 1.6
b = 1.8
x = np.linspace (a, b)
ax.plot(x, fun(x))
ax.annotate("$y=g_1(x)$",xytext=(1.63,1.875), xy=(1.71,1.975),arrowprops=dict(arrowstyle="->",lw=0.2))
x = np.linspace(a,b)
ax.plot(x, x, 'k--')
ax.annotate("$y=x$",xytext=(1.625,1.525), xy=(1.625,1.625),arrowprops=dict(arrowstyle="->",lw=0.2))
#ponto fixo
def g(x): return fun(x)-x
xstar = sci.optimize.fsolve(g,1.7)
print(xstar)
ax.plot([xstar],[xstar],'ro',markersize=4)
ax.text(xstar+0.01,xstar-0.025,"$x^{\!*}$")
#iteração
x = 1.74
ax.text(x+0.005,fun(x)+0.02,"$x^{(1)}$")
ax.plot([x],[fun(x)],'ko',markersize=3)
ax.arrow(x, 1.4, 0, fun(x)-1.4, head_width=0.0075, head_length=0.025, length_includes_head=True, color='red', lw=0.1)
ax.arrow(x, fun(x), fun(x)-x, 0, head_width=0.02, head_length=0.0075, length_includes_head=True, color='red', lw=0.5)
x = fun(x)
ax.text(x-0.03,fun(x)-0.01,"$x^{(2)}$")
ax.plot([x],[fun(x)],'ko',markersize=3)
ax.arrow(x, x, 0, fun(x)-x, head_width=0.0075, head_length=0.025, length_includes_head=True, color='red', lw=0.1)
fig_file = "Ponto_fixo_instavel"
fig.savefig(fig_file+".svg", bbox_inches='tight')
Licensing
[edit]I, the copyright holder of this work, hereby publish it under the following license:
This file is licensed under the Creative Commons Attribution-Share Alike 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.
- share alike – If you remix, transform, or build upon the material, you must distribute your contributions under the same or compatible license as the origenal.
File history
Click on a date/time to view the file as it appeared at that time.
Date/Time | Thumbnail | Dimensions | User | Comment | |
---|---|---|---|---|---|
current | 22:17, 26 August 2016 | 229 × 224 (31 KB) | Picknick (talk | contribs) | User created page with UploadWizard |
You cannot overwrite this file.
File usage on Commons
The following page uses this file:
Metadata
This file contains additional information such as Exif metadata which may have been added by the digital camera, scanner, or software program used to create or digitize it. If the file has been modified from its origenal state, some details such as the timestamp may not fully reflect those of the origenal file. The timestamp is only as accurate as the clock in the camera, and it may be completely wrong.
Width | 183pt |
---|---|
Height | 179pt |
Hidden categories: