Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
Download
6697 views
1
## -*- encoding: utf-8 -*-
2
## This file (40-sagetex.sagetex.sage) was *autogenerated* from 40-sagetex.tex with sagetex.sty version 2012/01/16 v2.3.3-69dcb0eb93de.
3
import sagetex
4
_st_ = sagetex.SageTeXProcessor('40-sagetex', version='2012/01/16 v2.3.3-69dcb0eb93de', version_check=True)
5
try:
6
_st_.inline(0, latex(1+1))
7
except:
8
_st_.goboom(37)
9
_st_.blockbegin()
10
try:
11
x = var('x')
12
ex = (1 + x)^5
13
exe = ex.expand()
14
except:
15
_st_.goboom(44)
16
_st_.blockend()
17
try:
18
_st_.inline(1, latex(ex))
19
except:
20
_st_.goboom(46)
21
try:
22
_st_.inline(2, latex(exe))
23
except:
24
_st_.goboom(46)
25
try:
26
_st_.inline(3, str(CartesianProduct(['a', 'b'], [1, 2, 3]).list()))
27
except:
28
_st_.goboom(50)
29
_st_.blockbegin()
30
try:
31
a = 2
32
b = 3
33
x = var('x')
34
g = a * sin(b * x) + sqrt(x)
35
except:
36
_st_.goboom(59)
37
_st_.blockend()
38
try:
39
_st_.inline(4, latex(g))
40
except:
41
_st_.goboom(61)
42
try:
43
_st_.plot(0, format='notprovided', _p_=plot(g, 0, 10))
44
except:
45
_st_.goboom(63)
46
_st_.endofdoc()
47
48