Contact
CoCalc Logo Icon
StoreFeaturesDocsShareSupport News AboutSign UpSign In
| Download
Views: 2218
1
## -*- encoding: utf-8 -*-
2
3
# This file was *autogenerated* from the file SageTex.sagetex.sage
4
from sage.all_cmdline import * # import sage library
5
6
_sage_const_3 = Integer(3); _sage_const_2 = Integer(2); _sage_const_1 = Integer(1); _sage_const_0 = Integer(0); _sage_const_7 = Integer(7); _sage_const_6 = Integer(6); _sage_const_5 = Integer(5); _sage_const_4 = Integer(4); _sage_const_22 = Integer(22); _sage_const_20 = Integer(20); _sage_const_67 = Integer(67); _sage_const_18 = Integer(18); _sage_const_44 = Integer(44); _sage_const_2017 = Integer(2017); _sage_const_41 = Integer(41); _sage_const_38 = Integer(38); _sage_const_10 = Integer(10); _sage_const_57 = Integer(57); _sage_const_30 = Integer(30); _sage_const_55 = Integer(55); _sage_const_32 = Integer(32); _sage_const_52 = Integer(52); _sage_const_37 = Integer(37); _sage_const_74 = Integer(74); _sage_const_p5 = RealNumber('.5'); _sage_const_4p5 = RealNumber('4.5')## This file (SageTex.sagetex.sage) was *autogenerated* from SageTex.tex with sagetex.sty version 2015/08/26 v3.0-92d9f7a.
7
import sagetex
8
_st_ = sagetex.SageTeXProcessor('SageTex', version='2015/08/26 v3.0-92d9f7a', version_check=True)
9
_st_.current_tex_line = _sage_const_18
10
_st_.blockbegin()
11
try:
12
n=_sage_const_2017
13
except:
14
_st_.goboom(_sage_const_20 )
15
_st_.blockend()
16
try:
17
_st_.current_tex_line = _sage_const_22
18
_st_.inline(_sage_const_0 , latex(n))
19
except:
20
_st_.goboom(_sage_const_22 )
21
try:
22
_st_.current_tex_line = _sage_const_22
23
_st_.inline(_sage_const_1 , latex(n))
24
except:
25
_st_.goboom(_sage_const_22 )
26
try:
27
_st_.current_tex_line = _sage_const_22
28
_st_.inline(_sage_const_2 , latex(number_of_partitions(n)))
29
except:
30
_st_.goboom(_sage_const_22 )
31
try:
32
_st_.current_tex_line = _sage_const_22
33
_st_.inline(_sage_const_3 , latex(factor(number_of_partitions(n))))
34
except:
35
_st_.goboom(_sage_const_22 )
36
_st_.current_tex_line = _sage_const_30
37
_st_.blockbegin()
38
try:
39
__tmp__=var("x"); f = symbolic_expression(exp(x) * sin(_sage_const_2 *x)).function(x)
40
except:
41
_st_.goboom(_sage_const_32 )
42
_st_.blockend()
43
try:
44
_st_.current_tex_line = _sage_const_37
45
_st_.inline(_sage_const_4 , latex(f(x)))
46
except:
47
_st_.goboom(_sage_const_37 )
48
try:
49
_st_.current_tex_line = _sage_const_38
50
_st_.inline(_sage_const_5 , latex(diff(f, x, _sage_const_2 )(x)))
51
except:
52
_st_.goboom(_sage_const_38 )
53
try:
54
_st_.current_tex_line = _sage_const_41
55
_st_.inline(_sage_const_6 , latex(f(x)))
56
except:
57
_st_.goboom(_sage_const_41 )
58
try:
59
_st_.current_tex_line = _sage_const_44
60
_st_.plot(_sage_const_0 , format='notprovided', _p_=plot(f, -pi/_sage_const_2 , pi/_sage_const_2 , figsize = _sage_const_4 , axes_labels=['$x$','$y$'], axes_labels_size = _sage_const_1 , tick_formatter = [pi,_sage_const_2 ]))
61
except:
62
_st_.goboom(_sage_const_44 )
63
_st_.current_tex_line = _sage_const_52
64
_st_.blockbegin()
65
try:
66
y=function('y')(x)
67
eq = diff(y,x)==-tan(x)/y
68
except:
69
_st_.goboom(_sage_const_55 )
70
_st_.blockend()
71
try:
72
_st_.current_tex_line = _sage_const_57
73
_st_.inline(_sage_const_7 , latex(desolve(eq,y,show_method=True)))
74
except:
75
_st_.goboom(_sage_const_57 )
76
_st_.current_tex_line = _sage_const_67
77
_st_.blockbegin()
78
try:
79
var('c,x,y')
80
F1=[plot(c*sin(x),(x,-_sage_const_2 *pi,_sage_const_2 *pi),color='darkgreen', aspect_ratio=_sage_const_1 ) for c in sxrange(-_sage_const_4 ,_sage_const_4p5 ,_sage_const_p5 )]
81
#show(sum(F1))
82
F2=[implicit_plot(y**_sage_const_2 +_sage_const_2 *log(abs(sec(x)))-c,(x,-_sage_const_2 *pi,_sage_const_2 *pi),(y,-_sage_const_5 ,_sage_const_5 ),color='red',aspect_ratio=_sage_const_1 ) for c in sxrange(-_sage_const_10 ,_sage_const_10 ,_sage_const_1 )]
83
Fig = sum(F2)+sum(F1)
84
Fig.save("Figure.png")
85
except:
86
_st_.goboom(_sage_const_74 )
87
_st_.blockend()
88
_st_.endofdoc()
89
90
91