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