The set of interactive pages with the following structure:
Example of Computations
Click the
@interact
def _(N=(24,1,-1)):
var('x'); f=sin(x)*exp(1)^(-x)
p=plot(f,-1,6,thickness=5,color='#3636ff',alpha=.5)+\
sum([plot(f.taylor(x,0,i),-1,6,hue=cos(i/24),thickness=1,
legend_label=str(i)) for i in [1..N]])
ti=r'$Taylor \ Series \ f=sin \ x \cdot e^{-x}$'
p.show(ymin=-.5,ymax=.5,figsize=(7,5),
gridlines=True,title=ti,fontsize=12)
Type your own SageMath code lines below and click the
xxxxxxxxxx
Md=Manifold(2,'Md')
U=Md.open_subset('U'); V=Md.open_subset('V')
XU.<x,y>=U.chart(); XV.<xp,yp>=V.chart('xp:x’ yp:y’')
Md.declare_union(U,V)
XU_to_XV=XU.transition_map(
XV,(2*x/(x^2+y^2),2*y/(x^2+y^2)),
intersection_name='W',
restrictions1=x^2+y^2!=0,
restrictions2=xp^2+yp^2!=0)
R3=Manifold(3,'R^3',r'\mathbb{R}^3')
XR3.<X,Y,Z>=R3.chart()
Delta1=Md.diff_map(
R3,{(XU,XR3):[2*x/(1+x^2+y^2),2*y/(1+x^2+y^2),
(x^2+y^2-1)/(1+x^2+y^2)],
(XV,XR3):[3*xp/(1+xp^2+yp^2),3*yp/(1+xp^2+yp^2),
(1-xp^2-yp^2)/(1+xp^2+yp^2)]},
name='Delta1',latex_name=r'\Delta_1')
Delta2=Md.diff_map(
R3,{(XU, XR3):[x/(1+x^2+y^2),y/(1+x^2+y^2),
(x^2+y^2-1)/(1+x^2+y^2)],
(XV, XR3):[4*xp/(1+xp^2+yp^2),4*yp/(1+xp^2+yp^2),
(1-xp^2-yp^2)/(1+xp^2+yp^2)]},
name='Delta2',latex_name=r'\Delta_2')
cols=['darkblue','#ff3636','darkred','#3636ff']
elements=[(XU,Delta1),(XV,Delta1),(XU,Delta2),(XV,Delta2)]
p=sum([elements[i][0].plot(
chart=XR3,mapping=elements[i][1],
number_values=50,color=cols[i],label_axes=False)
for i in range(4)])
p.show(frame=False)
This code cell was evaluated automatically.
xxxxxxxxxx
def _(a=(2,4,1),b=(4,8,1),c=(4,8,1),n=(2,8,1),m=(2,8,1)):
var('t'); r=cos(a*t)^n+sin(b*t)^m+1/c; col='#3636ff'
string='<center><font color=%s>$r = %s$</font></center>'
pretty_print(html(string%(col,latex(r))))
p=parametric_plot((sin(t)*r,cos(t)*r),(0,2*pi),
color=col,fill=True,fillcolor=col)
p+=plot(r,(0,2*pi),linestyle='--',color=col,gridlines=True)
show(p,figsize=(7,7),
xmin=-2.2-1/c,xmax=6.4+1/c,ymin=-2-1/c,ymax=2+1/c)
xxxxxxxxxx
g=Graphics()
f1(x,y)=x^2+x*y+y^2+2*x+6*y+3
f2(x,y)=x^2+x*y-y^2+2*x+6*y+3
g+=implicit_plot(f1,(-8,8),(-8,8),color='#3636ff',linewidth=2,linestyle='-.')
g+=text('$x^2+xy+y^2+2x+6y+3=0$',(1,-7),color='#3636ff',fontsize=14)
g+=implicit_plot(f2,(-8,8),(-8,8),color='#ff36ff',linewidth=4,linestyle=':')
g+=text('$x^2+xy-y^2+2x+6y+3=0$',(1,3),color='#ff36ff',fontsize=14)
g.show(figsize=[7,7],gridlines=True)
xxxxxxxxxx
import numpy as np,pylab as pl
from mpl_toolkits.mplot3d import Axes3D
x,y,z=np.indices((13,13,13))
link=(x-6)**2+(y-5)**2+(z-6)**2==45
f=pl.figure(figsize=(7,7))
ax=f.add_subplot(111,projection='3d')
ax.voxels(link,facecolors=pl.cm.bwr((x+y+x)*8),
edgecolor='darkslategray')
ti='$(x-6)^2+(y-5)^2+(z-6)^2=45$'
pl.title(ti,fontsize=14,color='#3636ff')
pl.tight_layout(); pl.show()
xxxxxxxxxx
%%html
<p>Calculation the number of symbols in strings:</p>
<p id='script_output'>evaluate the next code cell</p>
xxxxxxxxxx
%%javascript
function getInteger(min,max) {
return Math.floor(Math.random()*(max-min+1))+min;};
var string='@@@***морозИсолнцеДЕНЬчудестный***@@@'+getInteger(1,19);
document.getElementById('script_output')
.innerHTML=string+' - '+string.length+' symbols';
xxxxxxxxxx
%%html
<style>
.text1 {color:darkred; font-size:200%; text-shadow:3px 3px 3px #aaa;}
.text2 {color:darkslategray; font-size:200%; text-shadow:3px 3px 3px #bbb;}
.text3 {color:steelblue; font-size:200%; text-shadow:3px 3px 3px #ccc;}
</style>
<p class='text1'>📕 $\mathfrak {Choose \ your \ style!}$</p>
<p class='text2'>📓 $\mathbb {Choose \ your \ style!}$</p>
<p class='text3'>📘 $\mathscr {Choose \ your \ style!}$</p>