{
"metadata": {
"name": "",
"signature": "sha256:a5b04150ded868490ca4a47344cace8f4d1dddeae0b08e0f02fa219ce06c9963"
},
"nbformat": 3,
"nbformat_minor": 0,
"worksheets": [
{
"cells": [
{
"cell_type": "heading",
"level": 1,
"metadata": {},
"source": [
"Chebyshev points"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Chebyshev points are defined in the interval $[-1,+1]$. They are obtained as projections of uniformly spaced points on the unit circle onto the $x$-axis. For any $N \\ge 2$ they are defined as follows\n",
"$$\n",
"\\theta_i = \\frac{\\pi i}{N-1}, \\qquad x_i = \\cos(\\theta_i), \\qquad i=0,1,\\ldots,N-1\n",
"$$"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"from numpy import pi,linspace,cos,sin\n",
"from matplotlib.pyplot import plot,axis"
],
"language": "python",
"metadata": {},
"outputs": [],
"prompt_number": 31
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"t = linspace(0,pi,1000)\n",
"xx = cos(t)\n",
"yy = sin(t)\n",
"plot(xx,yy)\n",
"\n",
"N = 10\n",
"theta = linspace(0,pi,N)\n",
"plot(cos(theta),sin(theta),'o')\n",
"for i in range(N):\n",
" x1 = [cos(theta[i]), cos(theta[i])]\n",
" y1 = [0.0, sin(theta[i])]\n",
" plot(x1,y1,'k--',cos(theta[i]),0,'sr')\n",
"axis([-1.1, 1.1, 0.0, 1.1])\n",
"axis('equal')"
],
"language": "python",
"metadata": {},
"outputs": [
{
"metadata": {},
"output_type": "pyout",
"prompt_number": 34,
"text": [
"(-1.0, 1.0, 0.0, 1.0)"
]
},
{
"metadata": {},
"output_type": "display_data",
"svg": [
"\n",
"\n",
"\n",
"\n"
],
"text": [
""
]
}
],
"prompt_number": 34
}
],
"metadata": {}
}
]
}