elmo
Montreal, Quebec, Canada
 
 
it's elmo but earl
Zurzeit 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}")
Seltenste Errungenschaften
Kürzliche Aktivitäten
67 Std. insgesamt
zuletzt gespielt am 4. Juli 2023
40 Std. insgesamt
zuletzt gespielt am 4. Juli 2023
5,2 Std. insgesamt
zuletzt gespielt am 23. Mai 2023
Errungenschaften   0 von 98
Adolace 31. Aug. 2024 um 11:46 
cool game
76561199260463324 24. Juli 2023 um 10:02 
lets go party in csgo
76561199041963229 Vom Handel ausgeschlossen 22. Nov. 2021 um 13:50 
Im interested to buy your item on steam market, but i need to talk about prices, add me if u can.
76561198109744297 Vom Handel ausgeschlossen 25. Juli 2021 um 20:40 
hello man. add me if you want to sell your knife.
director 16. Juli 2021 um 0:05 
send me a friend request, I need to talk to you
Jotus 4. Juni 2021 um 4:54 
hi mate, can you add me? just for a quick chat