elmo
Montreal, Quebec, Canada
 
 
it's elmo but earl
Momenteel offline
calculations of an integral
# -*- coding: utf-8 -*-
"""
Created on Sun Jan 29 14:09:43 2023

@author: your mom
"""

# step 1 import necessary librairies

import numpy as np
import matplotlib.pyplot as plt

# step 2 define starting variables

xi = 0
xf = 2
npts = 21
x = np.linspace(xi,xf,npts)
f = np.zeros(npts)
g = np.zeros(npts)

# step 3 define functions that will be later plotted

for i in range(len(x)):
f = x **3
if x <=-1:
g = 3 * x + 2
elif x < 1:
g = f
else:
g = 3 * x - 2

# step 4 graph the functions previously defined

plt.plot(x,f, label = 'f(x)')
plt.plot(x,g, label = 'g(x)')
plt.legend()
plt.title("There is no title idiot")
plt.grid(True, "both", 'both')

# step 5 calculate the integral of the function g(x) between x = 0 and x = 2

A1=0
dx = x[1] - x[0]
for j in range(0,npts-1):
A1= A1 + ( g[j]+g[j+1] )/2*dx
print(f"L'intégrale de la fonction g(x) entre x=0 et x=2 est {A1:.4f}")
Zeldzaamste prestaties
Recente activiteit
67 uur in totaal
laatst gespeeld op 4 jul 2023
40 uur in totaal
laatst gespeeld op 4 jul 2023
5,2 uur in totaal
laatst gespeeld op 23 mei 2023
Prestatievoortgang   0 van de 98
Adolace 31 aug 2024 om 11:46 
cool game
76561199260463324 24 jul 2023 om 10:02 
lets go party in csgo
76561199041963229 Verbannen van ruilen 22 nov 2021 om 13:50 
Im interested to buy your item on steam market, but i need to talk about prices, add me if u can.
76561198109744297 Verbannen van ruilen 25 jul 2021 om 20:40 
hello man. add me if you want to sell your knife.
director 16 jul 2021 om 0:05 
send me a friend request, I need to talk to you
Jotus 4 jun 2021 om 4:54 
hi mate, can you add me? just for a quick chat