CoCalc Public Filessin-series.sagewsOpen with one click!
Authors: harald @schil.ly, Testing CoCalc, Harald Schilly, Harald Schilly, HaraldTest SchillyTest, ℏal Snyder, William A. Stein
Views : 67
Compute Environment: Ubuntu 18.04 (Deprecated)
x = var('x') f(x) = 1/(1+exp(-x)) plot(f, -6, 6) + plot(f.diff(x), -6, 6, color='red')
%time n = var('n') cos_ser = sum((-1)^n * (x^(2*n+1) / factorial(2*n+1)), n, 0, 52) s = str(cos_ser) print s[:40], "…[%d chars]…" % len(s), s[-40:] R = RealField(106) # coercing float to higher precision plot(lambda x : cos_ser(x=R(x)), (x, 30, 40))
1/10813967582402909005041013058003296497 …[4469 chars]… 9 - 1/5040*x^7 + 1/120*x^5 - 1/6*x^3 + x
CPU time: 0.98 s, Wall time: 0.68 s