Contact Us!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutSign UpSign In

Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place. Commercial Alternative to JupyterHub.

| Download

Física Experimental IFC

Views: 1397
License: MIT
Image: ubuntu2204
a

.c�@srddlmZddlTddlTddlmZddlTddd�Zdd
d�Zee�Z	dd
d�Z
ee
�Zdd�Zee�Z
dS)�)�
derivative)�*)�unumpy�cCstt|||d���S)N)�n)�printr)�f�x0�ord�r�S/home/user/FISICA-EXPERIMENTAL/Elementos-Python-Julia-Fisica-experimental/FexIFC.py�derivadasr
��?�d�����ư>cCs�|}d}||krRt||��|krRtt||��|krR|||�t||�8}|d7}qtt||��|krptd|�n||kr�td�n
t|��SdS)Nru=Erro! O valor da derivada da função está próximo de zero!z;Erro! Limite de passos estourados sem encontrar o resultado)�absrr)rr	Z
max_passosZ
tolerancia�xnZpassorrr�XraizNs*

r��cs�|�t|����d�t���fdd�td|�D��}t���fdd�td|�D��}t�d����|�d|d|��S)	Ng@c3s|]}��|��VqdS�Nr��.0�i)�a1r�hrr�	<genexpr>&�zXmod_simpson.<locals>.<genexpr>rc3s|]}��|��VqdSrrr)�arrrrr'rrg@g@)�float�sum�ranger)rr�bZpassos�s1�s2r)rrrrr�Xmod_simpson"s
  r$csFtt||���t��d���fdd�����fdd�}t||���S)NrcsNd}t�d�D]8}||kr||�|d�|d�|d}q|S)Nrr�r )r�xZLi�j)r�pontosrr�L4s
.zXinterpL.<locals>.Lcs4d}t�d�D]}|�|d�||�}q|S)Nrrr%)r&�pr�r)rr(rr�Lagrange;szXinterpL.<locals>.Lagrange)�tuple�zip�lenr)r&Zx_dadosZy_dadosr,rr+r�XinterpL0s
r0N)r)rrr)r)Z
scipy.miscrZ
uncertaintiesZuncertainties.umathr�numpyr
r�wrapZraizr$Zintegralr0Zinterpolacaorrrr�<module>s