Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
Download

📚 The CoCalc Library - books, templates and other resources

132940 views
License: OTHER
var('x') x0 = 0 k=1 f = x*exp(-x^2) p = plot(f,0,2*pi, thickness=2) c = 1/pi orden=10 alpha=[(n,c*numerical_integral(f*sin(x*n/2),0,2*pi)[0] ) for n in range(1,orden)] @interact def _(tiempo = (0.1*j for j in (0..10)) ): ft = sum( a*sin(x*n/2)*exp(-k*(n/2)^2*tiempo) for n,a in alpha) pt = plot(ft, 0, 2*pi, color='green', thickness=2) show( p + pt, ymin = -.2)
x
Interact: please open in CoCalc