O'Reilly logo

Sage Beginner's Guide by Craig Finch

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Time for action - PDF output from the notebook interface

Enter the following code into an input cell in a worksheet, and evaluate the cell.

var('n,x,t')
J_n(n,x) = 1/pi*integral(cos(n*t-x*sin(t)), t)
J_n
show(J_n)
view(J_n)
view(J_n, mode='display'))

You should see the following results in your worksheet:

Time for action - PDF output from the notebook interface

Let's say you want to generate a PDF file. Enter the following code after evaluating the code from the first example:

restore('i'))
J_n_2(n, x) = 1 / (2 * pi) * integral(exp(-i * (n * t - x * sin(t))), 
t, -pi, pi)
view([J_n, J_n_2], title='Representations of the Bessel function',, 
sep='\hrule', viewer='pdf', mode='display')

You will not see any ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required