Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
Download
21 views
ubuntu2204
#exam 2 #u is temperature #t is time in seconds #x is position #the rod is 50 cm long j,t=var('j,t') print('u(x,t) = (80/pi)*sum((1/(2*j+1))*exp(-(2*j+1)^2*pi^2*t/2500)*sin((2*j+1)*pi*x/50), j, 0, 10)') j,t=var('j, t') f(x,t)= (1/(2*j+1))*exp(-(2*j+1)^2*pi^2*t/2500)*sin((2*j+1)*pi*x/50) f=sum(f(x,t),j,0,9) u(x,t)= ((80/pi)*f) #plot the graph as the temperature = 5 p1=plot(u(5, t), t, 0, 100, gridlines='minor') p1.show() #observations print('Looking at the graph above we can see that the temperature starts off high and then decreases significantly fast') #plot the graph as time = 300 sec p2=plot(u(x, 300), x, 0, 50, gridlines='minor') p2.show() #observations print('when time is 300 secs we can see that the graph above starts at 0 and is at its highest point when in the middle, it then drops back to 0') #plot the contour plot contour_plot(u(x,t),(x,0,50),(t,0,300), aspect_ratio=0.1,colorbar=true) #observations print('the graph is shaped as a curve and as you start on the outside it is hot and then as it comes closer to the middle and to the bottom the temperature is lower')
u(x,t) = (80/pi)*sum((1/(2*j+1))*exp(-(2*j+1)^2*pi^2*t/2500)*sin((2*j+1)*pi*x/50), j, 0, 10)
Looking at the graph above we can see that the temperature starts off high and then decreases significantly fast
when time is 300 secs we can see that the graph above starts at 0 and is at its highest point when in the middle, it then drops back to 0
the graph is shaped as a curve and as you start on the outside it is hot and then as it comes closer to the middle and to the bottom the temperature is lower