Enter the following into an input cell in the worksheet:
var('n, x, t') J_n(n, x) = 1 / pi * integral(cos(n * t - x * sin(t)), t, 0, pi) latex(J_n)
You will get a string of LaTeX mark-up that represents the object J_n
:
\left( n, x \right) \ {\mapsto} \ \frac{\int_{0}^{\pi} \cos\left(-n t + x \sin\left(t\right)\right)\,{d t}}{\pi}
You can paste this text directly into an existing LaTeX document. This function will also work on the Sage command line.
You can also use the notebook interface to evaluate LaTeX expressions. Enter this into an input cell (you can copy and paste the markup for the mathematical expression from the previous example):
%latex You can paste LaTeX markup directly into a cell: \[ \left( n, x \right) \ {\mapsto} \ \frac{\int \cos\left(-n t + x \sin\left(t\right)\right)\,{d t}}{\pi} \] You can also put expressions like \(y=x^3\) inline.
The result should be:
Another neat trick is that we can actually embed...