Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

1. Write three different python programs that perform the following tasks (a) In

ID: 3595990 • Letter: 1

Question

1. Write three different python programs that perform the following tasks (a) In the derivation of the specific heat of a metal, it was argued that the function kBT is peaked strongly at E = Ef. Write a program that plots this function vs. or -10 10. Use properly labelled axes and give the graph a title. Submit an electronic copy of your program as well as a hard copy of your program and the graph (E-E) (b) In the same derivation for the specific heat of a metal, the following integral was used 0o Write a program will calculate the integral numerically using the midpoint rule. The program will calculate the integral for various values of 4sN

Explanation / Answer

#given two questions we are just supposed to do one

import matplotlib.pyplot as plt

from math import exp as exp

x=range(-10,11,1)

y=list()

for i in x:

e=exp(i)

y.append((i*i)*(e/((e+1)*(e+1))))

plt.plot(x,y)

plt.ylabel('((E-Ef)/kb*T)^2(e^((E-Ef)/kb*T)/((e^((E-Ef)/kb*T+1)^2))') #you can change this part if you don't like y label

plt.xlabel('(E-Ef)/kb*T')

plt.show()